CMMFAudioInput Class Reference

class CMMFAudioInput : public CBase

Concrete data source to provide microphone support.

Intended to be used by controller plugin developers for source plugins. Uses CMMFDevSound to access hardware.

Inherits from

Public Member Functions
~CMMFAudioInput ()
void BufferEmptiedL ( CMMFBuffer *)
TInt BytesPlayed ()
TBool CanCreateSourceBuffer ()
void ConstructL ()
CMMFBuffer * CreateSourceBufferL ( TMediaId )
CMMFBuffer * CreateSourceBufferL ( TMediaId , CMMFBuffer &)
CMMFBuffer * CreateSourceBufferL ( TMediaId , TBool &)
CMMFBuffer * CreateSourceBufferL ( TMediaId , CMMFBuffer &, TBool &)
TFourCC DataType ()
void FillBufferL ( CMMFBuffer *, MDataSink *, TMediaId )
void HWFillBufferL ( CMMFBuffer *, MDataSink *)
void LoadL ()
void NegotiateSourceL ( MDataSink &)
MDataSource * NewSourceL ()
void SetDataTypeL ( TFourCC )
TInt SetSourceDataTypeCode ( TFourCC , TMediaId )
void SetSourcePrioritySettings (const TMMFPrioritySettings &)
CMMFDevSound & SoundDevice ()
TFourCC SourceDataTypeCode ( TMediaId )
void SourcePauseL ()
void SourcePlayL ()
void SourcePrimeL ()
void SourceStopL ()
void SourceThreadLogoff ()
TInt SourceThreadLogon ( MAsyncEventHandler &)
Protected Member Functions
void ConstructSourceL (const TDesC8 &)
Private Member Functions
CMMFAudioInput ()
void BufferToBeEmptied ( CMMFBuffer *)
void BufferToBeFilled ( CMMFBuffer *)
void ConfigDevSoundL ()
void ConvertError ( TInt )
void DeviceMessage ( TUid , const TDesC8 &)
void InitializeComplete ( TInt )
void PlayError ( TInt )
void RecordError ( TInt )
void SendEventToClient (const TMMFEvent &)
void ToneFinished ( TInt )
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()
Private Member Enumerations
enum TCodec { EUseARMCodec  = 0, EUseHWCodec }
enum TError { ECantCreateBuffer , EEmptyBuffer , EDevSoundNotLoaded , EUnknown }
enum TState { EIdle  = 0, EPaused , EDevSoundReady , EBufferEmpty }
Public Attributes
TRequestStatus iBufferStatus
Private Attributes
CActiveSchedulerWait * iActiveSchedulerWait
MDataSink * iConsumer
TFourCC iDataTypeCode
CMMFBuffer * iDevSoundBuf
TBool iDevSoundLoaded
TError iError
MAsyncEventHandler * iEventHandler
TBool iFirstBufferRead
TBool iFirstBufferRequested
TInt iInitializeState
CMMFDevSound * iMMFDevSound
TInt iMMFDevsoundError
TBool iPausePending
TMMFPrioritySettings iPrioritySettings
TUint iSinkChannels
TFourCC iSinkFourCC
TUint iSinkSampleRate
TState iState
TBool iStopped

Constructor & Destructor Documentation

CMMFAudioInput()

CMMFAudioInput ( ) [private, inline]

~CMMFAudioInput()

~CMMFAudioInput ( ) [virtual]

Member Functions Documentation

BufferEmptiedL(CMMFBuffer *)

void BufferEmptiedL ( CMMFBuffer * aBuffer ) [virtual]

Parameters

CMMFBuffer * aBuffer

BufferToBeEmptied(CMMFBuffer *)

void BufferToBeEmptied ( CMMFBuffer * aBuffer ) [private, virtual]

Parameters

CMMFBuffer * aBuffer

BufferToBeFilled(CMMFBuffer *)

void BufferToBeFilled ( CMMFBuffer * aBuffer ) [private, virtual]

Parameters

CMMFBuffer * aBuffer

BytesPlayed()

TInt BytesPlayed ( )

CanCreateSourceBuffer()

TBool CanCreateSourceBuffer ( ) [virtual]

ConfigDevSoundL()

void ConfigDevSoundL ( ) [private]

ConstructL()

void ConstructL ( )

ConstructSourceL(const TDesC8 &)

void ConstructSourceL ( const TDesC8 & aInitData ) [protected, virtual]

Parameters

const TDesC8 & aInitData

ConvertError(TInt)

void ConvertError ( TInt aError ) [private, virtual]

Parameters

TInt aError

CreateSourceBufferL(TMediaId)

CMMFBuffer * CreateSourceBufferL ( TMediaId aMediaId ) [virtual]

Parameters

TMediaId aMediaId

CreateSourceBufferL(TMediaId, CMMFBuffer &)

CMMFBuffer * CreateSourceBufferL ( TMediaId aMediaId,
CMMFBuffer & aSinkBuffer
) [inline, virtual]

Intended for synchronous usage (returns buffer specific to a Media Type).

Parameters

TMediaId aMediaId The Media ID.
CMMFBuffer & aSinkBuffer Not Used.

CreateSourceBufferL(TMediaId, TBool &)

CMMFBuffer * CreateSourceBufferL ( TMediaId aMediaId,
TBool & aReference
) [virtual]

Parameters

TMediaId aMediaId
TBool & aReference

CreateSourceBufferL(TMediaId, CMMFBuffer &, TBool &)

CMMFBuffer * CreateSourceBufferL ( TMediaId aMediaId,
CMMFBuffer & aSinkBuffer,
TBool & aReference
) [inline, virtual]

Creates a source buffer.

Intended for asynchronous usage (returns buffer specific to a Media Type).

Parameters

TMediaId aMediaId The Media ID.
CMMFBuffer & aSinkBuffer Not used.
TBool & aReference A boolean indicating if MDataSource owns the buffer. If EFalse the the caller owns the buffer.

DataType()

TFourCC DataType ( ) const [virtual]

DeviceMessage(TUid, const TDesC8 &)

void DeviceMessage ( TUid aMessageType,
const TDesC8 & aMsg
) [private, virtual]

Parameters

TUid aMessageType
const TDesC8 & aMsg

FillBufferL(CMMFBuffer *, MDataSink *, TMediaId)

void FillBufferL ( CMMFBuffer * aBuffer,
MDataSink * aConsumer,
TMediaId aMediaId
) [virtual]

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer
TMediaId aMediaId

HWFillBufferL(CMMFBuffer *, MDataSink *)

void HWFillBufferL ( CMMFBuffer * aBuffer,
MDataSink * aConsumer
)

Parameters

CMMFBuffer * aBuffer
MDataSink * aConsumer

InitializeComplete(TInt)

void InitializeComplete ( TInt aError ) [private, virtual]

Parameters

TInt aError

LoadL()

void LoadL ( )

NegotiateSourceL(MDataSink &)

void NegotiateSourceL ( MDataSink & aSink ) [virtual]

Parameters

MDataSink & aSink

NewSourceL()

MDataSource * NewSourceL ( ) [static]

PlayError(TInt)

void PlayError ( TInt aError ) [private, virtual]

Parameters

TInt aError

RecordError(TInt)

void RecordError ( TInt aError ) [private, virtual]

Parameters

TInt aError

SendEventToClient(const TMMFEvent &)

void SendEventToClient ( const TMMFEvent & ) [private, virtual]

Parameters

const TMMFEvent &

SetDataTypeL(TFourCC)

void SetDataTypeL ( TFourCC aAudioType ) [virtual]

Parameters

TFourCC aAudioType

SetSourceDataTypeCode(TFourCC, TMediaId)

TInt SetSourceDataTypeCode ( TFourCC aSourceFourCC,
TMediaId aMediaId
) [virtual]

Parameters

TFourCC aSourceFourCC
TMediaId aMediaId

SetSourcePrioritySettings(const TMMFPrioritySettings &)

void SetSourcePrioritySettings ( const TMMFPrioritySettings & aPrioritySettings ) [virtual]

Parameters

const TMMFPrioritySettings & aPrioritySettings

SoundDevice()

CMMFDevSound & SoundDevice ( )

SourceDataTypeCode(TMediaId)

TFourCC SourceDataTypeCode ( TMediaId aMediaId ) [virtual]

Parameters

TMediaId aMediaId

SourcePauseL()

void SourcePauseL ( ) [virtual]

SourcePlayL()

void SourcePlayL ( ) [virtual]

SourcePrimeL()

void SourcePrimeL ( ) [virtual]

SourceStopL()

void SourceStopL ( ) [virtual]

SourceThreadLogoff()

void SourceThreadLogoff ( ) [virtual]

SourceThreadLogon(MAsyncEventHandler &)

TInt SourceThreadLogon ( MAsyncEventHandler & aEventHandler ) [virtual]

Parameters

MAsyncEventHandler & aEventHandler

ToneFinished(TInt)

void ToneFinished ( TInt aError ) [private, virtual]

Parameters

TInt aError

Member Enumerations Documentation

Enum TCodec

Enumerators

EUseARMCodec = 0
EUseHWCodec

Enum TError

Enumerators

ECantCreateBuffer
EEmptyBuffer
EDevSoundNotLoaded
EUnknown

Enum TState

Enumerators

EIdle = 0
EPaused
EDevSoundReady
EBufferEmpty

Member Data Documentation

CActiveSchedulerWait * iActiveSchedulerWait

CActiveSchedulerWait * iActiveSchedulerWait [private]

TRequestStatus iBufferStatus

TRequestStatus iBufferStatus

Buffer completion status.

MDataSink * iConsumer

MDataSink * iConsumer [private]

TFourCC iDataTypeCode

TFourCC iDataTypeCode [private]

CMMFBuffer * iDevSoundBuf

CMMFBuffer * iDevSoundBuf [private]

TBool iDevSoundLoaded

TBool iDevSoundLoaded [private]

TError iError

TError iError [private]

MAsyncEventHandler * iEventHandler

MAsyncEventHandler * iEventHandler [private]

TBool iFirstBufferRead

TBool iFirstBufferRead [private]

TBool iFirstBufferRequested

TBool iFirstBufferRequested [private]

TInt iInitializeState

TInt iInitializeState [private]

CMMFDevSound * iMMFDevSound

CMMFDevSound * iMMFDevSound [private]

TInt iMMFDevsoundError

TInt iMMFDevsoundError [private]

TBool iPausePending

TBool iPausePending [private]

TMMFPrioritySettings iPrioritySettings

TMMFPrioritySettings iPrioritySettings [private]

TUint iSinkChannels

TUint iSinkChannels [private]

TFourCC iSinkFourCC

TFourCC iSinkFourCC [private]

TUint iSinkSampleRate

TUint iSinkSampleRate [private]

TState iState

TState iState [private]

TBool iStopped

TBool iStopped [private]