sipXtapi home page


Public Types | Private Attributes | List of all members
SdpCodec Class Reference

Container for SDP/RTP codec specification. More...

#include <SdpCodec.h>

Inheritance diagram for SdpCodec:
Inheritance graph
[legend]
Collaboration diagram for SdpCodec:
Collaboration graph
[legend]

Public Types

enum  SdpCodecTypes {
  SDP_CODEC_UNKNOWN = -1, SDP_CODEC_PCMU = 0, SDP_CODEC_GSM = 3, SDP_CODEC_G723 = 4,
  SDP_CODEC_PCMA = 8, SDP_CODEC_G722 = 9, SDP_CODEC_L16_44100_STEREO = 10, SDP_CODEC_L16_44100_MONO = 11,
  SDP_CODEC_G729 = 18, SDP_CODEC_H263 = 34, SDP_CODEC_MAXIMUM_STATIC_CODEC = 95, SDP_CODEC_SPEEX,
  SDP_CODEC_SPEEX_5, SDP_CODEC_SPEEX_15, SDP_CODEC_SPEEX_24, SDP_CODEC_SPEEX_WB,
  SDP_CODEC_SPEEX_WB_5, SDP_CODEC_SPEEX_WB_21, SDP_CODEC_SPEEX_WB_42, SDP_CODEC_SPEEX_UWB,
  SDP_CODEC_SPEEX_UWB_8, SDP_CODEC_SPEEX_UWB_22, SDP_CODEC_SPEEX_UWB_44, SDP_CODEC_ILBC,
  SDP_CODEC_ILBC_20MS, SDP_CODEC_TONES, SDP_CODEC_G729A, SDP_CODEC_G7221,
  SDP_CODEC_G7221_24, SDP_CODEC_G7221_32, SDP_CODEC_G7221_C_24, SDP_CODEC_G7221_C_32,
  SDP_CODEC_G7221_C_48, SDP_CODEC_G7231, SDP_CODEC_AMR, SDP_CODEC_AMR_ALIGNED,
  SDP_CODEC_AMRWB, SDP_CODEC_AMRWB_ALIGNED, SDP_CODEC_L16_8000_STEREO, SDP_CODEC_L16_8000_MONO,
  SDP_CODEC_L16_11025_STEREO, SDP_CODEC_L16_11025_MONO, SDP_CODEC_L16_16000_STEREO, SDP_CODEC_L16_16000_MONO,
  SDP_CODEC_L16_22050_STEREO, SDP_CODEC_L16_22050_MONO, SDP_CODEC_L16_24000_STEREO, SDP_CODEC_L16_24000_MONO,
  SDP_CODEC_L16_32000_STEREO, SDP_CODEC_L16_32000_MONO, SDP_CODEC_L16_48000_STEREO, SDP_CODEC_L16_48000_MONO,
  SDP_CODEC_G729AB, SDP_CODEC_G729ACISCO7960, SDP_CODEC_G726_16, SDP_CODEC_G726_24,
  SDP_CODEC_G726_32, SDP_CODEC_G726_40, SDP_CODEC_AAC_LC_32000, SDP_CODEC_MPEG4_GENERIC_AAC_LC_16000,
  SDP_CODEC_MPEG4_GENERIC_AAC_LC_32000, SDP_CODEC_MPEG4_GENERIC_AAC_LC_48000, SDP_CODEC_OPUS, SDP_CODEC_GIPS_IPCMA,
  SDP_CODEC_GIPS_IPCMU, SDP_CODEC_GIPS_IPCMWB, SDP_CODEC_GIPS_ISAC, SDP_CODEC_VP71_CIF,
  SDP_CODEC_VP71_QCIF, SDP_CODEC_VP71_SQCIF, SDP_CODEC_VP71_QVGA, SDP_CODEC_IYUV_CIF,
  SDP_CODEC_IYUV_QCIF, SDP_CODEC_IYUV_SQCIF, SDP_CODEC_IYUV_QVGA, SDP_CODEC_I420_CIF,
  SDP_CODEC_I420_QCIF, SDP_CODEC_I420_SQCIF, SDP_CODEC_I420_QVGA, SDP_CODEC_RGB24_CIF,
  SDP_CODEC_RGB24_QCIF, SDP_CODEC_RGB24_SQCIF, SDP_CODEC_RGB24_QVGA, SDP_CODEC_H263_CIF,
  SDP_CODEC_H263_QCIF, SDP_CODEC_H263_SQCIF, SDP_CODEC_H263_QVGA, SDP_CODEC_H264,
  SDP_CODEC_H264_CIF_256, SDP_CODEC_H264_NTSC_256, SDP_CODEC_H264_4CIF_512, SDP_CODEC_H264_EDTV_512,
  SDP_CODEC_H264_QHD_1024, SDP_CODEC_H264_HD720_1024, SDP_CODEC_H264_HD720_2048, SDP_CODEC_H264_HD1088_2048,
  SDP_CODEC_H264_HD1088_4096, SDP_CODEC_H264_PM1_CIF_256, SDP_CODEC_H264_PM1_NTSC_256, SDP_CODEC_H264_PM1_4CIF_512,
  SDP_CODEC_H264_PM1_EDTV_512, SDP_CODEC_H264_PM1_QHD_1024, SDP_CODEC_H264_PM1_HD720_1024, SDP_CODEC_H264_PM1_HD720_2048,
  SDP_CODEC_H264_PM1_HD1088_2048, SDP_CODEC_H264_PM1_HD1088_4096
}
 Unique identifier used for each supported codec. More...
 
enum  SdpCodecCPUCost { SDP_CODEC_CPU_LOW = 0, SDP_CODEC_CPU_HIGH = 1, SDP_CODEC_CPU_VERY_HIGH = 2 }
 Identifies the relative CPU cost for a SDP Codec. More...
 

Public Member Functions

Creators
 SdpCodec (enum SdpCodecTypes sdpCodecType=SDP_CODEC_UNKNOWN, int payloadFormat=-1, const char *mimeType=MIME_TYPE_AUDIO, const char *mimeSubtype="", int sampleRate=8000, int preferredPacketLength=20000, int numChannels=1, const char *formatSpecificData="", const SdpCodecCPUCost CPUCost=SDP_CODEC_CPU_LOW, const int BWCost=SDP_CODEC_BANDWIDTH_NORMAL, const int videoFormat=SDP_VIDEO_FORMAT_QCIF, const int videoFmtp=0)
 Default constructor. More...
 
 SdpCodec (int payloadFormat, const char *mimeType, const char *mimeSubType, int sampleRate, int preferredPacketLength, int numChannels, const char *formatSpecificData)
 
 SdpCodec (const SdpCodec &rSdpCodec)
 Copy constructor. More...
 
virtual ~SdpCodec ()
 Destructor. More...
 
Manipulators
SdpCodecoperator= (const SdpCodec &rhs)
 Assignment operator. More...
 
UtlCopyableContainable * clone () const
 
void setCodecPayloadFormat (int formatId)
 Set the SDP/RTP payload id to be used for this codec. More...
 
void setVideoFmtp (const int videoFmtp)
 Set the video format bitmap. More...
 
void setVideoFmtpString (int videoFmtp)
 Set the video format string. More...
 
void clearVideoFmtpString ()
 Clears the format string. More...
 
void setPacketSize (const int packetSize)
 Set the packet size. More...
 

Private Attributes

int mCodecPayloadFormat
 
UtlString mMimeType
 audio, video, etc. More...
 
UtlString mMimeSubtype
 a=rtpmap mime subtype value More...
 
int mSampleRate
 samples per second More...
 
int mPacketLength
 micro seconds More...
 
int mNumChannels
 
UtlString mFormatSpecificData
 a=fmtp parameter More...
 
SdpCodecCPUCost mCPUCost
 relative cost of a SDP codec More...
 
int mBWCost
 
int mVideoFormat
 
int mVideoFmtp
 
UtlString mVideoFmtpString
 video format string More...
 

Accessors

enum SdpCodecTypes getCodecType () const
 Get the internal/sipX codec type id. More...
 
int getCodecPayloadFormat () const
 Get the SDP/RTP payload id to be used for this codec. More...
 
virtual void getSdpFmtpField (UtlString &formatSpecificData) const
 Get the format specific parameters for the SDP. More...
 
virtual void setSdpFmtpField (const UtlString &formatSpecificData)
 Set the format specific parameters for the SDP. More...
 
virtual UtlBoolean getFmtpParameter (const UtlString &parameterName, UtlString &parameterValue, char nameValueSeperator= '=') const
 Get the named parameter in the format field (fmtp parameter) More...
 
void getMediaType (UtlString &mimeMajorType) const
 Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>". More...
 
void getEncodingName (UtlString &mimeSubtype) const
 MimeSubtype used as encoding name. More...
 
int getSampleRate () const
 Get the number of samples per second. More...
 
int getVideoFormat () const
 Return the video format. More...
 
int getNumChannels () const
 Get the number of channels. More...
 
int getPacketLength () const
 Get the preferred packet size in micro seconds. More...
 
void toString (UtlString &sdpCodecContents) const
 Get a string dump of this codecs definition. More...
 
SdpCodecCPUCost getCPUCost () const
 Get the CPU cost for this codec. More...
 
int getBWCost () const
 Get the bandwidth cost for this codec. More...
 
int getVideoFmtp () const
 Get the video format bitmap. More...
 
void getVideoFmtpString (UtlString &fmtpString) const
 Get the video format string. More...
 
static UtlBoolean getFmtpParameter (const UtlString &fmtpField, const UtlString &parameterName, UtlString &parameterValue, char nameValueSeperator= '=')
 Get the named parameter from the given format field (fmtp parameter) More...
 
static UtlBoolean getFmtpParameter (const UtlString &fmtpField, const UtlString &parameterName, int &parameterValue, char nameValueSeperator= '=')
 Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>". More...
 
static OsStatus getVideoSizes (const UtlString &fmtpField, int maxSizes, int &numSizes, int videoSizes[])
 Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>". More...
 

Inquiry

UtlBoolean isSameDefinition (const SdpCodec &codec) const
 Returns TRUE if this codec is the same definition as the given codec. More...
 
UtlBoolean isFmtpParameterSame (const SdpCodec &codec, const UtlString &fmtpParameterName, const UtlString &fmtpParameterDefaultValue, const char nameValueSeperater= '=') const
 Returns TRUE if the named fmtp parameters are the same in this and the given codec. More...
 
UtlBoolean isFmtpParameterSame (const UtlString &fmtp, const UtlString &fmtpParameterName, const UtlString &fmtpParameterDefaultValue, const char nameValueSeperater= '=') const
 Returns TRUE if the named fmtp parameters are the same in this and the given fmtp field string. More...
 
UtlBoolean compareFmtp (const SdpCodec &codec, int &compares) const
 
UtlBoolean compareFmtp (const UtlString &fmtp, int &compares) const
 
static UtlBoolean isFmtpParameterSame (const UtlString &fmtp1, const UtlString &fmtp2, const UtlString &fmtpParameterName, const UtlString &fmtpParameterDefaultValue, const char nameValueSeperater= '=')
 
static UtlBoolean compareFmtp (const UtlString &mimeType, const UtlString &mimeSubtype, const UtlString &fmpt1, const UtlString &fmtp2, int &compares)
 Assumes mime type of provided fmtp string is same as this. More...
 

Detailed Description

Container for SDP/RTP codec specification.

This class holds the SDP definition of a codec. Included information is: sample rate, number of channels, the mapping from an internal codec id to the public SDP format and RTP payload type id.

This is the base class. Specific codec types may implement sub classes which define the codec specific parameters. All specific codec types MUST be registered with the SdpCodecFactory to be usable. Generally codecs are constructed ONLY by the SdpCodecFactory.

The method that is used on SdpCodec::getCodecType() retrieves the static codec type/id. Now there is defined an enum in SdpCodec which contains the current values as well as some additional ones. The idea is that these are private, internally assigned ids to the codecs we support.

A new method SdpCodec::getCodecPayloadFormat() has been added which returns the RTP payload id to be used in RTP and the SDP. For static codec ID, the returned value for both of these methods would typically be the same, however for the dynamic codecs they will mostly be different.

The intent is that eventually we will support a factory which will allow registration of new codec types.

Member Enumeration Documentation

Identifies the relative CPU cost for a SDP Codec.

Enumerator
SDP_CODEC_CPU_LOW 
SDP_CODEC_CPU_HIGH 
SDP_CODEC_CPU_VERY_HIGH 

Unique identifier used for each supported codec.

Note it is possible that the format id/type used in the SDP "m" field and RTP header is different than these internally used ids.

Enumerator
SDP_CODEC_UNKNOWN 
SDP_CODEC_PCMU 

G.711 mu-law.

SDP_CODEC_GSM 

GSM codec.

SDP_CODEC_G723 

G.723.

SDP_CODEC_PCMA 

G.711 a-law.

SDP_CODEC_G722 

G.722.

SDP_CODEC_L16_44100_STEREO 

PCM 16 bit/sample 44100 samples/sec.

SDP_CODEC_L16_44100_MONO 

PCM 16 bit/sample 44100 samples/sec.

SDP_CODEC_G729 

G.729, with or without Annexes A or B.

SDP_CODEC_H263 

H.263 video codec.

SDP_CODEC_MAXIMUM_STATIC_CODEC 

Payload types for codecs below < will be assigned dynamically.

SDP_CODEC_SPEEX 

Speex NB, 8,000bps.

SDP_CODEC_SPEEX_5 

Speex NB, 5,950bps.

SDP_CODEC_SPEEX_15 

Speex NB, 15,000bps.

SDP_CODEC_SPEEX_24 

Speex NB, 24,600bps.

SDP_CODEC_SPEEX_WB 

Speex WB 9,800bps (enum 100)

SDP_CODEC_SPEEX_WB_5 

Speex WB 5,750bps.

SDP_CODEC_SPEEX_WB_21 

Speex WB 20,600bps.

SDP_CODEC_SPEEX_WB_42 

Speex WB 42,200bps.

SDP_CODEC_SPEEX_UWB 

Speex UWB 11,600bps.

SDP_CODEC_SPEEX_UWB_8 

Speex UWB 7,550bps.

SDP_CODEC_SPEEX_UWB_22 

Speex UWB 22,400bps.

SDP_CODEC_SPEEX_UWB_44 

Speex UWB 44,000bps.

SDP_CODEC_ILBC 

Internet Low Bit Rate Codec, 30ms (RFC3951)

SDP_CODEC_ILBC_20MS 

Internet Low Bit Rate Codec, 20ms (RFC3951)

SDP_CODEC_TONES 

AVT/DTMF Tones, RFC 2833.

SDP_CODEC_G729A 

G.729A.

SDP_CODEC_G7221 

Siren.

SDP_CODEC_G7221_24 

Siren/G.722.1 (16k sps) 24Kb.

SDP_CODEC_G7221_32 

Siren/G.722.1 (16k sps) 32Kb.

SDP_CODEC_G7221_C_24 

Siren/G.722.1 Annex C (32k sps) 24Kb.

SDP_CODEC_G7221_C_32 

Siren/G.722.1 Annex C (32k sps) 32Kb.

SDP_CODEC_G7221_C_48 

Siren/G.722.1 Annex C (32k sps) 48Kb.

SDP_CODEC_G7231 

G.723.1.

SDP_CODEC_AMR 

AMR Bandwidth Efficient mode.

SDP_CODEC_AMR_ALIGNED 

AMR Octet Aligned mode.

SDP_CODEC_AMRWB 

AMR-WB Bandwidth Efficient mode.

SDP_CODEC_AMRWB_ALIGNED 

AMR-WB Octet Aligned mode.

SDP_CODEC_L16_8000_STEREO 

PCM 16 bit/sample 8000 samples/sec stereo.

SDP_CODEC_L16_8000_MONO 

PCM 16 bit/sample 8000 samples/sec mono.

SDP_CODEC_L16_11025_STEREO 

PCM 16 bit/sample 11025 samples/sec stereo.

SDP_CODEC_L16_11025_MONO 

PCM 16 bit/sample 11025 samples/sec mono.

SDP_CODEC_L16_16000_STEREO 

PCM 16 bit/sample 16000 samples/sec stereo.

SDP_CODEC_L16_16000_MONO 

PCM 16 bit/sample 16000 samples/sec mono.

SDP_CODEC_L16_22050_STEREO 

PCM 16 bit/sample 22050 samples/sec stereo.

SDP_CODEC_L16_22050_MONO 

PCM 16 bit/sample 22050 samples/sec mono. (enum 125)

SDP_CODEC_L16_24000_STEREO 

PCM 16 bit/sample 24000 samples/sec stereo.

SDP_CODEC_L16_24000_MONO 

PCM 16 bit/sample 24000 samples/sec mono.

SDP_CODEC_L16_32000_STEREO 

PCM 16 bit/sample 32000 samples/sec stereo.

SDP_CODEC_L16_32000_MONO 

PCM 16 bit/sample 32000 samples/sec mono.

SDP_CODEC_L16_48000_STEREO 

PCM 16 bit/sample 48000 samples/sec stereo.

SDP_CODEC_L16_48000_MONO 

PCM 16 bit/sample 48000 samples/sec mono.

SDP_CODEC_G729AB 

G.729A.

SDP_CODEC_G729ACISCO7960 
SDP_CODEC_G726_16 
SDP_CODEC_G726_24 
SDP_CODEC_G726_32 
SDP_CODEC_G726_40 
SDP_CODEC_AAC_LC_32000 
SDP_CODEC_MPEG4_GENERIC_AAC_LC_16000 
SDP_CODEC_MPEG4_GENERIC_AAC_LC_32000 
SDP_CODEC_MPEG4_GENERIC_AAC_LC_48000 
SDP_CODEC_OPUS 

Default OPUS VoIP codec upto 48000 samples/sec.

SDP_CODEC_GIPS_IPCMA 

GIPS specific codecs.

SDP_CODEC_GIPS_IPCMU 
SDP_CODEC_GIPS_IPCMWB 
SDP_CODEC_GIPS_ISAC 
SDP_CODEC_VP71_CIF 

Video codecs.

SDP_CODEC_VP71_QCIF 
SDP_CODEC_VP71_SQCIF 
SDP_CODEC_VP71_QVGA 
SDP_CODEC_IYUV_CIF 
SDP_CODEC_IYUV_QCIF 
SDP_CODEC_IYUV_SQCIF 
SDP_CODEC_IYUV_QVGA 
SDP_CODEC_I420_CIF 
SDP_CODEC_I420_QCIF 
SDP_CODEC_I420_SQCIF 
SDP_CODEC_I420_QVGA 
SDP_CODEC_RGB24_CIF 
SDP_CODEC_RGB24_QCIF 
SDP_CODEC_RGB24_SQCIF 
SDP_CODEC_RGB24_QVGA 
SDP_CODEC_H263_CIF 
SDP_CODEC_H263_QCIF 
SDP_CODEC_H263_SQCIF 
SDP_CODEC_H263_QVGA 
SDP_CODEC_H264 
SDP_CODEC_H264_CIF_256 
SDP_CODEC_H264_NTSC_256 
SDP_CODEC_H264_4CIF_512 
SDP_CODEC_H264_EDTV_512 
SDP_CODEC_H264_QHD_1024 
SDP_CODEC_H264_HD720_1024 
SDP_CODEC_H264_HD720_2048 
SDP_CODEC_H264_HD1088_2048 
SDP_CODEC_H264_HD1088_4096 
SDP_CODEC_H264_PM1_CIF_256 
SDP_CODEC_H264_PM1_NTSC_256 
SDP_CODEC_H264_PM1_4CIF_512 
SDP_CODEC_H264_PM1_EDTV_512 
SDP_CODEC_H264_PM1_QHD_1024 
SDP_CODEC_H264_PM1_HD720_1024 
SDP_CODEC_H264_PM1_HD720_2048 
SDP_CODEC_H264_PM1_HD1088_2048 
SDP_CODEC_H264_PM1_HD1088_4096 

Constructor & Destructor Documentation

SdpCodec ( enum SdpCodecTypes  sdpCodecType = SDP_CODEC_UNKNOWN,
int  payloadFormat = -1,
const char *  mimeType = MIME_TYPE_AUDIO,
const char *  mimeSubtype = "",
int  sampleRate = 8000,
int  preferredPacketLength = 20000,
int  numChannels = 1,
const char *  formatSpecificData = "",
const SdpCodecCPUCost  CPUCost = SDP_CODEC_CPU_LOW,
const int  BWCost = SDP_CODEC_BANDWIDTH_NORMAL,
const int  videoFormat = SDP_VIDEO_FORMAT_QCIF,
const int  videoFmtp = 0 
)

Default constructor.

Parameters
sampleRatesamples per second
preferredPacketLengthmicro seconds
SdpCodec ( int  payloadFormat,
const char *  mimeType,
const char *  mimeSubType,
int  sampleRate,
int  preferredPacketLength,
int  numChannels,
const char *  formatSpecificData 
)
SdpCodec ( const SdpCodec rSdpCodec)

Copy constructor.

~SdpCodec ( )
virtual

Destructor.

Member Function Documentation

void clearVideoFmtpString ( )

Clears the format string.

UtlCopyableContainable* clone ( ) const
inline
UtlBoolean compareFmtp ( const SdpCodec codec,
int &  compares 
) const
UtlBoolean compareFmtp ( const UtlString &  fmtp,
int &  compares 
) const
Parameters
comparesgreater than, equal or less than zero based upon how the fmtp parameters compare
Returns
TRUE/FALSE if the codecs are compatible
UtlBoolean compareFmtp ( const UtlString &  mimeType,
const UtlString &  mimeSubtype,
const UtlString &  fmpt1,
const UtlString &  fmtp2,
int &  compares 
)
static

Assumes mime type of provided fmtp string is same as this.

Parameters
comparesgreater than, equal or less than zero based upon how the fmtp parameters compare
Returns
TRUE/FALSE if the codecs are compatible
int getBWCost ( ) const

Get the bandwidth cost for this codec.

Returns
SDP_CODEC_BANDWIDTH_HIGH, SDP_CODEC_BANDWIDTH_NORMAL or SDP_CODEC_BANDWIDTH_LOW
int getCodecPayloadFormat ( ) const

Get the SDP/RTP payload id to be used for this codec.

This is the id used in the SDP "m" format sub-field and RTP header.

SdpCodec::SdpCodecTypes getCodecType ( ) const

Get the internal/sipX codec type id.

Note
It is possible that the format id/type used in the SDP "m" field and RTP header is different than these internally used ids.
SdpCodec::SdpCodecCPUCost getCPUCost ( ) const

Get the CPU cost for this codec.

Returns
SDP_CODEC_CPU_HIGH or SDP_CODEC_CPU_LOW
void getEncodingName ( UtlString &  mimeSubtype) const

MimeSubtype used as encoding name.

This is the encoding name used in the SDP "a=rtpmap: <payloadFormat> <mimeSubtype/sampleRate[/numChannels]" field.

UtlBoolean getFmtpParameter ( const UtlString &  parameterName,
UtlString &  parameterValue,
char  nameValueSeperator = '=' 
) const
virtual

Get the named parameter in the format field (fmtp parameter)

UtlBoolean getFmtpParameter ( const UtlString &  fmtpField,
const UtlString &  parameterName,
UtlString &  parameterValue,
char  nameValueSeperator = '=' 
)
static

Get the named parameter from the given format field (fmtp parameter)

UtlBoolean getFmtpParameter ( const UtlString &  fmtpField,
const UtlString &  parameterName,
int &  parameterValue,
char  nameValueSeperator = '=' 
)
static

Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>".

Get the named parameter from the given format field (fmtp parameter)

void getMediaType ( UtlString &  mimeMajorType) const

Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>".

Get the media type for the codec This is the mime major type (i.e. video, audio, etc)

int getNumChannels ( ) const

Get the number of channels.

int getPacketLength ( ) const

Get the preferred packet size in micro seconds.

Get the preferred (not mandated) packet size. This measure is in microseconds and is independent of whether this is frame or sample based codec

int getSampleRate ( ) const

Get the number of samples per second.

void getSdpFmtpField ( UtlString &  formatSpecificData) const
virtual

Get the format specific parameters for the SDP.

This is what goes in the SDP "a" field in the format: "a=fmtp <payloadFormat> <formatSpecificData>"

int getVideoFmtp ( ) const

Get the video format bitmap.

void getVideoFmtpString ( UtlString &  fmtpString) const

Get the video format string.

int getVideoFormat ( ) const

Return the video format.

OsStatus getVideoSizes ( const UtlString &  fmtpField,
int  maxSizes,
int &  numSizes,
int  videoSizes[] 
)
static

Assumes the "a=fmtp:<payloadType>" of the fmtp field has be stripped off "a=fmtp:<payloadType> <fmtpdata>".

Get the video video sizes from the FMTP parameter

UtlBoolean isFmtpParameterSame ( const SdpCodec codec,
const UtlString &  fmtpParameterName,
const UtlString &  fmtpParameterDefaultValue,
const char  nameValueSeperater = '=' 
) const

Returns TRUE if the named fmtp parameters are the same in this and the given codec.

UtlBoolean isFmtpParameterSame ( const UtlString &  fmtp,
const UtlString &  fmtpParameterName,
const UtlString &  fmtpParameterDefaultValue,
const char  nameValueSeperater = '=' 
) const

Returns TRUE if the named fmtp parameters are the same in this and the given fmtp field string.

UtlBoolean isFmtpParameterSame ( const UtlString &  fmtp1,
const UtlString &  fmtp2,
const UtlString &  fmtpParameterName,
const UtlString &  fmtpParameterDefaultValue,
const char  nameValueSeperater = '=' 
)
static
UtlBoolean isSameDefinition ( const SdpCodec codec) const

Returns TRUE if this codec is the same definition as the given codec.

That is the encoding type and its characteristics, not the payload type.

SdpCodec & operator= ( const SdpCodec rhs)

Assignment operator.

void setCodecPayloadFormat ( int  formatId)

Set the SDP/RTP payload id to be used for this codec.

void setPacketSize ( const int  packetSize)

Set the packet size.

void setSdpFmtpField ( const UtlString &  formatSpecificData)
virtual

Set the format specific parameters for the SDP.

This is what goes in the SDP "a" field in the format: "a=fmtp <payloadFormat> <formatSpecificData>"

void setVideoFmtp ( const int  videoFmtp)

Set the video format bitmap.

void setVideoFmtpString ( int  videoFmtp)

Set the video format string.

void toString ( UtlString &  sdpCodecContents) const

Get a string dump of this codecs definition.

Member Data Documentation

int mBWCost
private
int mCodecPayloadFormat
private
Parameters
mimeType- Mime major type
mimeSubtype- Mime sub type
fmpt1- fmtp string from 1st codec (Must have "a:fmtp <payloadId>" removed)
fmpt2- fmtp string from 2nd codec (Must have "a:fmtp <payloadId>" removed)
comparesgreater than, equal or less than zero based upon how the fmtp parameters compare
Returns
TRUE/FALSE if the codecs are compatibleThe id which appears in SDP & RTP
SdpCodecCPUCost mCPUCost
private

relative cost of a SDP codec

UtlString mFormatSpecificData
private

a=fmtp parameter

UtlString mMimeSubtype
private

a=rtpmap mime subtype value

UtlString mMimeType
private

audio, video, etc.

int mNumChannels
private
int mPacketLength
private

micro seconds

int mSampleRate
private

samples per second

int mVideoFmtp
private
UtlString mVideoFmtpString
private

video format string

int mVideoFormat
private