class SDPMedia

SDP media description. More...

Full nameTelEngine::SDPMedia
Definition#include <libs/ysdp/yatesdp.h>
InheritsTelEngine::NamedList [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed 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)

SDPMedia

Constructor

Parameters:
mediaMedia type name
transportTransport name
formatsComma separated list of formats
rportOptional remote media port
lportOptional 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  isVideo ()

isVideo

[const]

Check if this media type is video

Returns: True if this media describe a video 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:
modifiedThe 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:
newMapNew 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:
payloadSDP 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:
otherThe media to compare with
ignorePortIgnore 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:
chgThe 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, bool force = false)

update

Update this media from formats and ports

Parameters:
formatsNew media formats
rportOptional remote media port
lportOptional local media port
forceForce updating formats even if incompatible with old ones

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:
msgThe list of parameters
pickFormatTrue 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:
nameParameter name
valueParameter value
appendTrue to append, false to replace

void  parameter (NamedString* param, bool append)

parameter

Add or replace a parameter, set the modified flag

Parameters:
paramThe parameter
appendTrue 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:
descThe new crypto description
remoteTrue 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:
msgDestination list
putPortTrue to add remote media port


Generated by: paulc on bussard on Thu Jul 24 18:41:02 2014, using kdoc 2.0a54.