JRTPLIB  3.9.0
Public Types | Public Member Functions | List of all members
jrtplib::RTCPSDESPacket Class Reference

Describes an RTCP source description packet. More...

#include <rtcpsdespacket.h>

Inheritance diagram for jrtplib::RTCPSDESPacket:
Inheritance graph
[legend]
Collaboration diagram for jrtplib::RTCPSDESPacket:
Collaboration graph
[legend]

Public Types

enum  ItemType {
  None, CNAME, NAME, EMAIL,
  PHONE, LOC, TOOL, NOTE,
  PRIV, Unknown
}
 Identifies the type of an SDES item. More...
 
- Public Types inherited from jrtplib::RTCPPacket
enum  PacketType {
  SR, RR, SDES, BYE,
  APP, Unknown
}
 Identifies the specific kind of RTCP packet. More...
 

Public Member Functions

 RTCPSDESPacket (uint8_t *data, size_t datalen)
 Creates an instance based on the data in data with length datalen. More...
 
int GetChunkCount () const
 Returns the number of SDES chunks in the SDES packet. More...
 
bool GotoFirstChunk ()
 Starts the iteration over the chunks. More...
 
bool GotoNextChunk ()
 Sets the current chunk to the next available chunk. More...
 
uint32_t GetChunkSSRC () const
 Returns the SSRC identifier of the current chunk. More...
 
bool GotoFirstItem ()
 Starts the iteration over the SDES items in the current chunk. More...
 
bool GotoNextItem ()
 Advances the iteration to the next item in the current chunk. More...
 
ItemType GetItemType () const
 Returns the SDES item type of the current item in the current chunk. More...
 
size_t GetItemLength () const
 Returns the item length of the current item in the current chunk. More...
 
uint8_t * GetItemData ()
 Returns the item data of the current item in the current chunk. More...
 
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.
 
- Public Member Functions inherited from jrtplib::RTCPPacket
bool IsKnownFormat () const
 Returns true if the subclass was able to interpret the data and false otherwise. More...
 
PacketType GetPacketType () const
 Returns the actual packet type which the subclass implements. More...
 
uint8_t * GetPacketData ()
 Returns a pointer to the data of this RTCP packet. More...
 
size_t GetPacketLength () const
 Returns the length of this RTCP packet. More...
 

Detailed Description

Member Enumeration Documentation

Enumerator
None 

Used when the iteration over the items has finished.

CNAME 

Used for a CNAME (canonical name) item.

NAME 

Used for a NAME item.

EMAIL 

Used for an EMAIL item.

PHONE 

Used for a PHONE item.

LOC 

Used for a LOC (location) item.

TOOL 

Used for a TOOL item.

NOTE 

Used for a NOTE item.

PRIV 

Used for a PRIV item.

Unknown 

Used when there is an item present, but the type is not recognized.

Constructor & Destructor Documentation

jrtplib::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.

Member Function Documentation

int jrtplib::RTCPSDESPacket::GetChunkCount ( ) const
inline

Returns the number of SDES chunks in the SDES packet. Each chunk has its own SSRC identifier.

Referenced by GotoFirstChunk(), and GotoNextChunk().

uint32_t jrtplib::RTCPSDESPacket::GetChunkSSRC ( ) const
inline
uint8_t * jrtplib::RTCPSDESPacket::GetItemData ( )
inline
size_t jrtplib::RTCPSDESPacket::GetItemLength ( ) const
inline

References None.

RTCPSDESPacket::ItemType jrtplib::RTCPSDESPacket::GetItemType ( ) const
inline

References CNAME, EMAIL, LOC, NAME, None, NOTE, PHONE, PRIV, TOOL, and Unknown.

bool jrtplib::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.

References GetChunkCount().

bool jrtplib::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 jrtplib::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.

References GetChunkCount().

bool jrtplib::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.


The documentation for this class was generated from the following file: