Yate
|
A List of Jingle RTP data payloads. More...
#include <yatejingle.h>
Public Types | |
enum | Media { MediaMissing = -1, MediaUnknown = 0, Audio = 1 } |
Public Member Functions | |
JGRtpMediaList (Media m=MediaMissing, bool cryptoRequired=false) | |
~JGRtpMediaList () | |
Media | media () const |
void | add (const char *id, const char *name, const char *clockrate, const char *synonym=0, const char *channels=0, const char *pTime=0, const char *maxPTime=0) |
void | reset () |
void | setMedia (const JGRtpMediaList &src, const String &only=String::empty()) |
JGRtpMedia * | findMedia (const String &id) |
JGRtpMedia * | findSynonym (const String &value) const |
XmlElement * | toXml () const |
void | fromXml (XmlElement *xml) |
bool | createList (String &dest, bool synonym, const char *sep=",") |
void | addTelEvent (XmlElement *xml, const char *name=0) const |
Public Attributes | |
Media | m_media |
String | m_ssrc |
NamedString * | m_bandwidth |
bool | m_cryptoRequired |
ObjList | m_cryptoLocal |
ObjList | m_cryptoRemote |
bool | m_ready |
int | m_telEvent |
String | m_telEventName |
String | m_telEventName2 |
Static Public Attributes | |
static const TokenDict | s_media [] |
A List of Jingle RTP data payloads.
Hold a list of RTP data payloads
enum Media |
Media type enumeration
JGRtpMediaList | ( | Media | m = MediaMissing , |
bool | cryptoRequired = false |
||
) | [inline] |
Constructor
m | Media type as enumeration |
cryptoRequired | True to require media encryption |
~JGRtpMediaList | ( | ) | [inline] |
Destructor
References TelEngine::destruct().
void add | ( | const char * | id, |
const char * | name, | ||
const char * | clockrate, | ||
const char * | synonym = 0 , |
||
const char * | channels = 0 , |
||
const char * | pTime = 0 , |
||
const char * | maxPTime = 0 |
||
) | [inline] |
Append a new data payload
id | The 'id' attribute |
name | The 'name' attribute |
clockrate | The 'clockrate' attribute |
synonym | Optional application synonym for the payload |
channels | Optional 'channels' attribute (the number of channels) |
pTime | Optional "ptime" attribute (packet time) |
maxPTime | Optional "maxptime" attribute (maximum packet time) |
void addTelEvent | ( | XmlElement * | xml, |
const char * | name = 0 |
||
) | const |
Build and add telephone-event media child to a parent xml element. Add a second telephone event media child if set
xml | Parent element |
name | Optional event name. Defaults to set event name |
bool createList | ( | String & | dest, |
bool | synonym, | ||
const char * | sep = "," |
||
) |
Create a list from data payloads
dest | Destination string |
synonym | True to create from synonyms, false to create from names |
sep | List item separator |
JGRtpMedia* findMedia | ( | const String & | id | ) |
Find a data payload by its id
id | Identifier of media to find |
JGRtpMedia* findSynonym | ( | const String & | value | ) | const |
Find a data payload by its synonym
value | The value to compare with |
void fromXml | ( | XmlElement * | xml | ) |
Fill this list from an XML element's children. Clear before attempting to fill
xml | The source XML element |
Get the media type of the payloads owned by this list
void reset | ( | ) |
Reset the list and data
void setMedia | ( | const JGRtpMediaList & | src, |
const String & | only = String::empty() |
||
) |
Set media type and payloads from another list
src | Media list to copy into this one |
only | Optional list of synonyms to set if found in src. Copy the whole list if this parameter is empty |
XmlElement* toXml | ( | ) | const |
Create a 'description' element and add payload children to it
Optional SDP media bandwith. The name of the string keeps the type ('bwtype') and its value keeps the actual bandwith
bool m_cryptoRequired |
Crypto (SRTP) params
bool m_ready |
Flag indicating wether media was negotiated
int m_telEvent |
Telephone event payload id
Telephone event payload name
Second telephone event payload name