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

📄 draft-barbato-avt-rtp-theora-01.txt

📁 mediastreamer2是开源的网络传输媒体流的库
💻 TXT
📖 第 1 页 / 共 4 页
字号:
   in the last byte of a packet is always zeroed during the encoding   process.  Thus, should this unused space be read, it will return   binary zeros.   For payloads which consist of multiple Theora packets the payload   data consists of the payload length field followed by the first   Theora packet's data, then the payload length followed by the second   Theora packet, and so on for each of the Theora packets in the   payload.2.4.  Example RTP Packet   Here is an example RTP packet containing two Theora packets.   RTP Packet Header:       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      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      | 2 |0|0|  0    |0|      PT     |       sequence number         |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                           timestamp                           |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |          synchronisation source (SSRC) identifier             |      +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+      |            contributing source (CSRC) identifiers             |      |                              ...                              |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Figure 4: Example RTP Packet   Payload Data:Barbato                 Expires December 18, 2006               [Page 7]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 2006       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      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               Configuration Ident             | 0 | 0 | 2 pks |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |        Payload Length         |                              ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                        Theora data                          ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..           data               |        Payload Length         |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                        Theora data                           |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Figure 5: Example Theora Payload Packet   The payload portion of the packet begins with the 24 bit   Configuration ident field followed by 8 bits describing the payload.   The Fragment type field is set to 0, indicating that this packet   contains whole Theora frame data.  The Data type field is set to 0   since it is theora raw data.  The number of whole Theora data packets   is set to 2.   Each of the payload blocks starts with the two octets length field   followed by the variable length Theora packet data.3.  Configuration Headers   To decode a Theora stream three configuration header packets are   needed.  The first, called the Identification Header, indicates the   frame dimensions, quality, blocks used and the version of the Theora   encoder used.  The second, called the Comment Header, contains stream   metadata and the third, called the Setup Header, contains details of   the dequantization and Huffman tables.   Since this information must be transmitted reliably, and as the RTP   stream may change certain configuration data mid-session, there are   different methods for delivering this configuration data to a client,   both in-band and out-of-band which are detailed below.  SDP delivery   is used to set up an initial state for the client application.  The   changes may be due to different dequantization and Huffman tables as   well as different bitrates of the stream.   The delivery vectors in use are specified by an SDP attribute to   indicate the method and the optional URI where the Theora Packed   Configuration (Section 3.1.1) Packets could be fetched.  Different   delivery methods MAY be advertised for the same session.  The in-bandBarbato                 Expires December 18, 2006               [Page 8]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 2006   codebook delivery SHOULD be considered as baseline, out-of-band   delivery methods that don't use RTP will not be described in this   document.  For non chained streams, the Configuration delivery method   RECOMMENDED is inline the Packed Configuration (Section 3.1.1) in the   SDP as explained in the IANA considerations (Section 6.1)   The 24 bit Ident field is used to map which Configuration will be   used to decode a packet.  When the Ident field changes, it indicates   that a change in the stream has taken place.  The client application   MUST have in advance the correct configuration and if the client   detects a change in the Ident value and does not have this   information it MUST NOT decode the raw data associated until it   fetches the correct Configuration.3.1.  In-band Header Transmission   The Packed Configuration (Section 3.1.1) Payload is sent in-band with   the packet type bits set to match the payload type.  Clients MUST be   capable of dealing with periodic re-transmission of the configuration   headers.3.1.1.  Packed Configuration   A Theora Packed Configuration is indicated with the payload type   field set to 1.  Of the three headers, defined in the Theora I   specification [16], the identification and the setup will be packed   together, the comment header is completely suppressed.  It is up to   the client to provide a minimal size comment header to the decoder if   required by the implementation.Barbato                 Expires December 18, 2006               [Page 9]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 2006       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      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |V=2|P|X|  CC   |M|     PT      |             xxxx              |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                             xxxxx                             |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |           synchronization source (SSRC) identifier            |      +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+      |            contributing source (CSRC) identifiers             |      |                              ...                              |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |               Configuration Ident             | 0 | 1 |      1|      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |             length            |          Identification      ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                        Identification                       ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                        Identification                       ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                        Identification                        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..              |                      Setup                   ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                            Setup                            ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                            Setup                             |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Figure 6: Packed Configuration Figure   The Ident field is set with the value that will be used by the Raw   Payload Packets to address this Configuration.  The Fragment type is   set to 0 since the packet bears the full Packed configuration, the   number of packet is set to 1.  In practice, Packed Headers usually   need to be fragmented to fit the path MTU.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   be 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.Barbato                 Expires December 18, 2006              [Page 10]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 20063.2.1.  Packed Headers   As mentioned above, the recommended delivery vector for Theora   configuration data is via a retrieval method that can be performed   using a reliable transport protocol.  As the RTP headers are not   required for this method of delivery the structure of the   configuration data is slightly different.  The packed header starts   with a 32 bit count field which details the number of packed headers   that are contained in the bundle.  Next is the Packed header payload   for each setup id.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                     Number of packed headers                  |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          Packed header                        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          Packed header                        |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Figure 7: Packed Headers Overview   Since the Configuration Ident and the Identification Header are fixed   length there is only a 16bit 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      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |            Configuration Ident                |              ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..   Length     |              Identification Header           ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                    Identification Header                     |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      |                          Setup Header                        ..      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+      ..                         Setup Header                         |      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   Figure 8: Packed Headers Detail   The key difference from the in-band format is that there is no need   for the payload header octet.Barbato                 Expires December 18, 2006              [Page 11]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 20063.2.1.1.  Packed Headers IANA Considerations   The following IANA considerations MUST only be applied to the packed   headers.   MIME media type name: audio   MIME subtype: theora-config   Required Parameters:      None   Optional Parameters:      None   Encoding considerations:      This media type contains binary data.   Security Considerations:      See Section 6 of RFC XXXX.   Interoperability considerations:      None   Published specification:      RFC XXXX [RFC Editor: please replace by the RFC number of this      memo, when published]   Applications which use this media type:      Theora encoded video, configuration data.   Additional information:      None   Person & email address to contact for further information:      Luca Barbato: <lu_zero@gentoo.org>      IETF Audio/Video Transport Working GroupBarbato                 Expires December 18, 2006              [Page 12]Internet-Draft       draft-barbato-avt-rtp-theora-01           June 2006   Intended usage: COMMON   Restriction on usage:      This media type does not depend on the transport.   Author:      Luca Barbato   Change controller:      IETF AVT Working Group3.3.  Loss of Configuration Headers   Unlike the loss of raw Theora payload data, the loss of a   configuration header can lead to a situation where it will not be   possible to successfully decode the stream.   A loss of a Configuration Packet results in the halting of stream   decoding and SHOULD be reported to the client as well as a loss   report sent via RTCP.4.  Comment Headers

⌨️ 快捷键说明

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