List of codecs, used for storing supported codecs and for codec negotiation. More...
#include <SdpCodecList.h>
Public Member Functions | |
Creators | |
| SdpCodecList (int numCodecs=0, SdpCodec *codecArray[]=NULL) | |
| Constructor. More... | |
| SdpCodecList (const SdpCodecList &rSdpCodecFactory) | |
| Copy constructor. More... | |
| SdpCodecList & | operator= (const SdpCodecList &rhs) |
| Assignment operator. More... | |
| virtual | ~SdpCodecList () |
| Destructor. More... | |
Manipulators | |
| void | addCodec (const SdpCodec &newCodec) |
| Add a new codec type to the list of known codecs. More... | |
| void | addCodecs (int numCodecs, SdpCodec *newCodecs[]) |
| Add copies of the array of codecs. More... | |
| int | addCodecs (const UtlString &codecList) |
| Add specified codecs to the list. More... | |
| int | addCodecs (UtlSList &codecNameList) |
| Add specified codecs to the list. More... | |
| int | addCodecs (int numTokens, const char *codecTokens[], int payloadIds[]) |
| Add codecs specified by array of codec token names and assign given payload ID. More... | |
| int | addCodecs (int codecCount, SdpCodec::SdpCodecTypes codecTypes[]) |
| Add specified codecs to the list. More... | |
| void | bindPayloadTypes () |
| Assign any unset payload type ids. More... | |
| int | unbindPayloadType (int payloadId) |
| unbind any codec with the given dynamic payload type More... | |
| void | copyPayloadType (const SdpCodec &codec) |
| If there is a matching codec in this factory, set its payload type to that of the given codec. More... | |
| void | copyPayloadTypes (int numCodecs, const SdpCodec *codecArray[]) |
| For all matching codecs, copy the payload type from the codecArray to the matching codec in this factory. More... | |
| void | copyPayloadTypes (const SdpCodecList &codecList) |
| For all matching codecs, copy the payload type from the given codecList to the matching codec in this factory. More... | |
| void | limitCodecs (const SdpCodecList &includeOnlyCodecList) |
| Remove any codecs in this list that are not equivalent to those in the given list. More... | |
| void | clearCodecs (void) |
| Clear the list. More... | |
| void | setCodecCPULimit (int iLimit) |
| Limits the advertised codec by CPU limit level. More... | |
Inquiry | |
| UtlBoolean | containsCodec (const SdpCodec &codec, UtlBoolean exeact=FALSE) const |
| Query if equivalent codec is in the list. More... | |
Private Member Functions | |
| void | addCodecNoLock (const SdpCodec &newCodec) |
| Add a new codec type to the list of known codecs (without locking). More... | |
Private Attributes | |
| UtlDList | mCodecs |
| OsRWMutex | mReadWriteMutex |
| int | mCodecCPULimit |
Accessors | |
| const SdpCodec * | getCodec (SdpCodec::SdpCodecTypes internalCodecId) const |
| Get a codec given an internal codec id. More... | |
| const SdpCodec * | getCodecByType (int payloadTypeId, UtlBoolean shouldLock=TRUE) const |
| Get a codec given the payload type id. More... | |
| const SdpCodec * | getCodec (const char *MIMEType, const char *MIMESubType, int sampleRate, int numChannels, const UtlString &fmtp) const |
| Get a codec given the MIME type, subtype and other parameters. More... | |
| int | getCodecCount () const |
| Get the number of codecs. More... | |
| int | getCodecCount (const char *MIMEType) const |
| Get the number of codecs by MIME type. More... | |
| void | getCodecs (int &numCodecs, SdpCodec **&codecArray) const |
| Get codecs from this list, taking into account maximum CPU cost. More... | |
| void | getCodecs (int &numCodecs, SdpCodec **&codecArray, const char *MIMEType) const |
| Get codecs from this list, taking into account maximum CPU cost and given MIME type. More... | |
| void | getCodecs (int &numCodecs, SdpCodec **&codecArray, const char *MIMEType, const char *subMimeType) const |
| Returns a copy of all the codecs. More... | |
| void | toString (UtlString &serializedFactory) const |
| String representation of factory and codecs. More... | |
| int | getCodecCPULimit () const |
| Gets the codec CPU limit level. More... | |
| static void | freeArray (int arraySize, SdpCodec **&codecArray) |
| Frees up codecs and codec pointer array. More... | |
List of codecs, used for storing supported codecs and for codec negotiation.
| SdpCodecList | ( | int | numCodecs = 0, |
| SdpCodec * | codecArray[] = NULL |
||
| ) |
Constructor.
| SdpCodecList | ( | const SdpCodecList & | rSdpCodecFactory | ) |
Copy constructor.
|
virtual |
Destructor.
| void addCodec | ( | const SdpCodec & | newCodec | ) |
Add a new codec type to the list of known codecs.
|
private |
Add a new codec type to the list of known codecs (without locking).
| void addCodecs | ( | int | numCodecs, |
| SdpCodec * | newCodecs[] | ||
| ) |
Add copies of the array of codecs.
| int addCodecs | ( | const UtlString & | codecList | ) |
Add specified codecs to the list.
| int addCodecs | ( | UtlSList & | codecNameList | ) |
Add specified codecs to the list.
| int addCodecs | ( | int | numTokens, |
| const char * | codecTokens[], | ||
| int | payloadIds[] | ||
| ) |
Add codecs specified by array of codec token names and assign given payload ID.
| int addCodecs | ( | int | codecCount, |
| SdpCodec::SdpCodecTypes | codecTypes[] | ||
| ) |
Add specified codecs to the list.
| void bindPayloadTypes | ( | ) |
Assign any unset payload type ids.
| void clearCodecs | ( | void | ) |
Clear the list.
| UtlBoolean containsCodec | ( | const SdpCodec & | codec, |
| UtlBoolean | exeact = FALSE |
||
| ) | const |
Query if equivalent codec is in the list.
| void copyPayloadType | ( | const SdpCodec & | codec | ) |
If there is a matching codec in this factory, set its payload type to that of the given codec.
| void copyPayloadTypes | ( | int | numCodecs, |
| const SdpCodec * | codecArray[] | ||
| ) |
For all matching codecs, copy the payload type from the codecArray to the matching codec in this factory.
| void copyPayloadTypes | ( | const SdpCodecList & | codecList | ) |
For all matching codecs, copy the payload type from the given codecList to the matching codec in this factory.
|
static |
Frees up codecs and codec pointer array.
| const SdpCodec * getCodec | ( | SdpCodec::SdpCodecTypes | internalCodecId | ) | const |
Get a codec given an internal codec id.
| const SdpCodec * getCodec | ( | const char * | MIMEType, |
| const char * | MIMESubType, | ||
| int | sampleRate, | ||
| int | numChannels, | ||
| const UtlString & | fmtp | ||
| ) | const |
Get a codec given the MIME type, subtype and other parameters.
| const SdpCodec * getCodecByType | ( | int | payloadTypeId, |
| UtlBoolean | shouldLock = TRUE |
||
| ) | const |
Get a codec given the payload type id.
| int getCodecCount | ( | ) | const |
Get the number of codecs.
| int getCodecCount | ( | const char * | MIMEType | ) | const |
Get the number of codecs by MIME type.
| int getCodecCPULimit | ( | ) | const |
Gets the codec CPU limit level.
| void getCodecs | ( | int & | numCodecs, |
| SdpCodec **& | codecArray | ||
| ) | const |
Get codecs from this list, taking into account maximum CPU cost.
| void getCodecs | ( | int & | numCodecs, |
| SdpCodec **& | codecArray, | ||
| const char * | MIMEType | ||
| ) | const |
Get codecs from this list, taking into account maximum CPU cost and given MIME type.
| void getCodecs | ( | int & | numCodecs, |
| SdpCodec **& | codecArray, | ||
| const char * | MIMEType, | ||
| const char * | subMimeType | ||
| ) | const |
Returns a copy of all the codecs.
| void limitCodecs | ( | const SdpCodecList & | includeOnlyCodecList | ) |
Remove any codecs in this list that are not equivalent to those in the given list.
| SdpCodecList & operator= | ( | const SdpCodecList & | rhs | ) |
Assignment operator.
| void setCodecCPULimit | ( | int | iLimit | ) |
Limits the advertised codec by CPU limit level.
| [in] | iLimit | - The limit level for codecs. A value of SDP_CODEC_CPU_LOW indicates only low cpu intensity codecs and a value of SDP_CODEC_CPU_HIGH indicates either low or high cpu intensity. |
| void toString | ( | UtlString & | serializedFactory | ) | const |
String representation of factory and codecs.
| int unbindPayloadType | ( | int | payloadId | ) |
unbind any codec with the given dynamic payload type
|
private |
|
private |
|
private |