Location:
MmfAudioInput.h
Link against: mmfaudioinput.lib
class CMMFAudioInput : public CBase, public MMMFAudioInput, public MDevSoundObserver;
Concrete data source to provide microphone support.
Intended to be used by controller plugin developers for source plugins. Uses CMMFDevSound
to access hardware.
MDevSoundObserver
- An interface to a set of DevSound callback functions
MDataSource
- Abstract class representing a data source
MMMFAudioInput
- Interface class to allow dynamic linkage to
CBase
- Base class for all classes to be instantiated on the heap
CMMFAudioInput
- Concrete data source to provide microphone support
Defined in CMMFAudioInput
:
BufferEmptiedL()
, BufferToBeEmptied()
, BufferToBeFilled()
, BytesPlayed()
, CanCreateSourceBuffer()
, ConstructSourceL()
, ConvertError()
, CreateSourceBufferL()
, CreateSourceBufferL()
, CreateSourceBufferL()
, CreateSourceBufferL()
, DataType()
, DeviceMessage()
, FillBufferL()
, HWFillBufferL()
, InitializeComplete()
, NegotiateSourceL()
, PlayError()
, RecordError()
, SendEventToClient()
, SetDataTypeL()
, SetSourceDataTypeCode()
, SetSourcePrioritySettings()
, SoundDevice()
, SourceDataTypeCode()
, SourcePauseL()
, SourcePlayL()
, SourcePrimeL()
, SourceStopL()
, SourceThreadLogoff()
, SourceThreadLogon()
, ToneFinished()
, iBufferStatus
, ~CMMFAudioInput()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from MDataSource
:
DataSourceType()
,
NewSourceL()
,
SourceCustomCommand()
,
SourceSampleConvert()
Inherited from MMMFAudioInput
:
NewAudioInputL()
virtual TFourCC SourceDataTypeCode(TMediaId aMediaId);
Gets the data type code for the source specified by the media ID.
|
|
virtual void FillBufferL(CMMFBuffer *aBuffer, MDataSink *aConsumer, TMediaId aMediaId);
iMMFDevSound must be loaded.
Gets audio from MMFDevsound.
|
virtual void BufferEmptiedL(CMMFBuffer *aBuffer);
Indicates the data sink has emptied the buffer.
Called by the data path's MDataSink
when it has emptied the buffer.
The default implementation is empty.
|
virtual TBool CanCreateSourceBuffer();
Tests whether a source buffer can be created.
The default imlpementation returns true.
|
virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId);
Creates a source buffer.
Intended for synchronous usage.
|
|
inline virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer &aSinkBuffer);
Intended for synchronous usage (returns buffer specific to a Media Type).
|
|
virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, TBool &aReference);
Creates a source buffer.
Intended for asynchronous usage (buffers supplied by Devsound device)
|
|
inline virtual CMMFBuffer *CreateSourceBufferL(TMediaId aMediaId, CMMFBuffer &aSinkBuffer, TBool &aReference);
Creates a source buffer.
Intended for asynchronous usage (returns buffer specific to a Media Type).
|
|
virtual TInt SourceThreadLogon(MAsyncEventHandler &aEventHandler);
Logs on the source thread.
Thread specific initialization procedure for this device. Runs automatically on thread construction.
|
|
virtual void SourceThreadLogoff();
Logs off the source thread.
Thread specific destruction procedure for this device. Runs automatically on thread destruction.
virtual void SourcePrimeL();
Primes the source.
This is a virtual function that each derived class must implement, but may be left blank for default behaviour.
Overridable PrimeL method. Additional Prime method specific to this DataSource.
virtual void SourceStopL();
Stops the source.
This is a virtual function that each derived class must implement, but may be left blank for default behaviour.
Overridable StopL method. Additional Stop method specific to this DataSource.
virtual void SourcePlayL();
Plays the source.
This is a virtual function that each derived class must implement, but may be left blank for default behaviour.
Overridable PlayL method. Additional Play method specific to this DataSource.
virtual void SourcePauseL();
Pauses the source.
This is a virtual function that each derived class must implement, but may be left blank for default behaviour.
Overridable PauseL method. Additional Pause method specific to this DataSource.
virtual void SetSourcePrioritySettings(const TMMFPrioritySettings &aPrioritySettings);
Sets the source's priority settings.
|
virtual void NegotiateSourceL(MDataSink &aSink);
Negotiates with the sink.
Called if the source's setup depends on sink.
|
virtual TInt BytesPlayed();
Gets the number of bytes played.
|
virtual void HWFillBufferL(CMMFBuffer *aBuffer, MDataSink *aConsumer);
Gets audio from hardware device abstracted MMFDevsound (not used).
|
virtual CMMFDevSound &SoundDevice();
Dev Sound should be loaded.
Returns the sound device.
Accessor function exposing public CMMFDevsound methods.
|
virtual TInt SetSourceDataTypeCode(TFourCC aSourceFourCC, TMediaId aMediaId);
Sets the data type code for the source.
|
|
virtual void SetDataTypeL(TFourCC aAudioType);
This method should not be used - it is provided to maintain SC with v7.0s.
|
virtual TFourCC DataType() const;
This method should not be used - it is provided to maintain SC with v7.0s.
|
protected: virtual void ConstructSourceL(const TDesC8 &aInitData);
Overridable constuctor specific to this datasource.
|
private: virtual void InitializeComplete(TInt aError);
Handles initialization completion event.
A derived class must provide an implementation to handle the initialization request.
CMMFDevSound
object calls this function when its InitializeL() function completes.
|
private: virtual void ToneFinished(TInt aError);
ToneFinished MMFDevSoundObserver - should never get called.
|
private: virtual void BufferToBeFilled(CMMFBuffer *aBuffer);
BufferToBeFilled MMFDevSoundObserver - should never get called.
|
private: virtual void PlayError(TInt aError);
PlayError MMFDevSoundObserver - should never get called.
|
private: virtual void BufferToBeEmptied(CMMFBuffer *aBuffer);
BuffferToBeEmptied MMFDevSoundObserver Called when stopped due to error.
|
private: virtual void RecordError(TInt aError);
RecordError MMFDevSoundObserver Called when stopped due to error.
|
private: virtual void ConvertError(TInt aError);
ConvertError MMFDevSoundObserver - should never get called.
|
private: virtual void DeviceMessage(TUid aMessageType, const TDesC8 &aMsg);
Handles device event.
A derived class must provide an implementtion to handle the messages from audio hardware device.
CMMFDevSound
object calls this function when a message is received from the audio hardware device.
|
private: virtual void SendEventToClient(const TMMFEvent &);
Handles policy request completion event.
A derived class must provide an implementation to handle the policy request completion event.
CMMFDevSound
object calls this function when an attempt to acquire sound device is rejected by audio policy server.
|
TRequestStatus iBufferStatus;
Buffer completion status.