From 30845145f274a51f16a54f6d8a8d0287c3af4dd3 Mon Sep 17 00:00:00 2001 From: lu_zero Date: Mon, 7 May 2007 20:54:02 +0000 Subject: [PATCH] Headers packing changes as requested by rillian svn path=/trunk/vorbis/; revision=12923 --- doc/draft-ietf-avt-rtp-vorbis-04.txt | 164 +++++++++++++++++------------------ doc/draft-ietf-avt-rtp-vorbis-04.xml | 36 +++++--- 2 files changed, 108 insertions(+), 92 deletions(-) diff --git a/doc/draft-ietf-avt-rtp-vorbis-04.txt b/doc/draft-ietf-avt-rtp-vorbis-04.txt index a67f343..c25ce95 100644 --- a/doc/draft-ietf-avt-rtp-vorbis-04.txt +++ b/doc/draft-ietf-avt-rtp-vorbis-04.txt @@ -75,12 +75,12 @@ Table of Contents 3. Configuration Headers . . . . . . . . . . . . . . . . . . . . 8 3.1. In-band Header Transmission . . . . . . . . . . . . . . . 9 3.1.1. Packed Configuration . . . . . . . . . . . . . . . . . 9 - 3.2. Out of Band Transmission . . . . . . . . . . . . . . . . . 10 + 3.2. Out of Band Transmission . . . . . . . . . . . . . . . . . 11 3.2.1. Packed Headers . . . . . . . . . . . . . . . . . . . . 11 3.3. Loss of Configuration Headers . . . . . . . . . . . . . . 12 4. Comment Headers . . . . . . . . . . . . . . . . . . . . . . . 12 5. Frame Packetization . . . . . . . . . . . . . . . . . . . . . 13 - 5.1. Example Fragmented Vorbis Packet . . . . . . . . . . . . . 13 + 5.1. Example Fragmented Vorbis Packet . . . . . . . . . . . . . 14 5.2. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 16 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 6.1. Packed Headers IANA Considerations . . . . . . . . . . . . 19 @@ -464,15 +464,15 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 A Vorbis Packed Configuration is indicated with the Vorbis Data Type field set to 1. Of the three headers, defined in the Vorbis I specification [12], the identification and the setup MUST be packed - together, while the comment header MUST be completely suppressed. It - is up to the client to provide a minimal size comment header to the - decoder if required by the implementation. - - - - - - + together as they are, while the comment header MAY be replaced with a + dummy one. The packed configuration follows a generic way to store + xiph codec configurations: the first byte stores the number of + following packets minus one, the next bytes represent the size of the + packets, every byte set to 0xff means that the next byte has to be + add to the current sum in order to have the complete size; the + headers immediately follows the list of sizes. The headers are + packed in the same order they are present in ogg: identification, + comment, setup. @@ -520,7 +520,9 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ident | 0 | 1 | 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | length | Identification .. + | length | n. of headers | length1 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | length2 | Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -528,11 +530,19 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. | Setup .. + .. Identification | Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment | Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. Setup | + .. Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 5: Packed Configuration Figure @@ -542,16 +552,6 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 set to 0 since the packet bears the full Packed configuration, the number of packet is set to 1. -3.2. Out of Band Transmission - - This section, as stated above, does not cover all the possible out- - of-band delivery methods since they rely on different protocols and - are linked to specific applications. The following packet definition - SHOULD be used in out-of-band delivery and MUST be used when - Configuration is inlined in the SDP. - - - @@ -561,6 +561,14 @@ Barbato Expires November 5, 2007 [Page 10] Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 +3.2. Out of Band Transmission + + This section, as stated above, does not cover all the possible out- + of-band delivery methods since they rely on different protocols and + are linked to specific applications. The following packet definition + SHOULD be used in out-of-band delivery and MUST be used when + Configuration is inlined in the SDP. + 3.2.1. Packed Headers As mentioned above the RECOMMENDED delivery vector for Vorbis @@ -588,15 +596,44 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 length there is only a 2 byte length tag to define the length of the packed headers. + + + + + + + + + + + + + + + + +Barbato Expires November 5, 2007 [Page 11] + +Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 + + 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Ident | .. + | Ident | length1 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 0xff | length2 | Identification Header .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. length | Identification Header .. + ................................................................. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Configuration Header .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + ................................................................. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Configuration Header | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Setup Header .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Setup Header | @@ -605,17 +642,8 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 Figure 7: Packed Headers Detail The key difference between the in-band format and this one, is there - is no need for the payload header octet. - - - - - - -Barbato Expires November 5, 2007 [Page 11] - -Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 - + is no need for the payload header octet. In this figure the comment + has a size bigger than 255 bytes. 3.3. Loss of Configuration Headers @@ -636,6 +664,15 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 ignore it completely. The details on the format of the comments can be found in the Vorbis documentation [12]. + + + + +Barbato Expires November 5, 2007 [Page 12] + +Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 + + 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -664,15 +701,6 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 fragmented. - - - - -Barbato Expires November 5, 2007 [Page 12] - -Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 - - 5. Frame Packetization Each RTP packet contains either one Vorbis packet fragment, or an @@ -693,34 +721,6 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 correct sequence for fragmented packet reception the timestamp field of fragmented packets MUST be the same as the first packet sent, with the sequence number incremented as normal for the subsequent RTP - packets. The length field shows the fragment length. - -5.1. Example Fragmented Vorbis Packet - - Here is an example fragmented Vorbis packet split over three RTP - packets. Each packet contains the standard RTP headers as well as - the 4 octets Vorbis headers. - - - - - - - - - - - - - - - - - - - - - @@ -729,6 +729,14 @@ Barbato Expires November 5, 2007 [Page 13] Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 + packets. The length field shows the fragment length. + +5.1. Example Fragmented Vorbis Packet + + Here is an example fragmented Vorbis packet split over three RTP + packets. Each packet contains the standard RTP headers as well as + the 4 octets Vorbis headers. + Packet 1: 0 1 2 3 @@ -772,14 +780,6 @@ Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 - - - - - - - - Barbato Expires November 5, 2007 [Page 14] Internet-Draft draft-ietf-avt-rtp-vorbis-04 May 2007 diff --git a/doc/draft-ietf-avt-rtp-vorbis-04.xml b/doc/draft-ietf-avt-rtp-vorbis-04.xml index 74960c2..6ceafea 100644 --- a/doc/draft-ietf-avt-rtp-vorbis-04.xml +++ b/doc/draft-ietf-avt-rtp-vorbis-04.xml @@ -438,9 +438,8 @@ re-transmission of the configuration headers. A Vorbis Packed Configuration is indicated with the Vorbis Data Type field set to 1. Of the three headers, defined in the Vorbis I specification, the -identification and the setup MUST be packed together, while the comment header -MUST be completely suppressed. It is up to the client to provide a minimal size -comment header to the decoder if required by the implementation. +identification and the setup MUST be packed together as they are, while the comment header MAY be replaced with a dummy one. +The packed configuration follows a generic way to store xiph codec configurations: the first byte stores the number of following packets minus one, the next bytes represent the size of the packets, every byte set to 0xff means that the next byte has to be add to the current sum in order to have the complete size; the headers immediately follows the list of sizes. The headers are packed in the same order they are present in ogg: identification, comment, setup.
@@ -460,7 +459,9 @@ comment header to the decoder if required by the implementation. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ident | 0 | 1 | 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | length | Identification .. + | length | n. of headers | length1 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | length2 | Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -468,11 +469,19 @@ comment header to the decoder if required by the implementation. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. | Setup .. + .. Identification | Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Comment | Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. Setup | + .. Setup .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ]]>
@@ -485,7 +494,6 @@ packet bears the full Packed configuration, the number of packet is set to 1. - This section, as stated above, does not cover all the possible out-of-band delivery methods since they rely on different protocols and are linked to @@ -529,12 +537,20 @@ there is only a 2 byte length tag to define the length of the packed headers. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | Ident | .. + | Ident | length1 | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | 0xff | length2 | Identification Header .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - .. length | Identification Header .. + ................................................................. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Identification Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Configuration Header .. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + ................................................................. + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + .. Configuration Header | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Setup Header .. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .. Setup Header | @@ -543,7 +559,7 @@ there is only a 2 byte length tag to define the length of the packed headers. The key difference between the in-band format and this one, is there is no need -for the payload header octet. +for the payload header octet. In this figure the comment has a size bigger than 255 bytes. -- 2.7.4