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... | |
String | getId () |
Gets the Id of the Rtp Packet Header. 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... | |
An RTP packet header.
fm.liveswitch.RtpPacketHeader.RtpPacketHeader | ( | ) |
Creates a new instance of the fm.liveswitch.RtpPacketHeader class.
int fm.liveswitch.RtpPacketHeader.calculateHeaderLength | ( | ) |
Calculates the length of the header.
At least 12 bytes.
fm.liveswitch.RtpPacketHeader fm.liveswitch.RtpPacketHeader.clone | ( | ) |
Clones this instance.
int fm.liveswitch.RtpPacketHeader.getContributingSourceCount | ( | ) |
Gets the number of contributing sources.
long [] fm.liveswitch.RtpPacketHeader.getContributingSources | ( | ) |
Gets the contributing sources.
boolean fm.liveswitch.RtpPacketHeader.getExtension | ( | ) |
Gets if there is an extension.
|
static |
Gets the length of the fixed header.
fm.liveswitch.IRtpHeaderExtension fm.liveswitch.RtpPacketHeader.getHeaderExtension | ( | ) |
Gets the header extension.
String fm.liveswitch.RtpPacketHeader.getId | ( | ) |
Gets the Id of the Rtp Packet Header.
boolean fm.liveswitch.RtpPacketHeader.getMarker | ( | ) |
Gets if the marker bit is set.
boolean fm.liveswitch.RtpPacketHeader.getPadding | ( | ) |
Gets if the packet has padding.
int fm.liveswitch.RtpPacketHeader.getPaddingLength | ( | ) |
Gets the number of bytes of padding.
int fm.liveswitch.RtpPacketHeader.getPayloadType | ( | ) |
Gets the payload type.
int fm.liveswitch.RtpPacketHeader.getSequenceNumber | ( | ) |
Gets the sequence number.
long fm.liveswitch.RtpPacketHeader.getSynchronizationSource | ( | ) |
Gets the synchronization source.
long fm.liveswitch.RtpPacketHeader.getTimestamp | ( | ) |
Gets the timestamp.
int fm.liveswitch.RtpPacketHeader.getVersion | ( | ) |
Gets the version of the packet.
Should be 2.
|
static |
Reads a header from a buffer.
If padding exists, also calculates the padding length.
buffer | The source buffer |
void fm.liveswitch.RtpPacketHeader.setContributingSourceCount | ( | int | value | ) |
Sets the number of contributing sources.
void fm.liveswitch.RtpPacketHeader.setContributingSources | ( | long[] | value | ) |
Sets the contributing sources.
void fm.liveswitch.RtpPacketHeader.setHeaderExtension | ( | fm.liveswitch.IRtpHeaderExtension | value | ) |
Sets the header extension.
void fm.liveswitch.RtpPacketHeader.setMarker | ( | boolean | value | ) |
Sets if the marker bit is set.
void fm.liveswitch.RtpPacketHeader.setPadding | ( | boolean | value | ) |
Sets if the packet has padding.
void fm.liveswitch.RtpPacketHeader.setPayloadType | ( | int | value | ) |
Sets the payload type.
void fm.liveswitch.RtpPacketHeader.setSequenceNumber | ( | int | value | ) |
Sets the sequence number.
void fm.liveswitch.RtpPacketHeader.setSynchronizationSource | ( | long | value | ) |
Sets the synchronization source.
void fm.liveswitch.RtpPacketHeader.setTimestamp | ( | long | value | ) |
Sets the timestamp.
void fm.liveswitch.RtpPacketHeader.setVersion | ( | int | value | ) |
Sets the version of the packet.
Should be 2.
void fm.liveswitch.RtpPacketHeader.writeTo | ( | fm.liveswitch.DataBuffer | buffer, |
int | offset | ||
) |
Writes this header to a buffer starting at the offset.
buffer | The target buffer. |
offset | The starting offset. |