|
|
This class holds a single SDP media description
SDPMedia (const char* media, const char* transport, const char* formats,
int rport = -1, int lport = -1)
| SDPMedia |
Constructor
Parameters:
media | Media type name |
transport | Transport name |
formats | Comma separated list of formats |
rport | Optional remote media port |
lport | Optional local media port |
~SDPMedia ()
| ~SDPMedia |
[virtual]
Destructor
inline bool isAudio ()
| isAudio |
[const]
Check if this media type is audio
Returns: True if this media describe an audio one
inline bool isModified ()
| isModified |
[const]
Check if a media parameter changed
Returns: True if a media changed
inline void setModified (bool modified = true)
| setModified |
Set or reset media parameter changed flag
Parameters:
modified | The new value of the media parameter changed flag |
inline const String& suffix ()
| suffix |
[const]
Retrieve the media suffix (built from type)
Returns: Media suffix
inline const String& transport ()
| transport |
[const]
Retrieve the media transport name
Returns: The media transport name
inline const String& id ()
| id |
[const]
Retrieve the media id
Returns: The media id
inline const String& format ()
| format |
[const]
Retrieve the current media format
Returns: The current media format
inline const String& formats ()
| formats |
[const]
Retrieve the formats set for this media
Returns: Comma separated list of media formats
inline const String& remotePort ()
| remotePort |
[const]
Retrieve the remote media port
Returns: The remote media port
inline const String& localPort ()
| localPort |
[const]
Retrieve the local media port
Returns: The local media port
inline const String& mappings ()
| mappings |
[const]
Retrieve rtp payload mappings
Returns: Rtp payload mappings
inline void mappings (const char* newMap)
| mappings |
Set rtp payload mappings for this media
Parameters:
newMap | New rtp payload mappings |
inline const String& rfc2833 ()
| rfc2833 |
[const]
Retrieve RFC2833 status or payload of this media
Returns: RFC2833 status or payload of this media
inline void rfc2833 (int payload)
| rfc2833 |
Set RFC2833 status or payload of this media
Parameters:
payload | SDP numeric payload to set. Set it to a negative value to reset RFC2833 |
inline const String& remoteCrypto ()
| remoteCrypto |
[const]
Retrieve remote crypto description
Returns: Remote crypto description
inline const String& localCrypto ()
| localCrypto |
[const]
Retrieve local crypto description
Returns: Local crypto description
inline bool securable ()
| securable |
[const]
Check if this media is securable
Returns: True if this media is securable
inline bool sameAs (const SDPMedia* other, bool ignorePort = false)
| sameAs |
[const]
Compare this media with another one
Parameters:
other | The media to compare with |
ignorePort | Ignore differences caused only by port number |
Returns: True if both media have the same formats, transport and remote port
inline bool localChanged ()
| localChanged |
[const]
Check if local part of this media changed
Returns: True if local part of this media changed
inline void setLocalChanged (bool chg = false)
| setLocalChanged |
Set or reset local media changed flag
Parameters:
chg | The new value for local media changed flag |
const char* fmtList ()
| fmtList |
[const]
Retrieve a formats list from this media
Returns: Comma separated list of media formats (from formats list, current format or a default G711, 'alaw,mulaw', list
bool update (const char* formats, int rport = -1, int lport = -1)
| update |
Update this media from formats and ports
Parameters:
formats | New media formats |
rport | Optional remote media port |
lport | Optional local media port |
Returns: True if media changed
void update (const NamedList& msg, bool pickFormat)
| update |
Update from a chan.rtp message (rtp id and local port)
Parameters:
msg | The list of parameters |
pickFormat | True to update media format(s) from the list |
void parameter (const char* name, const char* value, bool append)
| parameter |
Add or replace a parameter by name and value, set the modified flag
Parameters:
name | Parameter name |
value | Parameter value |
append | True to append, false to replace |
void parameter (NamedString* param, bool append)
| parameter |
Add or replace a parameter, set the modified flag
Parameters:
param | The parameter |
append | True to append, false to replace |
void crypto (const char* desc, bool remote)
| crypto |
Set a new crypto description, set the modified flag if changed. Reset the media securable flag if the remote crypto is empty
Parameters:
desc | The new crypto description |
remote | True to set the remote crypto, false to set the local one |
void putMedia (NamedList& msg, bool putPort = true)
| putMedia |
Put this net media in a parameter list
Parameters:
msg | Destination list |
putPort | True to add remote media port |
Generated by: paulc on bussard on Tue Mar 8 18:42:27 2011, using kdoc 2.0a54. |