|
Yate
|
SDP media description. More...
#include <yatesdp.h>
Public Member Functions | |
| SDPMedia (const char *media, const char *transport, const char *formats, int rport=-1, int lport=-1) | |
| virtual | ~SDPMedia () |
| bool | isAudio () const |
| bool | isModified () const |
| void | setModified (bool modified=true) |
| const String & | suffix () const |
| const String & | transport () const |
| const String & | id () const |
| const String & | format () const |
| const String & | formats () const |
| const String & | remotePort () const |
| const String & | localPort () const |
| const String & | mappings () const |
| void | mappings (const char *newMap) |
| const String & | rfc2833 () const |
| void | rfc2833 (int payload) |
| const String & | remoteCrypto () const |
| const String & | localCrypto () const |
| bool | securable () const |
| bool | sameAs (const SDPMedia *other, bool ignorePort=false) const |
| bool | localChanged () const |
| void | setLocalChanged (bool chg=false) |
| const char * | fmtList () const |
| bool | update (const char *formats, int rport=-1, int lport=-1, bool force=false) |
| void | update (const NamedList &msg, bool pickFormat) |
| void | parameter (const char *name, const char *value, bool append) |
| void | parameter (NamedString *param, bool append) |
| void | crypto (const char *desc, bool remote) |
| void | putMedia (NamedList &msg, bool putPort=true) |
SDP media description.
This class holds a single SDP media description
| SDPMedia | ( | const char * | media, |
| const char * | transport, | ||
| const char * | formats, | ||
| int | rport = -1, |
||
| int | lport = -1 |
||
| ) |
Constructor
| media | Media type name |
| transport | Transport name |
| formats | Comma separated list of formats |
| rport | Optional remote media port |
| lport | Optional local media port |
| virtual ~SDPMedia | ( | ) | [virtual] |
Destructor
| void crypto | ( | const char * | desc, |
| bool | remote | ||
| ) |
Set a new crypto description, set the modified flag if changed. Reset the media securable flag if the remote crypto is empty
| desc | The new crypto description |
| remote | True to set the remote crypto, false to set the local one |
| const char* fmtList | ( | ) | const |
Retrieve a formats list from this media
Retrieve the current media format
Retrieve the formats set for this media
Referenced by SDPMedia::sameAs().
| bool isAudio | ( | ) | const [inline] |
Check if this media type is audio
| bool isModified | ( | ) | const [inline] |
Check if a media parameter changed
| bool localChanged | ( | ) | const [inline] |
Check if local part of this media changed
| const String& localCrypto | ( | ) | const [inline] |
Retrieve local crypto description
Retrieve the local media port
Retrieve rtp payload mappings
| void mappings | ( | const char * | newMap | ) | [inline] |
Set rtp payload mappings for this media
| newMap | New rtp payload mappings |
| void parameter | ( | const char * | name, |
| const char * | value, | ||
| bool | append | ||
| ) |
Add or replace a parameter by name and value, set the modified flag
| name | Parameter name |
| value | Parameter value |
| append | True to append, false to replace |
| void parameter | ( | NamedString * | param, |
| bool | append | ||
| ) |
Add or replace a parameter, set the modified flag
| param | The parameter |
| append | True to append, false to replace |
Put this net media in a parameter list
| msg | Destination list |
| putPort | True to add remote media port |
| const String& remoteCrypto | ( | ) | const [inline] |
Retrieve remote crypto description
| const String& remotePort | ( | ) | const [inline] |
Retrieve RFC2833 status or payload of this media
| void rfc2833 | ( | int | payload | ) | [inline] |
Set RFC2833 status or payload of this media
| payload | SDP numeric payload to set. Set it to a negative value to reset RFC2833 |
References String::boolText().
Compare this media with another one
| other | The media to compare with |
| ignorePort | Ignore differences caused only by port number |
References SDPMedia::formats(), SDPMedia::remotePort(), and SDPMedia::transport().
| bool securable | ( | ) | const [inline] |
Check if this media is securable
| void setLocalChanged | ( | bool | chg = false | ) | [inline] |
Set or reset local media changed flag
| chg | The new value for local media changed flag |
| void setModified | ( | bool | modified = true | ) | [inline] |
Set or reset media parameter changed flag
| modified | The new value of the media parameter changed flag |
Retrieve the media suffix (built from type)
Retrieve the media transport name
Referenced by SDPMedia::sameAs().
| bool update | ( | const char * | formats, |
| int | rport = -1, |
||
| int | lport = -1, |
||
| bool | force = false |
||
| ) |
Update this media from formats and ports
| formats | New media formats |
| rport | Optional remote media port |
| lport | Optional local media port |
| force | Force updating formats even if incompatible with old ones |
Update from a chan.rtp message (rtp id and local port)
| msg | The list of parameters |
| pickFormat | True to update media format(s) from the list |
1.7.6.1