⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc3640.txt

📁 完整的RTP RTSP代码库
💻 TXT
📖 第 1 页 / 共 5 页
字号:
   example one stream from local storage, another from an RTP streaming   server), synchronization may become impossible if the receiver only   knows the original time stamp relationships.  In such cases the time   stamp relationship required for obtaining synchronization may be   provided by out of band means.  The format of such information, as   well as methods to convey such information, are beyond the scope of   this specification.   SSRC: set as described in RFC 3550 [2].   CC and CSRC fields are used as described in RFC 3550 [2].   RTCP SHOULD be used as defined in RFC 3550 [2].  Note that time   stamps in RTCP Sender Reports may be used to synchronize multiple   MPEG-4 elementary streams and also to synchronize MPEG-4 streams with   non-MPEG-4 streams, in case the delivery of these streams uses RTP.3.2.  RTP Payload Structure3.2.1.  The AU Header Section   When present, the AU Header Section consists of the AU-headers-length   field, followed by a number of AU-headers, see Figure 2.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- .. -+-+-+-+-+-+-+-+-+-+      |AU-headers-length|AU-header|AU-header|      |AU-header|padding|      |                 |   (1)   |   (2)   |      |   (n)   | bits  |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- .. -+-+-+-+-+-+-+-+-+-+                   Figure 2: The AU Header Section   The AU-headers are configured using MIME format parameters and MAY be   empty.  If the AU-header is configured empty, the AU-headers-length   field SHALL NOT be present and consequently the AU Header Section is   empty.  If the AU-header is not configured empty, then the AU-   headers-length is a two octet field that specifies the length in bits   of the immediately following AU-headers, excluding the padding bits.   Each AU-header is associated with a single Access Unit (fragment)   contained in the Access Unit Data Section in the same RTP packet.van der Meer, et al.        Standards Track                    [Page 11]RFC 3640         Transport of MPEG-4 Elementary Streams    November 2003   For each contained Access Unit (fragment), there is exactly one AU-   header.  Within the AU Header Section, the AU-headers are bit-wise   concatenated in the order in which the Access Units are contained in   the Access Unit Data Section.  Hence, the n-th AU-header refers to   the n-th AU (fragment).  If the concatenated AU-headers consume a   non-integer number of octets, up to 7 zero-padding bits MUST be   inserted at the end in order to achieve octet-alignment of the AU   Header Section.3.2.1.1.  The AU-header   Each AU-header may contain the fields given in Figure 3.  The length   in bits of the fields, with the exception of the CTS-flag, the   DTS-flag and the RAP-flag fields, is defined by MIME format   parameters; see section 4.1.  If a MIME format parameter has the   default value of zero, then the associated field is not present.  The   number of bits for fields that are present and that represent the   value of a parameter MUST be chosen large enough to correctly encode   the largest value of that parameter during the session.   If present, the fields MUST occur in the mutual order given in Figure   3.  In the general case, a receiver can only discover the size of an   AU-header by parsing it since the presence of the CTS-delta and DTS-   delta fields is signaled by the value of the CTS-flag and DTS-flag,   respectively.      +---------------------------------------+      |     AU-size                           |      +---------------------------------------+      |     AU-Index / AU-Index-delta         |      +---------------------------------------+      |     CTS-flag                          |      +---------------------------------------+      |     CTS-delta                         |      +---------------------------------------+      |     DTS-flag                          |      +---------------------------------------+      |     DTS-delta                         |      +---------------------------------------+      |     RAP-flag                          |      +---------------------------------------+      |     Stream-state                      |      +---------------------------------------+   Figure 3: The fields in the AU-header.  If used, the AU-Index field             only occurs in the first AU-header within an AU Header             Section; in any other AU-header, the AU-Index-delta field             occurs instead.van der Meer, et al.        Standards Track                    [Page 12]RFC 3640         Transport of MPEG-4 Elementary Streams    November 2003   AU-size: Indicates the size in octets of the associated Access Unit      in the Access Unit Data Section in the same RTP packet.  When the      AU-size is associated with an AU fragment, the AU size indicates      the size of the entire AU and not the size of the fragment.  In      this case, the size of the fragment is known from the size of the      AU data section.  This can be exploited to determine whether a      packet contains an entire AU or a fragment, which is particularly      useful after losing a packet carrying the last fragment of an AU.   AU-Index: Indicates the serial number of the associated Access Unit      (fragment).  For each (in decoding order) consecutive AU or AU      fragment, the serial number is incremented by 1.  When present,      the AU-Index field occurs in the first AU-header in the AU Header      Section, but MUST NOT occur in any subsequent (non-first) AU-      header in that Section.  To encode the serial number in any such      non-first AU-header, the AU-Index-delta field is used.   AU-Index-delta: The AU-Index-delta field is an unsigned integer that      specifies the serial number of the associated AU as the difference      with respect to the serial number of the previous Access Unit.      Hence, for the n-th (n>1) AU, the serial number is found from:      AU-Index(n) = AU-Index(n-1) + AU-Index-delta(n) + 1      If the AU-Index field is present in the first AU-header in the AU      Header Section, then the AU-Index-delta field MUST be present in      any subsequent (non-first) AU-header.  When the AU-Index-delta is      coded with the value 0, it indicates that the Access Units are      consecutive in decoding order.  An AU-Index-delta value larger      than 0 signals that interleaving is applied.   CTS-flag: Indicates whether the CTS-delta field is present.  A value      of 1 indicates that the field is present, a value of 0 indicates      that it is not present.      The CTS-flag field MUST be present in each AU-header if the length      of the CTS-delta field is signaled to be larger than zero.  In      that case, the CTS-flag field MUST have the value 0 in the first      AU-header and MAY have the value 1 in all non-first AU-headers.      The CTS-flag field SHOULD be 0 for any non-first fragment of an      Access Unit.van der Meer, et al.        Standards Track                    [Page 13]RFC 3640         Transport of MPEG-4 Elementary Streams    November 2003   CTS-delta: Encodes the CTS by specifying the value of CTS as a 2's      complement offset (delta) from the time stamp in the RTP header of      this RTP packet.  The CTS MUST use the same clock rate as the time      stamp in the RTP header.   DTS-flag: Indicates whether the DTS-delta field is present.  A value      of 1 indicates that DTS-delta is present, a value of 0 indicates      that it is not present.      The DTS-flag field MUST be present in each AU-header if the length      of the DTS-delta field is signaled to be larger than zero.  The      DTS-flag field MUST have the same value for all fragments of an      Access Unit.   DTS-delta: Specifies the value of the DTS as a 2's complement offset      (delta) from the CTS.  The DTS MUST use the same clock rate as the      time stamp in the RTP header.  The DTS-delta field MUST have the      same value for all fragments of an Access Unit.   RAP-flag: When set to 1, indicates that the associated Access Unit      provides a random access point to the content of the stream.  If      an Access Unit is fragmented, the RAP flag, if present, MUST be      set to 0 for each non-first fragment of the AU.   Stream-state:  Specifies the state of the stream for an AU of an      MPEG-4 system stream; each state is identified by a value of a      modulo counter.  In ISO/IEC 14496-1, MPEG-4 system streams use the      AU_SequenceNumber to signal stream states.  When the stream state      changes, the value of the stream-state MUST be incremented by one.      Note: no relation is required between stream-states of different      streams.3.2.2.  The Auxiliary Section   The Auxiliary Section consists of the auxiliary-data-size field   followed by the auxiliary-data field.  Receivers MAY (but are not   required to) parse the auxiliary-data field; to facilitate skipping   of the auxiliary-data field by receivers, the auxiliary-data-size   field indicates the length in bits of the auxiliary-data.  If the   concatenation of the auxiliary-data-size and the auxiliary-data   fields consume a non-integer number of octets, up to 7 zero padding   bits MUST be inserted immediately after the auxiliary data in order   to achieve octet-alignment.  See Figure 4.van der Meer, et al.        Standards Track                    [Page 14]RFC 3640         Transport of MPEG-4 Elementary Streams    November 2003      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- .. -+-+-+-+-+-+-+-+-+      | auxiliary-data-size   | auxiliary-data       |padding bits |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- .. -+-+-+-+-+-+-+-+-+           Figure 4: The fields in the Auxiliary Section   The length in bits of the auxiliary-data-size field is configurable   by a MIME format parameter; see section 4.1.  The default length of   zero indicates that the entire Auxiliary Section is absent.   auxiliary-data-size: specifies the length in bits of the immediately      following auxiliary-data field;   auxiliary-data: the auxiliary-data field contains data of a format      not defined by this specification.3.2.3.  The Access Unit Data Section   The Access Unit Data Section contains an integer number of complete   Access Units or a single fragment of one AU.  The Access Unit Data   Section is never empty.  If data of more than one Access Unit is   present, then the AUs are concatenated into a contiguous string of   octets.  See Figure 5.  The AUs inside the Access Unit Data Section   MUST be in decoding order, though not necessarily contiguous in the   case of interleaving.   The size and number of Access Units SHOULD be adjusted such that the   resulting RTP packet is not larger than the path MTU.  To handle   larger packets, this payload format relies on lower layers for   fragmentation, which may result in reduced performance.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |AU(1)                                                          |      +                                                               |      |                                                               |      |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               |AU(2)                                          |      +-+-+-+-+-+-+-+-+                                               |      |                                                               |      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               | AU(n)                         |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |AU(n) continued|      |-+-+-+-+-+-+-+-+        Figure 5: Access Unit Data Section; each AU is octet-aligned.van der Meer, et al.        Standards Track                    [Page 15]RFC 3640         Transport of MPEG-4 Elementary Streams    November 2003   When multiple Access Units are carried, the size of each AU MUST be   made available to the receiver.  If the AU size is variable, then the   size of each AU MUST be indicated in the AU-size field of the   corresponding AU-header.  However, if the AU size is constant for a   stream, this mechanism SHOULD NOT be used; instead, the fixed size   SHOULD be signaled by the MIME format parameter "constantSize"; see   section 4.1.   The absence of both AU-size in the AU-header and the constantSize   MIME format parameter indicates the carriage of a single AU   (fragment), i.e., that a single Access Unit (fragment) is transported   in each RTP packet for that stream.3.2.3.1.  Fragmentation

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -