Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Accessing an RTP packet

This page describes what information about the data in an RTP packet can be accessed. It also describes various types of RTCP packets used to carry a variety of data/control information.

The data to be sent to an application is preceded by the RTP header. The data and header are packed into an RTP packet. To send any additional information about the RTP packet, the header extension is used.

[Top]


Fixed header

An RTP packet's fixed header contains the following fields:

The format for a fixed header is depicted below:

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      |       sequence number         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           timestamp                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           synchronization source (SSRC) identifier            |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |            contributing source (CSRC) identifiers             |
   |                     ....(data is put here)                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

RRtpPacket class allows you to access and set the following fixed header fields for an RTP packet.

You can get the above RTP packet information if a call to IsOpen() returns ETrue.

[Top]


Header extension

To allow additional information to be carried in an RTP data header, an extension mechanism is provided. The header format would look like the following:

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      defined by profile       |           length              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        header extension                       |
   |                             ....                              |

RRtpHeaderExtension class allows you to set the header extension type. You can retrieve the extension type and a pointer descriptor representing the header extension data.

[Top]


Types of RTCP packets

The different types of RTCP packets are used to carry a variety of data/control information. They are described below:

  1. Receiver Report Packet: For reception statistics from senders who are not active, in combination with Send Report for active senders.

  2. Sender Report packet: For transmission and reception statistics from active senders.

  3. SDES (Source Description) packet: For sending source description items such as CNAME, NAME, EMAIL, PHONE etc.

  4. Bye packet: For indicating the end of participation.

  5. APP packet: For sending the application specific data.

[Top]


Contributed sources

A Contributed sources (CSRC) is a source of a stream of RTP packets that has contributed to the combined stream produced by an RTP mixer. The mixer inserts a list of the SSRC identifiers of the sources that contributed to the generation of a specific packet into the RTP header. This list is called the CSRC list.

For example, in an audio conferencing a mixer indicates all the speakers whose speech is combined to produce the outgoing packet. This allows the receiver to indicate the current speaker, even though all the audio packets contain the same SSRC identifier of that of the mixer.

RRtpCSRCs allows you to retrieve the number of CSRCs in a given RTP packet. Get a specific CSRC using Count() and index operator[] respectively.

TUint operator[](TUInt aIndex) const;

Specify the index value. 0 indicates the first CSRC.