draft-ietf-avtext-multiple-clock-rates-06.txt   draft-ietf-avtext-multiple-clock-rates-07.txt 
Network Working Group M. Petit-Huguenin Network Working Group M. Petit-Huguenin
Internet-Draft Unaffiliated Internet-Draft Unaffiliated
Updates: 3550 (if approved) G. Zorn, Ed. Updates: 3550 (if approved) G. Zorn, Ed.
Intended status: Standards Track Network Zen Intended status: Standards Track Network Zen
Expires: April 25, 2013 October 22, 2012 Expires: May 20, 2013 November 16, 2012
Support for Multiple Clock Rates in an RTP Session Support for Multiple Clock Rates in an RTP Session
draft-ietf-avtext-multiple-clock-rates-06 draft-ietf-avtext-multiple-clock-rates-07
Abstract Abstract
This document clarifies the RTP specification when different clock This document clarifies the RTP specification when different clock
rates are used in an RTP session. It also provides guidance on how rates are used in an RTP session. It also provides guidance on how
to interoperate with legacy RTP implementations that use multiple to interoperate with legacy RTP implementations that use multiple
clock rates. clock rates.
Status of this Memo Status of this Memo
skipping to change at page 1, line 34 skipping to change at page 1, line 34
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 25, 2013. This Internet-Draft will expire on May 20, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 18 skipping to change at page 2, line 18
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Legacy RTP . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Legacy RTP . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Different SSRC . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Different SSRC . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Same SSRC . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2. Same SSRC . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2.1. Monotonic timestamps . . . . . . . . . . . . . . . . . 5 3.2.1. Monotonic timestamps . . . . . . . . . . . . . . . . . 5
3.2.2. Non-monotonic timestamps . . . . . . . . . . . . . . . 6 3.2.2. Non-monotonic timestamps . . . . . . . . . . . . . . . 6
4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 7 4. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 7
4.1. RTP Sender (with RTCP) . . . . . . . . . . . . . . . . . . 7 4.1. RTP Sender (with RTCP) . . . . . . . . . . . . . . . . . . 7
4.2. RTP Sender (without RTCP) . . . . . . . . . . . . . . . . 7 4.2. RTP Sender (without RTCP) . . . . . . . . . . . . . . . . 7
4.3. RTP Receiver . . . . . . . . . . . . . . . . . . . . . . . 8 4.3. RTP Receiver . . . . . . . . . . . . . . . . . . . . . . . 8
4.4. Values Produced by Recommended Method . . . . . . . . . . 8
5. Security Considerations . . . . . . . . . . . . . . . . . . . 8 5. Security Considerations . . . . . . . . . . . . . . . . . . . 8
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.1. Normative References . . . . . . . . . . . . . . . . . . . 8 8.1. Normative References . . . . . . . . . . . . . . . . . . . 9
8.2. Informative References . . . . . . . . . . . . . . . . . . 9 8.2. Informative References . . . . . . . . . . . . . . . . . . 9
Appendix A. Using a Fixed Clock Rate . . . . . . . . . . . . . . 9 Appendix A. Using a Fixed Clock Rate . . . . . . . . . . . . . . 10
Appendix B. Behavior of Legacy Implementations . . . . . . . . . 10 Appendix B. Behavior of Legacy Implementations . . . . . . . . . 10
B.1. libccrtp 2.0.2 . . . . . . . . . . . . . . . . . . . . . . 10 B.1. libccrtp 2.0.2 . . . . . . . . . . . . . . . . . . . . . . 10
B.2. libmediastreamer0 2.6.0 . . . . . . . . . . . . . . . . . 10 B.2. libmediastreamer0 2.6.0 . . . . . . . . . . . . . . . . . 10
B.3. libpjmedia 1.0 . . . . . . . . . . . . . . . . . . . . . . 10 B.3. libpjmedia 1.0 . . . . . . . . . . . . . . . . . . . . . . 10
B.4. Android RTP stack 4.0.3 . . . . . . . . . . . . . . . . . 10 B.4. Android RTP stack 4.0.3 . . . . . . . . . . . . . . . . . 11
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 10 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
The clock rate is a parameter of the payload format. It is often The clock rate is a parameter of the payload format. It is often
defined as been the same as the sampling rate but it is not always defined as been the same as the sampling rate but it is not always
the case (see e.g. the G722 and MPA audio codecs [RFC3551]). the case (see e.g. the G722 and MPA audio codecs [RFC3551]).
An RTP sender can switch between different payloads during the An RTP sender can switch between different payloads during the
lifetime of an RTP session and because clock rates are defined by lifetime of an RTP session and because clock rates are defined by
payload types, it is possible that the clock rate also varies during payload types, it is possible that the clock rate also varies during
skipping to change at page 8, line 6 skipping to change at page 8, line 11
start_offset = random_initial_offset start_offset = random_initial_offset
capture_start = capture_time capture_start = capture_time
After eventually updating these values, the RTP timestamp is After eventually updating these values, the RTP timestamp is
calculated with the following formula: calculated with the following formula:
timestamp = (capture_time - capture_start) * clock_rate timestamp = (capture_time - capture_start) * clock_rate
+ start_offset + start_offset
Note that in all the formulas, capture_time is the first instant the Note that in all the formulas, capture_start is the first instant the
new timestamp rate is used. new timestamp rate is used.
4.3. RTP Receiver 4.3. RTP Receiver
An RTP Receiver MUST calculate the jitter using the following An RTP Receiver MUST calculate the jitter using the following
formula: formula:
D(i,j) = (arrival_time_j * clock_rate_i - timestamp_j) D(i,j) = (arrival_time_j * clock_rate_i - timestamp_j)
- (arrival_time_i * clock_rate_i - timestamp_i) - (arrival_time_i * clock_rate_i - timestamp_i)
An RTP Receiver MUST be able to handle a compound RTCP packet with An RTP Receiver MUST be able to handle a compound RTCP packet with
multiple SR packets. multiple SR packets.
4.4. Values Produced by Recommended Method
The following table illustrates the timestamp and jitter values
produced when the recommended method is used.
+-------+-------+-----------+---------+---------+--------+----------+
| Capt. | Clock | RTP | Arrival | Transit | Jitter | Average |
| time | rate | timestamp | time | | | jitter |
+-------+-------+-----------+---------+---------+--------+----------+
| 0 | 8000 | 0 | 0.1 | 800 | | |
| 0.02 | 8000 | 160 | 0.12 | 800 | 0 | 0 |
| 0.04 | 8000 | 320 | 0.14 | 800 | 0 | 0 |
| 0.06 | 8000 | 480 | 0.16 | 800 | 0 | 0 |
| 0.08 | 16000 | 640 | 0.18 | 1600 | 0 | 0 |
| 0.1 | 16000 | 960 | 0.2 | 1600 | 0 | 0 |
| 0.12 | 16000 | 1280 | 0.22 | 1600 | 0 | 0 |
| 0.14 | 8000 | 1600 | 0.24 | 320 | 0 | 0 |
| 0.16 | 8000 | 1760 | 0.26 | 320 | 0 | 0 |
+-------+-------+-----------+---------+---------+--------+----------+
Table 4
5. Security Considerations 5. Security Considerations
This document is not believed to effect the security of the RTP This document is not believed to effect the security of the RTP
sessions described here in any way. sessions described here in any way.
6. IANA Considerations 6. IANA Considerations
This document requires no IANA actions. This document requires no IANA actions.
7. Acknowledgements 7. Acknowledgements
Thanks to Colin Perkins, Ali C. Begen, Harald Alvestrand, Qin Wu and Thanks to Colin Perkins, Ali C. Begen, Harald Alvestrand, Qin Wu, Bo
Magnus Westerlund for their comments, suggestions and questions that Burman and Magnus Westerlund for their comments, suggestions and
helped to improve this document. questions that helped to improve this document.
Thanks to Robert Sparks and the attendees of SIPit 26 for the survey Thanks to Robert Sparks and the attendees of SIPit 26 for the survey
on multiple clock rates interoperability. on multiple clock rates interoperability.
This document was written with the xml2rfc tool described in Rose This document was written with the xml2rfc tool described in Rose
[RFC2629]. [RFC2629].
8. References 8. References
8.1. Normative References 8.1. Normative References
 End of changes. 10 change blocks. 
14 lines changed or deleted 37 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/