|
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, const char *bitRate=0) |
| void | reset () |
| void | setMedia (const JGRtpMediaList &src, const String &only=String::empty()) |
| void | filterMedia (const String &only) |
| 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 Member Functions inherited from ObjList | |
| ObjList () | |
| virtual | ~ObjList () |
| virtual void * | getObject (const String &name) const |
| unsigned int | length () const |
| unsigned int | count () const |
| GenObject * | get () const |
| GenObject * | set (const GenObject *obj, bool delold=true) |
| ObjList * | next () const |
| ObjList * | last () const |
| ObjList * | skipNull () const |
| ObjList * | skipNext () const |
| GenObject * | at (int index) const |
| ObjList * | operator+ (int index) const |
| GenObject * | operator[] (signed int index) const |
| GenObject * | operator[] (unsigned int index) const |
| GenObject * | operator[] (const String &str) const |
| ObjList * | find (const GenObject *obj) const |
| ObjList * | find (const String &str) const |
| int | index (const GenObject *obj) const |
| int | index (const String &str) const |
| ObjList * | insert (const GenObject *obj, bool compact=true) |
| ObjList * | append (const GenObject *obj, bool compact=true) |
| ObjList * | setUnique (const GenObject *obj, bool compact=true) |
| GenObject * | remove (bool delobj=true) |
| GenObject * | remove (GenObject *obj, bool delobj=true) |
| GenObject * | remove (const String &str, bool delobj=true) |
| void | clear () |
| void | compact () |
| bool | autoDelete () |
| void | setDelete (bool autodelete) |
| void | sort (int(*callbackCompare)(GenObject *obj1, GenObject *obj2, void *context), void *context=0) |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual void | destruct () |
| virtual const String & | toString () const |
| virtual const String & | traceId () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
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 [] |
Additional Inherited Members | |
Static Public Member Functions inherited from ObjList | |
| static const ObjList & | empty () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
A List of Jingle RTP data payloads.
Hold a list of RTP data payloads
|
inline |
Constructor
| m | Media type as enumeration |
| cryptoRequired | True to require media encryption |
References m_bandwidth, m_cryptoRequired, m_media, m_ready, m_telEvent, and m_telEventName.
Referenced by setMedia().
|
inline |
Destructor
References m_bandwidth.
|
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) |
| bitRate | Optional "bitrate" attribute |
References ObjList::append().
| 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 |
| void filterMedia | ( | const String & | only | ) |
Filter media list preserving only some formats
| only | List of synonyms to preserve, do not filter media if this parameter is empty |
| 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 |
|
inline |
| 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 |
References String::empty(), and JGRtpMediaList().
| XmlElement * toXml | ( | ) | const |
Create a 'description' element and add payload children to it
| NamedString* m_bandwidth |
Optional SDP media bandwith. The name of the string keeps the type ('bwtype') and its value keeps the actual bandwith
Referenced by JGRtpMediaList(), and ~JGRtpMediaList().
| bool m_cryptoRequired |
Crypto (SRTP) params
Referenced by JGRtpMediaList().
| Media m_media |
The media type
Referenced by JGRtpMediaList(), and media().
| bool m_ready |
Flag indicating wether media was negotiated
Referenced by JGRtpMediaList().
| String m_ssrc |
Synchronization source
| int m_telEvent |
Telephone event payload id
Referenced by JGRtpMediaList().
| String m_telEventName |
Telephone event payload name
Referenced by JGRtpMediaList().
| String m_telEventName2 |
Second telephone event payload name
|
static |
The list of media type names