#include <rtcpsdespacket.h>
Inheritance diagram for RTCPSDESPacket:
Public Types | |
enum | ItemType { None, CNAME, NAME, EMAIL, PHONE, LOC, TOOL, NOTE, PRIV, Unknown } |
Identifies the type of an SDES item. More... | |
Public Member Functions | |
RTCPSDESPacket (uint8_t *data, size_t datalen) | |
Creates an instance based on the data in data with length datalen . | |
int | GetChunkCount () const |
Returns the number of SDES chunks in the SDES packet. | |
bool | GotoFirstChunk () |
Starts the iteration over the chunks. | |
bool | GotoNextChunk () |
Sets the current chunk to the next available chunk. | |
uint32_t | GetChunkSSRC () const |
Returns the SSRC identifier of the current chunk. | |
bool | GotoFirstItem () |
Starts the iteration over the SDES items in the current chunk. | |
bool | GotoNextItem () |
Advances the iteration to the next item in the current chunk. | |
ItemType | GetItemType () const |
Returns the SDES item type of the current item in the current chunk. | |
size_t | GetItemLength () const |
Returns the item length of the current item in the current chunk. | |
uint8_t * | GetItemData () |
Returns the item data of the current item in the current chunk. | |
size_t | GetPRIVPrefixLength () const |
If the current item is an SDES PRIV item, this function returns the length of the prefix string of the private item. | |
uint8_t * | GetPRIVPrefixData () |
If the current item is an SDES PRIV item, this function returns actual data of the prefix string. | |
size_t | GetPRIVValueLength () const |
If the current item is an SDES PRIV item, this function returns the length of the value string of the private item. | |
uint8_t * | GetPRIVValueData () |
If the current item is an SDES PRIV item, this function returns actual value data of the private item. |
RTCPSDESPacket::RTCPSDESPacket | ( | uint8_t * | data, | |
size_t | datalen | |||
) |
Creates an instance based on the data in data
with length datalen
. Since the data
pointer is referenced inside the class (no copy of the data is made) one must make sure that the memory it points to is valid as long as the class instance exists.
int RTCPSDESPacket::GetChunkCount | ( | ) | const [inline] |
Returns the number of SDES chunks in the SDES packet. Each chunk has its own SSRC identifier.
bool RTCPSDESPacket::GotoFirstChunk | ( | ) | [inline] |
Starts the iteration. If no SDES chunks are present, the function returns false
. Otherwise, it returns true
and sets the current chunk to be the first chunk.
bool RTCPSDESPacket::GotoNextChunk | ( | ) | [inline] |
Sets the current chunk to the next available chunk. If no next chunk is present, this function returns false
, otherwise it returns true
.
bool RTCPSDESPacket::GotoFirstItem | ( | ) | [inline] |
Starts the iteration over the SDES items in the current chunk. If no SDES items are present, the function returns false
. Otherwise, the function sets the current item to be the first one and returns true
.
bool RTCPSDESPacket::GotoNextItem | ( | ) | [inline] |
If there's another item in the chunk, the current item is set to be the next one and the function returns true
. Otherwise, the function returns false
.