Packet RTPPacket

File: src/inet/transportlayer/rtp/RTPPacket.msg

C++ definition

This class represents an RTP data packet. Real data can either be encapsulated, or simulated by adding length.

The following RTP header fields exist but aren't used: padding, extension, csrcCount. The csrcList can't be used because csrcCount is always 0.

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Fields:

Name Type Description
byteLength

12-byte fixed header

version uint8

The rtp version of this RTPPacket.

padding bool

Set to 1 if padding is used in this RTPPacket, 0 otherwise. This implementation doesn't use padding bytes, so it is always 0.

extension bool

Set to 1, if this RTPPacket contains an rtp header extension, 0 otherwise. This implementation doesn't support rtp header extensions, so it is always 0.

marker bool

The marker.

payloadType int8

The type of payload carried in this RTPPacket.

sequenceNumber uint16

The sequence number of this RTPPacket.

timeStamp uint32

The rtp time stamp of this RTPPacket.

ssrc uint32

The ssrc identifier of the creator of this RTPPacket.

csrc uint32[]

no mixers, no contributing sources

headerLength int
payloadLength int

Source code:

//
// This class represents an RTP data packet. Real data can either
// be encapsulated, or simulated by adding length.
//
// The following RTP header fields exist but aren't used:
// padding, extension, csrcCount. The csrcList can't be used
// because csrcCount is always 0.
//
packet RTPPacket
{
    @customize(true);  // see the generated C++ header for more info

    byteLength = RTPPACKET_FIX_HEADERLENGTH;  // 12-byte fixed header

    // The rtp version of this ~RTPPacket.
    uint8 version = 2;

    // Set to 1 if padding is used in this ~RTPPacket, 0 otherwise.
    // This implementation doesn't use padding bytes, so it is always 0.
    bool padding = false;

    // Set to 1, if this ~RTPPacket contains an rtp header extension, 0 otherwise.
    // This implementation doesn't support rtp header extensions, so it is always 0.
    bool extension = false;

    // The marker.
    bool marker = false;

    // The type of payload carried in this ~RTPPacket.
    int8 payloadType;

    // The sequence number of this ~RTPPacket.
    uint16 sequenceNumber;

    // The rtp time stamp of this ~RTPPacket.
    uint32 timeStamp;

    // The ssrc identifier of the creator of this ~RTPPacket.
    uint32 ssrc;

    // no mixers, no contributing sources
    uint32 csrc[];

    abstract int headerLength;

    abstract int payloadLength;
}