📄 rfc3984.txt
字号:
value of DON of the previous NAL unit in the STAP-B + 1) % 65536, in
which '%' stands for the modulo operation.
A single-time aggregation unit consists of 16-bit unsigned size
information (in network byte order) that indicates the size of the
following NAL unit in bytes (excluding these two octets, but
including the NAL unit type octet of the NAL unit), followed by the
NAL unit itself, including its NAL unit type byte. A single-time
aggregation unit is byte aligned within the RTP payload, but it may
not be aligned on a 32-bit word boundary. Figure 6 presents the
structure of the single-time aggregation unit.
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 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| NAL unit |
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| :
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 6. Structure for single-time aggregation unit
Wenger, 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 units
Wenger, 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 units
5.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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -