fm.liveswitch.RtpPacketHeader Class Reference

An RTP packet header. More...

Public Member Functions

int calculateHeaderLength ()
 Calculates the length of the header. More...
 
fm.liveswitch.RtpPacketHeader clone ()
 Clones this instance. More...
 
int getContributingSourceCount ()
 Gets the number of contributing sources. More...
 
long[] getContributingSources ()
 Gets the contributing sources. More...
 
boolean getExtension ()
 Gets if there is an extension. More...
 
fm.liveswitch.IRtpHeaderExtension getHeaderExtension ()
 Gets the header extension. More...
 
boolean getMarker ()
 Gets if the marker bit is set. More...
 
boolean getPadding ()
 Gets if the packet has padding. More...
 
int getPaddingLength ()
 Gets the number of bytes of padding. More...
 
int getPayloadType ()
 Gets the payload type. More...
 
int getSequenceNumber ()
 Gets the sequence number. More...
 
long getSynchronizationSource ()
 Gets the synchronization source. More...
 
long getTimestamp ()
 Gets the timestamp. More...
 
int getVersion ()
 Gets the version of the packet. More...
 
 RtpPacketHeader ()
 Creates a new instance of the fm.liveswitch.RtpPacketHeader class. More...
 
void setContributingSourceCount (int value)
 Sets the number of contributing sources. More...
 
void setContributingSources (long[] value)
 Sets the contributing sources. More...
 
void setHeaderExtension (fm.liveswitch.IRtpHeaderExtension value)
 Sets the header extension. More...
 
void setMarker (boolean value)
 Sets if the marker bit is set. More...
 
void setPadding (boolean value)
 Sets if the packet has padding. More...
 
void setPayloadType (int value)
 Sets the payload type. More...
 
void setSequenceNumber (int value)
 Sets the sequence number. More...
 
void setSynchronizationSource (long value)
 Sets the synchronization source. More...
 
void setTimestamp (long value)
 Sets the timestamp. More...
 
void setVersion (int value)
 Sets the version of the packet. More...
 
void writeTo (fm.liveswitch.DataBuffer buffer, int offset)
 Writes this header to a buffer starting at the offset. More...
 

Static Public Member Functions

static int getFixedHeaderLength ()
 Gets the length of the fixed header. More...
 
static fm.liveswitch.RtpPacketHeader readFrom (fm.liveswitch.DataBuffer buffer)
 Reads a header from a buffer. More...
 

Detailed Description

An RTP packet header.

Constructor & Destructor Documentation

◆ RtpPacketHeader()

fm.liveswitch.RtpPacketHeader.RtpPacketHeader ( )

Creates a new instance of the fm.liveswitch.RtpPacketHeader class.

Member Function Documentation

◆ calculateHeaderLength()

int fm.liveswitch.RtpPacketHeader.calculateHeaderLength ( )

Calculates the length of the header.

At least 12 bytes.

◆ clone()

fm.liveswitch.RtpPacketHeader fm.liveswitch.RtpPacketHeader.clone ( )

Clones this instance.

◆ getContributingSourceCount()

int fm.liveswitch.RtpPacketHeader.getContributingSourceCount ( )

Gets the number of contributing sources.

◆ getContributingSources()

long [] fm.liveswitch.RtpPacketHeader.getContributingSources ( )

Gets the contributing sources.

◆ getExtension()

boolean fm.liveswitch.RtpPacketHeader.getExtension ( )

Gets if there is an extension.

◆ getFixedHeaderLength()

static int fm.liveswitch.RtpPacketHeader.getFixedHeaderLength ( )
static

Gets the length of the fixed header.

◆ getHeaderExtension()

fm.liveswitch.IRtpHeaderExtension fm.liveswitch.RtpPacketHeader.getHeaderExtension ( )

Gets the header extension.

◆ getMarker()

boolean fm.liveswitch.RtpPacketHeader.getMarker ( )

Gets if the marker bit is set.

◆ getPadding()

boolean fm.liveswitch.RtpPacketHeader.getPadding ( )

Gets if the packet has padding.

◆ getPaddingLength()

int fm.liveswitch.RtpPacketHeader.getPaddingLength ( )

Gets the number of bytes of padding.

◆ getPayloadType()

int fm.liveswitch.RtpPacketHeader.getPayloadType ( )

Gets the payload type.

◆ getSequenceNumber()

int fm.liveswitch.RtpPacketHeader.getSequenceNumber ( )

Gets the sequence number.

◆ getSynchronizationSource()

long fm.liveswitch.RtpPacketHeader.getSynchronizationSource ( )

Gets the synchronization source.

◆ getTimestamp()

long fm.liveswitch.RtpPacketHeader.getTimestamp ( )

Gets the timestamp.

◆ getVersion()

int fm.liveswitch.RtpPacketHeader.getVersion ( )

Gets the version of the packet.

Should be 2.

◆ readFrom()

static fm.liveswitch.RtpPacketHeader fm.liveswitch.RtpPacketHeader.readFrom ( fm.liveswitch.DataBuffer  buffer)
static

Reads a header from a buffer.

If padding exists, also calculates the padding length.

Parameters
bufferThe source buffer

◆ setContributingSourceCount()

void fm.liveswitch.RtpPacketHeader.setContributingSourceCount ( int  value)

Sets the number of contributing sources.

◆ setContributingSources()

void fm.liveswitch.RtpPacketHeader.setContributingSources ( long[]  value)

Sets the contributing sources.

◆ setHeaderExtension()

void fm.liveswitch.RtpPacketHeader.setHeaderExtension ( fm.liveswitch.IRtpHeaderExtension  value)

Sets the header extension.

◆ setMarker()

void fm.liveswitch.RtpPacketHeader.setMarker ( boolean  value)

Sets if the marker bit is set.

◆ setPadding()

void fm.liveswitch.RtpPacketHeader.setPadding ( boolean  value)

Sets if the packet has padding.

◆ setPayloadType()

void fm.liveswitch.RtpPacketHeader.setPayloadType ( int  value)

Sets the payload type.

◆ setSequenceNumber()

void fm.liveswitch.RtpPacketHeader.setSequenceNumber ( int  value)

Sets the sequence number.

◆ setSynchronizationSource()

void fm.liveswitch.RtpPacketHeader.setSynchronizationSource ( long  value)

Sets the synchronization source.

◆ setTimestamp()

void fm.liveswitch.RtpPacketHeader.setTimestamp ( long  value)

Sets the timestamp.

◆ setVersion()

void fm.liveswitch.RtpPacketHeader.setVersion ( int  value)

Sets the version of the packet.

Should be 2.

◆ writeTo()

void fm.liveswitch.RtpPacketHeader.writeTo ( fm.liveswitch.DataBuffer  buffer,
int  offset 
)

Writes this header to a buffer starting at the offset.

Parameters
bufferThe target buffer.
offsetThe starting offset.