fm.liveswitch.RtpPacket Class Reference

An RTP packet. More...

Public Member Functions

fm.liveswitch.DataBuffer getBuffer ()
 Gets the buffer. More...
 
int getContributingSourceCount ()
 Gets the number of fm.liveswitch.RtpPacket#getContributingSources. More...
 
long[] getContributingSources ()
 Gets the contributing sources. More...
 
int getContributingSourcesLength ()
 Gets the length of the fm.liveswitch.RtpPacket#getContributingSources in bytes. More...
 
int getContributingSourcesOffset ()
 Gets the offset of the fm.liveswitch.RtpPacket#getContributingSources array. More...
 
boolean getExtension ()
 Gets a value indicating whether this fm.liveswitch.RtpPacket has a header extension. More...
 
fm.liveswitch.DataBuffer getHeader ()
 Gets the header. More...
 
fm.liveswitch.DataBuffer getHeaderExtension ()
 Gets the header extension. More...
 
int getHeaderExtensionId ()
 Gets the header extension ID. More...
 
int getHeaderExtensionLength ()
 Gets the length of the fm.liveswitch.RtpPacket#getHeaderExtension in bytes. More...
 
int getHeaderExtensionOffset ()
 Gets the offset of the fm.liveswitch.RtpPacket#getHeaderExtensionId. More...
 
int getHeaderLength ()
 Gets the length of the fixed and variable headers. More...
 
boolean getMarker ()
 Gets a value indicating whether this fm.liveswitch.RtpPacket has the marker flag set. More...
 
boolean getPadding ()
 Gets a value indicating whether this fm.liveswitch.RtpPacket is padded. More...
 
int getPaddingLength ()
 Gets the padding length. More...
 
fm.liveswitch.DataBuffer getPayload ()
 Gets the packet payload. More...
 
int getPayloadLength ()
 Gets the length of the fm.liveswitch.RtpPacket#getPayload. More...
 
int getPayloadOffset ()
 Gets the offset of the fm.liveswitch.RtpPacket#getPayload. 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 getVariableHeaderLength ()
 Gets the length of the variable header. More...
 
int getVersion ()
 Gets the version. More...
 
 RtpPacket ()
 Initializes a new instance of the fm.liveswitch.RtpPacket class. More...
 
 RtpPacket (fm.liveswitch.DataBuffer payload)
 Initializes a new instance of the fm.liveswitch.RtpPacket class. More...
 
void setContributingSources (long[] value)
 Sets the contributing sources. More...
 
void setHeaderExtension (fm.liveswitch.DataBuffer value)
 Sets the header extension. More...
 
void setHeaderExtensionId (int value)
 Sets the header extension ID. More...
 
void setMarker (boolean value)
 Sets a value indicating whether this fm.liveswitch.RtpPacket has the marker flag set. More...
 
void setPadding (boolean value)
 Sets a value indicating whether this fm.liveswitch.RtpPacket is padded. More...
 
void setPayload (fm.liveswitch.DataBuffer value)
 Sets the packet payload. 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. More...
 

Static Public Member Functions

static int getFixedHeaderLength ()
 Gets the length of the fixed header. More...
 
static int getSequenceNumberDelta (int sequenceNumber, int lastSequenceNumber)
 Retrieves the difference between two sequence numbers while accounting for overflow rollover. More...
 
static fm.liveswitch.RtpPacket wrap (fm.liveswitch.DataBuffer buffer)
 Parses the specified buffer. More...
 

Detailed Description

An RTP packet.

Constructor & Destructor Documentation

◆ RtpPacket() [1/2]

fm.liveswitch.RtpPacket.RtpPacket ( )

Initializes a new instance of the fm.liveswitch.RtpPacket class.

◆ RtpPacket() [2/2]

fm.liveswitch.RtpPacket.RtpPacket ( fm.liveswitch.DataBuffer  payload)

Initializes a new instance of the fm.liveswitch.RtpPacket class.

Parameters
payloadThe payload for the RTP packet.

Member Function Documentation

◆ getBuffer()

fm.liveswitch.DataBuffer fm.liveswitch.RtpPacket.getBuffer ( )

Gets the buffer.

◆ getContributingSourceCount()

int fm.liveswitch.RtpPacket.getContributingSourceCount ( )

◆ getContributingSources()

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

Gets the contributing sources.

◆ getContributingSourcesLength()

int fm.liveswitch.RtpPacket.getContributingSourcesLength ( )

Gets the length of the fm.liveswitch.RtpPacket#getContributingSources in bytes.

◆ getContributingSourcesOffset()

int fm.liveswitch.RtpPacket.getContributingSourcesOffset ( )

Gets the offset of the fm.liveswitch.RtpPacket#getContributingSources array.

◆ getExtension()

boolean fm.liveswitch.RtpPacket.getExtension ( )

Gets a value indicating whether this fm.liveswitch.RtpPacket has a header extension.

If the extension bit is set, the fixed header MUST be followed by exactly one header extension.

◆ getFixedHeaderLength()

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

Gets the length of the fixed header.

◆ getHeader()

fm.liveswitch.DataBuffer fm.liveswitch.RtpPacket.getHeader ( )

Gets the header.

◆ getHeaderExtension()

fm.liveswitch.DataBuffer fm.liveswitch.RtpPacket.getHeaderExtension ( )

Gets the header extension.

◆ getHeaderExtensionId()

int fm.liveswitch.RtpPacket.getHeaderExtensionId ( )

Gets the header extension ID.

◆ getHeaderExtensionLength()

int fm.liveswitch.RtpPacket.getHeaderExtensionLength ( )

Gets the length of the fm.liveswitch.RtpPacket#getHeaderExtension in bytes.

◆ getHeaderExtensionOffset()

int fm.liveswitch.RtpPacket.getHeaderExtensionOffset ( )

◆ getHeaderLength()

int fm.liveswitch.RtpPacket.getHeaderLength ( )

Gets the length of the fixed and variable headers.

◆ getMarker()

boolean fm.liveswitch.RtpPacket.getMarker ( )

Gets a value indicating whether this fm.liveswitch.RtpPacket has the marker flag set.

◆ getPadding()

boolean fm.liveswitch.RtpPacket.getPadding ( )

Gets a value indicating whether this fm.liveswitch.RtpPacket is padded.

◆ getPaddingLength()

int fm.liveswitch.RtpPacket.getPaddingLength ( )

Gets the padding length.

◆ getPayload()

fm.liveswitch.DataBuffer fm.liveswitch.RtpPacket.getPayload ( )

Gets the packet payload.

◆ getPayloadLength()

int fm.liveswitch.RtpPacket.getPayloadLength ( )

Gets the length of the fm.liveswitch.RtpPacket#getPayload.

◆ getPayloadOffset()

int fm.liveswitch.RtpPacket.getPayloadOffset ( )

Gets the offset of the fm.liveswitch.RtpPacket#getPayload.

◆ getPayloadType()

int fm.liveswitch.RtpPacket.getPayloadType ( )

Gets the payload type.

◆ getSequenceNumber()

int fm.liveswitch.RtpPacket.getSequenceNumber ( )

Gets the sequence number.

◆ getSequenceNumberDelta()

static int fm.liveswitch.RtpPacket.getSequenceNumberDelta ( int  sequenceNumber,
int  lastSequenceNumber 
)
static

Retrieves the difference between two sequence numbers while accounting for overflow rollover.

Parameters
sequenceNumberThe current sequence number.
lastSequenceNumberThe last (previous) sequence number.
Returns
The difference between the two sequence numbers.

◆ getSynchronizationSource()

long fm.liveswitch.RtpPacket.getSynchronizationSource ( )

Gets the synchronization source.

◆ getTimestamp()

long fm.liveswitch.RtpPacket.getTimestamp ( )

Gets the timestamp.

◆ getVariableHeaderLength()

int fm.liveswitch.RtpPacket.getVariableHeaderLength ( )

Gets the length of the variable header.

◆ getVersion()

int fm.liveswitch.RtpPacket.getVersion ( )

Gets the version.

This field identifies the version of RTP. The version defined by this specification is two(2). (The value 1 is used by the first draft version of RTP and the value 0 is used by the protocol initially implemented in the "vat" audio tool.)

◆ setContributingSources()

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

Sets the contributing sources.

◆ setHeaderExtension()

void fm.liveswitch.RtpPacket.setHeaderExtension ( fm.liveswitch.DataBuffer  value)

Sets the header extension.

◆ setHeaderExtensionId()

void fm.liveswitch.RtpPacket.setHeaderExtensionId ( int  value)

Sets the header extension ID.

◆ setMarker()

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

Sets a value indicating whether this fm.liveswitch.RtpPacket has the marker flag set.

◆ setPadding()

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

Sets a value indicating whether this fm.liveswitch.RtpPacket is padded.

◆ setPayload()

void fm.liveswitch.RtpPacket.setPayload ( fm.liveswitch.DataBuffer  value)

Sets the packet payload.

◆ setPayloadType()

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

Sets the payload type.

◆ setSequenceNumber()

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

Sets the sequence number.

◆ setSynchronizationSource()

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

Sets the synchronization source.

◆ setTimestamp()

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

Sets the timestamp.

◆ setVersion()

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

Sets the version.

This field identifies the version of RTP. The version defined by this specification is two(2). (The value 1 is used by the first draft version of RTP and the value 0 is used by the protocol initially implemented in the "vat" audio tool.)

◆ wrap()

static fm.liveswitch.RtpPacket fm.liveswitch.RtpPacket.wrap ( fm.liveswitch.DataBuffer  buffer)
static

Parses the specified buffer.

Parameters
bufferThe buffer.
Returns
Rtp.Packet