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

📄 rfc3984.txt

📁 完整的RTP RTSP代码库
💻 TXT
📖 第 1 页 / 共 5 页
字号:
      |                                                               |      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 6.  Structure for single-time aggregation unitWenger, et al.              Standards Track                    [Page 21]RFC 3984           RTP Payload Format for H.264 Video      February 2005   Figure 7 presents an example of an RTP packet that contains an STAP-   A.  The STAP contains two single-time aggregation units, labeled as 1   and 2 in the figure.       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          RTP Header                           |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |STAP-A NAL HDR |         NALU 1 Size           | NALU 1 HDR    |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                         NALU 1 Data                           |      :                                                               :      +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               | NALU 2 Size                   | NALU 2 HDR    |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                         NALU 2 Data                           |      :                                                               :      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :...OPTIONAL RTP padding        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 7.  An example of an RTP packet including an STAP-A and two                 single-time aggregation unitsWenger, et al.              Standards Track                    [Page 22]RFC 3984           RTP Payload Format for H.264 Video      February 2005   Figure 8 presents an example of an RTP packet that contains an STAP-   B.  The STAP contains two single-time aggregation units, labeled as 1   and 2 in the figure.       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          RTP Header                           |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |STAP-B NAL HDR | DON                           | NALU 1 Size   |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      | NALU 1 Size   | NALU 1 HDR    | NALU 1 Data                   |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +      :                                                               :      +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               | NALU 2 Size                   | NALU 2 HDR    |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                       NALU 2 Data                             |      :                                                               :      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :...OPTIONAL RTP padding        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 8.  An example of an RTP packet including an STAP-B and two                 single-time aggregation units5.7.2.  Multi-Time Aggregation Packets (MTAPs)   The NAL unit payload of MTAPs consists of a 16-bit unsigned decoding   order number base (DONB) (in network byte order) and one or more   multi-time aggregation units, as presented in Figure 9.  DONB MUST   contain the value of DON for the first NAL unit in the NAL unit   decoding order among the NAL units of the MTAP.      Informative note: The first NAL unit in the NAL unit decoding      order is not necessarily the first NAL unit in the order in which      the NAL units are encapsulated in an MTAP.Wenger, et al.              Standards Track                    [Page 23]RFC 3984           RTP Payload Format for H.264 Video      February 2005       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                      :  decoding order number base   |               |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |      |                                                               |      |                 multi-time aggregation units                  |      |                                                               |      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 9.  NAL unit payload format for MTAPs   Two different multi-time aggregation units are defined in this   specification.  Both of them consist of 16 bits unsigned size   information of the following NAL unit (in network byte order), an 8-   bit unsigned decoding order number difference (DOND), and n bits (in   network byte order) of timestamp offset (TS offset) for this NAL   unit, whereby n can be 16 or 24.  The choice between the different   MTAP types (MTAP16 and MTAP24) is application dependent: the larger   the timestamp offset is, the higher the flexibility of the MTAP, but   the overhead is also higher.   The structure of the multi-time aggregation units for MTAP16 and   MTAP24 are presented in Figures 10 and 11, respectively.  The   starting or ending position of an aggregation unit within a packet is   NOT REQUIRED to be on a 32-bit word boundary.  The DON of the   following NAL unit is equal to (DONB + DOND) % 65536, in which %   denotes the modulo operation.  This memo does not specify how the NAL   units within an MTAP are ordered, but, in most cases, NAL unit   decoding order SHOULD be used.   The timestamp offset field MUST be set to a value equal to the value   of the following formula: If the NALU-time is larger than or equal to   the RTP timestamp of the packet, then the timestamp offset equals   (the NALU-time of the NAL unit - the RTP timestamp of the packet).   If the NALU-time is smaller than the RTP timestamp of the packet,   then the timestamp offset is equal to the NALU-time + (2^32 - the RTP   timestamp of the packet).Wenger, et al.              Standards Track                    [Page 24]RFC 3984           RTP Payload Format for H.264 Video      February 2005       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      :        NAL unit size          |      DOND     |  TS offset    |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |  TS offset    |                                               |      +-+-+-+-+-+-+-+-+              NAL unit                         |      |                                                               |      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 10.  Multi-time aggregation unit for MTAP16       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      :        NALU unit size         |      DOND     |  TS offset    |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |         TS offset             |                               |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |      |                              NAL unit                         |      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      Figure 11.  Multi-time aggregation unit for MTAP24   For the "earliest" multi-time aggregation unit in an MTAP the   timestamp offset MUST be zero.  Hence, the RTP timestamp of the MTAP   itself is identical to the earliest NALU-time.      Informative note: The "earliest" multi-time aggregation unit is      the one that would have the smallest extended RTP timestamp among      all the aggregation units of an MTAP if the aggregation units were      encapsulated in single NAL unit packets.  An extended timestamp is      a timestamp that has more than 32 bits and is capable of counting      the wraparound of the timestamp field, thus enabling one to      determine the smallest value if the timestamp wraps.  Such an      "earliest" aggregation unit may not be the first one in the order      in which the aggregation units are encapsulated in an MTAP.  The      "earliest" NAL unit need not be the same as the first NAL unit in      the NAL unit decoding order either.Wenger, et al.              Standards Track                    [Page 25]RFC 3984           RTP Payload Format for H.264 Video      February 2005   Figure 12 presents an example of an RTP packet that contains a   multi-time aggregation packet of type MTAP16 that contains two   multi-time aggregation units, labeled as 1 and 2 in the figure.       0                   1                   2                   3       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          RTP Header                           |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |MTAP16 NAL HDR |  decoding order number base   | NALU 1 Size   |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |  NALU 1 Size  |  NALU 1 DOND  |       NALU 1 TS offset        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |  NALU 1 HDR   |  NALU 1 DATA                                  |      +-+-+-+-+-+-+-+-+                                               +      :                                                               :      +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               | NALU 2 SIZE                   |  NALU 2 DOND  |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |       NALU 2 TS offset        |  NALU 2 HDR   |  NALU 2 DATA  |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |      :                                                               :      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                               :...OPTIONAL RTP padding        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

⌨️ 快捷键说明

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