CMceCodec Class Reference

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

Inherits from

Public Member Functions
~CMceCodec()
IMPORT_C TUintAllowedBitrates()
voidAttach(CMceMediaStream &)
TMceFactory BaseFactory()
IMPORT_C TUintBitrate()
IMPORT_C TUintCodecMode()
TInt EventReceivedL(TMceEvent &)
voidExternalizeFlatL(RWriteStream &)
voidExternalizeL(MMceComSerializationContext &)
CMceComCodec *FlatData()
IMPORT_C TUint32FourCC()
IMPORT_C TUintFrameSize()
TMceMediaId Id()
voidInitializeL(CMceMediaStream &)
voidInternalizeFlatL(RReadStream &)
voidInternalizeL(MMceComSerializationContext &)
IMPORT_C const TDesC8 &KeepAliveData()
IMPORT_C TUint8KeepAlivePayloadType()
IMPORT_C TUint8KeepAliveTimer()
IMPORT_C TIntMMFPriority()
IMPORT_C TIntMMFPriorityPreference()
IMPORT_C TUint8PayloadType()
IMPORT_C TIntPreference()
IMPORT_C const TDesC8 &SdpName()
TUint64 SerializationId()
TInt SetAllowedBitrates(TUint)
TInt SetBitrate(TUint)
TInt SetCodecMode(TUint)
IMPORT_C voidSetKeepAliveDataL(const TDesC8 &)
IMPORT_C voidSetKeepAlivePayloadTypeL(TUint8)
IMPORT_C voidSetKeepAliveTimerL(TUint8)
IMPORT_C voidSetMMFPriorityL(TInt)
IMPORT_C voidSetMMFPriorityPreferenceL(TInt)
TInt SetPayloadType(TUint8)
IMPORT_C voidSetPreferenceL(TInt)
IMPORT_C voidSetStandByTimerL(TUint32)
IMPORT_C voidSetStateL(CMceCodec::TState)
IMPORT_C CMceCodec::TStateState()
IMPORT_C TMceCodecTypeType()
voidUpdated()
Protected Member Functions
CMceCodec()
voidConstructL(CMceComCodec *)
voidSetSdpNameL(const TDesC8 &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTState { EDisabled, EStandby, EEnabled }
Protected Attributes
CMceComCodec *iFlatData
CMceMediaStream *iStream
TMceCodecType iType
Private Attributes
TAny *iReserved

Constructor & Destructor Documentation

CMceCodec()

CMceCodec()[protected]

C++ default constructor.

~CMceCodec()

~CMceCodec()[virtual]

Destructor.

Member Functions Documentation

AllowedBitrates()

IMPORT_C TUintAllowedBitrates()const

Gets allowed bitrate values.

Attach(CMceMediaStream &)

voidAttach(CMceMediaStream &aParent)

Attaches stream to codec, preliminary intialization.

Parameters

CMceMediaStream & aParent

BaseFactory()

TMceFactory BaseFactory()

Gets the base factory.

Bitrate()

IMPORT_C TUintBitrate()const

Gets current bitrate.

CodecMode()

IMPORT_C TUintCodecMode()const

Gets the codec mode.

ConstructL(CMceComCodec *)

voidConstructL(CMceComCodec *aFlatData)[protected]

Second-phase constructor.

Parameters

CMceComCodec * aFlatDataflat data container

EventReceivedL(TMceEvent &)

TInt EventReceivedL(TMceEvent &aEvent)[virtual]

Traversal event handler.

Parameters

TMceEvent & aEventthe event

ExternalizeFlatL(RWriteStream &)

voidExternalizeFlatL(RWriteStream &aWriteStream)

Externalizes flat data

Parameters

RWriteStream & aWriteStreamwrite stream

ExternalizeL(MMceComSerializationContext &)

voidExternalizeL(MMceComSerializationContext &aSerCtx)[virtual]

Externalizes

Parameters

MMceComSerializationContext & aSerCtxcontext for serialization

FlatData()

CMceComCodec *FlatData()

Gets the flat data

FourCC()

IMPORT_C TUint32FourCC()const

Gets codec fourCC.

FrameSize()

IMPORT_C TUintFrameSize()const

Gets current frame size of the codec.

Id()

TMceMediaId Id()const

Media id of the codec.

InitializeL(CMceMediaStream &)

voidInitializeL(CMceMediaStream &aParent)[virtual]

Initializes the codec.

Parameters

CMceMediaStream & aParentthe parent

InternalizeFlatL(RReadStream &)

voidInternalizeFlatL(RReadStream &aReadStream)

Internalizes flat data

Parameters

RReadStream & aReadStreamread stream

InternalizeL(MMceComSerializationContext &)

voidInternalizeL(MMceComSerializationContext &aSerCtx)[virtual]

Internalizes

Parameters

MMceComSerializationContext & aSerCtxcontext for serialization

KeepAliveData()

IMPORT_C const TDesC8 &KeepAliveData()const

Gets keep alive packets payload data.

KeepAlivePayloadType()

IMPORT_C TUint8KeepAlivePayloadType()const

Gets keep alive packets payload type.

KeepAliveTimer()

IMPORT_C TUint8KeepAliveTimer()const

Gets keep alive packets send timer value.

MMFPriority()

IMPORT_C TIntMMFPriority()const

Gets MMF priority

MMFPriorityPreference()

IMPORT_C TIntMMFPriorityPreference()const

Gets MMF priority preference

PayloadType()

IMPORT_C TUint8PayloadType()const

Gets the payload type identifier.

Preference()

IMPORT_C TIntPreference()const

Gets the preference value.

SdpName()

IMPORT_C const TDesC8 &SdpName()const

Gets the sdp name.

SerializationId()

TUint64 SerializationId()const

Returns serialization id

SetAllowedBitrates(TUint)

TInt SetAllowedBitrates(TUintaBitrates)[pure virtual]

Sets bitrates allowed with codec. Allowed bitrates are copied automatically to same codec of opposite direction stream if streams are bound.

Parameters

TUint aBitratesallowed bitrate values

SetBitrate(TUint)

TInt SetBitrate(TUintaBitrate)[pure virtual]

Sets bitrate used with codec for encoding.

Parameters

TUint aBitratebitrate value for encoding

SetCodecMode(TUint)

TInt SetCodecMode(TUintaCodecMode)[pure virtual]

Sets the codec specific mode. Codec mode is copied automatically to same codec of opposite direction stream if streams are bound.

Parameters

TUint aCodecModemode of the codec

SetKeepAliveDataL(const TDesC8 &)

IMPORT_C voidSetKeepAliveDataL(const TDesC8 &aData)

Set keep alive packets payload data.

Parameters

const TDesC8 & aDatapayload data for keep alive packets

SetKeepAlivePayloadTypeL(TUint8)

IMPORT_C voidSetKeepAlivePayloadTypeL(TUint8aKeepAlivePT)

Set keep alive packets payload type.

Parameters

TUint8 aKeepAlivePTpayload type for keep alive packets

SetKeepAliveTimerL(TUint8)

IMPORT_C voidSetKeepAliveTimerL(TUint8aTimerValue)

Set keep alive packets send timer value.

Parameters

TUint8 aTimerValuetimer value in ms for keep alive packets

SetMMFPriorityL(TInt)

IMPORT_C voidSetMMFPriorityL(TIntaPriority)

Sets MMF priority value for the codec.

Parameters

TInt aPrioritypriority of the codec

SetMMFPriorityPreferenceL(TInt)

IMPORT_C voidSetMMFPriorityPreferenceL(TIntaPriorityPreference)

Sets MMF priority preference value for the codec.

Parameters

TInt aPriorityPreferencepriority preference of the codec

SetPayloadType(TUint8)

TInt SetPayloadType(TUint8aPayloadType)[pure virtual]

Sets the payload type.

Parameters

TUint8 aPayloadTypetype identifier of the payload

SetPreferenceL(TInt)

IMPORT_C voidSetPreferenceL(TIntaPeference)

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.

Parameters

TInt aPeference

SetSdpNameL(const TDesC8 &)

voidSetSdpNameL(const TDesC8 &aSdpName)[protected, pure virtual]

Sets the sdp name.

Parameters

const TDesC8 & aSdpNamesdp name for the codec

SetStandByTimerL(TUint32)

IMPORT_C voidSetStandByTimerL(TUint32aTimerValue)

Sets the timer period in seconds from starting of inactivity to automatically changing to state CMceCodec::EStandby .

Parameters

TUint32 aTimerValuetimer period in seconds

SetStateL(CMceCodec::TState)

IMPORT_C voidSetStateL(CMceCodec::TStateaState)

Sets the state of the codec.

Parameters

CMceCodec::TState aStatedesired codec state

State()

IMPORT_C CMceCodec::TStateState()const

Gets the state of the codec

Type()

IMPORT_C TMceCodecTypeType()const

Type of the codec

Updated()

voidUpdated()[virtual]

Called after update.

Member Enumerations Documentation

Enum TState

Enumerators

EDisabled
EStandby
EEnabled

Member Data Documentation

CMceComCodec * iFlatData

CMceComCodec *iFlatData[protected]

Flat data container.

TAny * iReserved

TAny *iReserved[private]

CMceMediaStream * iStream

CMceMediaStream *iStream[protected]

Parent stream, not owned.

TMceCodecType iType

TMceCodecType iType[protected]

Codec type.