class CMceCodec : public CBase |
Base class for codecs.
It defines setters and getters for generic codec attributes.
In some systems certain device resources cannot be shared. For example speaker of the device might not be able to play simultaneously several differently encoded audio streams. Or only one client at the time could use the camera of the device. Codec states can be used to overcome situations where single codec would occupy some resource for excessive period of time or permanently.
Codec can be in one of the three states:
When codec is in state EEnabled, resources, associated with the codec, are reserved for the codec and in some cases cannot be used by other software components. Precondition for reserving resources for the codec is that associated device resource (e.g. speaker sink of downlink or camera source of uplink) is also enabled.
When codec is in state EStandby, resources are not reserved for the codec and therefore can be used by other software components. If the stream (uplink or downlink), into which this codec is attached, encounters data encoded with the codec, codec in state EStandby is tried to be enabled. If enabling succeeds, codec state changes to EEnabled and associated resources are reserved.
When codec is in state EDisabled, resources are not reserved for the codec and are not even tried to be reserved.
mceclient.lib
Protected Member Functions | |
---|---|
CMceCodec() | |
void | ConstructL(CMceComCodec *) |
void | SetSdpNameL(const TDesC8 &) |
Public Member Enumerations | |
---|---|
enum | TState { EDisabled, EStandby, EEnabled } |
Protected Attributes | |
---|---|
CMceComCodec * | iFlatData |
CMceMediaStream * | iStream |
TMceCodecType | iType |
Private Attributes | |
---|---|
TAny * | iReserved |
void | Attach | ( | CMceMediaStream & | aParent | ) |
Attaches stream to codec, preliminary intialization.
CMceMediaStream & aParent |
void | ConstructL | ( | CMceComCodec * | aFlatData | ) | [protected] |
Second-phase constructor.
CMceComCodec * aFlatData | flat data container |
TInt | EventReceivedL | ( | TMceEvent & | aEvent | ) | [virtual] |
Traversal event handler.
TMceEvent & aEvent | the event |
void | ExternalizeFlatL | ( | RWriteStream & | aWriteStream | ) |
Externalizes flat data
RWriteStream & aWriteStream | write stream |
void | ExternalizeL | ( | MMceComSerializationContext & | aSerCtx | ) | [virtual] |
Externalizes
MMceComSerializationContext & aSerCtx | context for serialization |
void | InitializeL | ( | CMceMediaStream & | aParent | ) | [virtual] |
Initializes the codec.
CMceMediaStream & aParent | the parent |
void | InternalizeFlatL | ( | RReadStream & | aReadStream | ) |
Internalizes flat data
RReadStream & aReadStream | read stream |
void | InternalizeL | ( | MMceComSerializationContext & | aSerCtx | ) | [virtual] |
Internalizes
MMceComSerializationContext & aSerCtx | context for serialization |
IMPORT_C TUint8 | KeepAlivePayloadType | ( | ) | const |
Gets keep alive packets payload type.
TInt | SetAllowedBitrates | ( | TUint | aBitrates | ) | [pure virtual] |
Sets bitrates allowed with codec. Allowed bitrates are copied automatically to same codec of opposite direction stream if streams are bound.
TUint aBitrates | allowed bitrate values |
TInt | SetBitrate | ( | TUint | aBitrate | ) | [pure virtual] |
Sets bitrate used with codec for encoding.
TUint aBitrate | bitrate value for encoding |
TInt | SetCodecMode | ( | TUint | aCodecMode | ) | [pure virtual] |
Sets the codec specific mode. Codec mode is copied automatically to same codec of opposite direction stream if streams are bound.
TUint aCodecMode | mode of the codec |
IMPORT_C void | SetKeepAliveDataL | ( | const TDesC8 & | aData | ) |
Set keep alive packets payload data.
const TDesC8 & aData | payload data for keep alive packets |
IMPORT_C void | SetKeepAlivePayloadTypeL | ( | TUint8 | aKeepAlivePT | ) |
Set keep alive packets payload type.
TUint8 aKeepAlivePT | payload type for keep alive packets |
IMPORT_C void | SetKeepAliveTimerL | ( | TUint8 | aTimerValue | ) |
Set keep alive packets send timer value.
TUint8 aTimerValue | timer value in ms for keep alive packets |
IMPORT_C void | SetMMFPriorityL | ( | TInt | aPriority | ) |
Sets MMF priority value for the codec.
TInt aPriority | priority of the codec |
IMPORT_C void | SetMMFPriorityPreferenceL | ( | TInt | aPriorityPreference | ) |
Sets MMF priority preference value for the codec.
TInt aPriorityPreference | priority preference of the codec |
TInt | SetPayloadType | ( | TUint8 | aPayloadType | ) | [pure virtual] |
Sets the payload type.
TUint8 aPayloadType | type identifier of the payload |
IMPORT_C void | SetPreferenceL | ( | TInt | aPeference | ) |
Sets the preference value used in media negotiation. Codec with preference value 0 is considered as the most preferenced codec. Preference of codecs with the same preference value is determined by order they were added to the stream.
TInt aPeference |
void | SetSdpNameL | ( | const TDesC8 & | aSdpName | ) | [protected, pure virtual] |
Sets the sdp name.
const TDesC8 & aSdpName | sdp name for the codec |
IMPORT_C void | SetStandByTimerL | ( | TUint32 | aTimerValue | ) |
Sets the timer period in seconds from starting of inactivity to automatically changing to state CMceCodec::EStandby .
TUint32 aTimerValue | timer period in seconds |
IMPORT_C void | SetStateL | ( | CMceCodec::TState | aState | ) |
Sets the state of the codec.
CMceCodec::TState aState | desired codec state |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.