CMMFDataPath Class Reference

#include <mmf/server/mmfdatapath.h>

Link against: mmfserverbaseclasses.lib

class CMMFDataPath : public CActive, public MDataSink, public MDataSource, public MAsyncEventHandler

Nested Classes and Structures

Protected Attributes
TBool iAllDataSentToSink
TInt iBuffersToUse
TTimeIntervalMicroSeconds iCachedSourceDuration
CMMFCodec *iCodec
TCodecProcessResult iCodecProcessResult
CCompleteCallback *iCompleteCallback
TUint iCurrentSinkFrameNumber
TUint iCurrentSourceFrameNumber
TUint iDataPathCompletedErrorCode
TBool iDataPathCreated
MDataSink *iDataSink
MDataSource *iDataSource
MAsyncEventHandler &iEventHandler
TMediaId iMediaId
TBool iNoMoreSourceData
TBool iObtainingAsyncSinkBuffer
TBool iObtainingAsyncSourceBuffer
TBool iPauseCalled
TTimeIntervalMicroSeconds iPlayWindowEndPosition
TTimeIntervalMicroSeconds iPlayWindowStartPosition
TInt iReferenceAudioSamplesPlayed
TInt iReferenceAudioSamplesRecorded
CMMFBuffer *iSinkBuffer
TBool iSinkBufferWithSink
TBool iSinkCanReceive
TFourCC iSinkFourCC
TBool iSnkBufRef
CMMFBuffer *iSourceBuffer
TBool iSourceBufferWithSource
TFourCC iSourceFourCC
TBool iSrcBufRef
TTimeIntervalMicroSeconds iStartPosition
TDataPathState iState
TTransferState iTransferState
TBool iUseSuppliedCodecUid
Public Member Enumerations
enumTDataPathState { EStopped, EPrimed, EPlaying, ERecording, EConverting }
Protected Member Enumerations
enumTNeedBuffer { ENoBuffers, ENeedSinkBuffer, ENeedSourceBuffer }
enumTTransferState { EWaitSink, EWaitSource, EInitializeSink, EInitializeSource, ..., EEndOfData }
Public Member Functions
virtual ~CMMFDataPath()
virtual IMPORT_C voidAddDataSinkL(MDataSink *)
virtual IMPORT_C voidAddDataSourceL(MDataSource *)
virtual IMPORT_C voidBufferEmptiedL(CMMFBuffer *)
virtual IMPORT_C voidBufferFilledL(CMMFBuffer *)
virtual IMPORT_C TBoolCanCreateSinkBuffer()
virtual IMPORT_C TBoolCanCreateSourceBuffer()
virtual IMPORT_C voidClearPlayWindowL()
virtual IMPORT_C CMMFBuffer *CreateSinkBufferL(TMediaId)
virtual IMPORT_C CMMFBuffer *CreateSinkBufferL(TMediaId, TBool &)
virtual IMPORT_C CMMFBuffer *CreateSourceBufferL(TMediaId)
virtual IMPORT_C CMMFBuffer *CreateSourceBufferL(TMediaId, TBool &)
virtual IMPORT_C voidDoCancel()
IMPORT_C TIntDoSendEventToClient(TUid, TInt)
virtual IMPORT_C voidEmptyBufferL(CMMFBuffer *, MDataSource *, TMediaId)
virtual IMPORT_C voidFillBufferL(CMMFBuffer *, MDataSink *, TMediaId)
IMPORT_C CMMFDataPath *NewL(MAsyncEventHandler &)
IMPORT_C CMMFDataPath *NewL(TMediaId, MAsyncEventHandler &)
IMPORT_C CMMFDataPath *NewL(TUid, MAsyncEventHandler &)
IMPORT_C CMMFDataPath *NewL(TUid, TMediaId, MAsyncEventHandler &)
virtual IMPORT_C voidPause()
virtual IMPORT_C voidPlayL()
virtual IMPORT_C TTimeIntervalMicroSecondsPosition()
virtual IMPORT_C voidPrimeL()
virtual IMPORT_C voidResetL()
virtual IMPORT_C TIntRunError(TInt)
virtual IMPORT_C voidRunL()
IMPORT_C TIntSetBlockLength(TUint)
virtual IMPORT_C voidSetPlayWindowL(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)
virtual IMPORT_C voidSetPositionL(const TTimeIntervalMicroSeconds &)
virtual IMPORT_C TFourCCSinkDataTypeCode(TMediaId)
virtual IMPORT_C TFourCCSourceDataTypeCode(TMediaId)
virtual IMPORT_C TIntState()
virtual IMPORT_C voidStop()
Protected Member Functions
CMMFDataPath(TMediaId, MAsyncEventHandler &)
TInt AudioSamplesPlayed()
TInt AudioSamplesRecorded()
TTimeIntervalMicroSeconds CalculateAudioInputPosition()
TTimeIntervalMicroSeconds CalculateAudioOutputPosition()
IMPORT_C voidConstructL(TUid)
virtual IMPORT_C voidConstructSinkL(const TDesC8 &)
virtual IMPORT_C voidConstructSourceL(const TDesC8 &)
TInt DetermineBuffersToUseL(void)
virtual IMPORT_C voidEndOfData()
TTimeIntervalMicroSeconds InputPosition()
TTimeIntervalMicroSeconds OutputPosition()
Inherited Attributes
CActive::iStatus
Inherited Enumerations
CActive:TPriority
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
MDataSink::DataSinkType()const
MDataSink::MDataSink(TUid)
MDataSink::NegotiateL(MDataSource &)
MDataSink::NewSinkL(TUid,const TDesC8 &)
MDataSink::NewSinkLC(TUid,const TDesC8 &)
MDataSink::SetSinkDataTypeCode(TFourCC,TMediaId)
MDataSink::SetSinkPrioritySettings(const TMMFPrioritySettings &)
MDataSink::SinkCustomCommand(TMMFMessage &)
MDataSink::SinkPauseL()
MDataSink::SinkPlayL()
MDataSink::SinkPrimeL()
MDataSink::SinkStopL()
MDataSink::SinkThreadLogoff()
MDataSink::SinkThreadLogon(MAsyncEventHandler &)
MDataSink::~MDataSink()
MDataSource::CreateSourceBufferL(TMediaId,CMMFBuffer &,TBool &)
MDataSource::DataSourceType()const
MDataSource::MDataSource(TUid)
MDataSource::NegotiateSourceL(MDataSink &)
MDataSource::NewSourceL(TUid,const TDesC8 &)
MDataSource::NewSourceLC(TUid,const TDesC8 &)
MDataSource::SetSourceDataTypeCode(TFourCC,TMediaId)
MDataSource::SetSourcePrioritySettings(const TMMFPrioritySettings &)
MDataSource::SourceCustomCommand(TMMFMessage &)
MDataSource::SourcePauseL()
MDataSource::SourcePlayL()
MDataSource::SourcePrimeL()
MDataSource::SourceSampleConvert()
MDataSource::SourceStopL()
MDataSource::SourceThreadLogoff()
MDataSource::SourceThreadLogon(MAsyncEventHandler &)
MDataSource::~MDataSource()

Detailed Description

Deprecated

Abstract utility class that moves data from a single data source to a single data sink, via a codec if required.

All functions are exported form the DLL and are virtual to allow plugins to define their own data paths.

Member Attribute Documentation

iAllDataSentToSink

TBool iAllDataSentToSink[protected]

Indicates that all data has been sent to the sink.

iBuffersToUse

TInt iBuffersToUse[protected]

Holds the outcome of the call to DetermineBuffersToUseL

iCachedSourceDuration

TTimeIntervalMicroSeconds iCachedSourceDuration[protected]

This value can be used to obtain the duration of the source when playing or converting.

This is an optimisation as this value will not change if we are playing or converting.

iCodec

CMMFCodec *iCodec[protected]

Codec in use. Null Codec is signified by == NULL

iCodecProcessResult

TCodecProcessResult iCodecProcessResult[protected]

Result of processing the codec.

iCompleteCallback

CCompleteCallback *iCompleteCallback[protected]

Pointer to internal callback completion class

iCurrentSinkFrameNumber

TUint iCurrentSinkFrameNumber[protected]

The sink's position in terms of frames or some other time fixed parameter.

iCurrentSourceFrameNumber

TUint iCurrentSourceFrameNumber[protected]

The source's position in terms of frames or some other time fixed parameter.

iDataPathCompletedErrorCode

TUint iDataPathCompletedErrorCode[protected]

Datapath completed because of an error; usually KErrNone.

iDataPathCreated

TBool iDataPathCreated[protected]

Set to ETrue when the data path has a source and a sink and can send data from the source to the sink.

iDataSink

MDataSink *iDataSink[protected]

The sink of data for which the CMMFDataPath is a MDataSource for

iDataSource

MDataSource *iDataSource[protected]

The source of data to which the CMMFDataPath is a MDataSink for.

iEventHandler

MAsyncEventHandler &iEventHandler[protected]

Event handler.

iMediaId

TMediaId iMediaId[protected]

Identifies which media type and stream within MDataSource.

iNoMoreSourceData

TBool iNoMoreSourceData[protected]

Indicates that all data has been obtained from the source (ETrue if there is no more source data).

iObtainingAsyncSinkBuffer

TBool iObtainingAsyncSinkBuffer[protected]

Indicates asynchrous buffers from AudioOutput.

iObtainingAsyncSourceBuffer

TBool iObtainingAsyncSourceBuffer[protected]

Indicates asynchrous buffers from AudioInput.

iPauseCalled

TBool iPauseCalled[protected]

Indicates DoPauseL() has been called.

iPlayWindowEndPosition

TTimeIntervalMicroSeconds iPlayWindowEndPosition[protected]

End position of the play window.

iPlayWindowStartPosition

TTimeIntervalMicroSeconds iPlayWindowStartPosition[protected]

Start position of the play window.

iReferenceAudioSamplesPlayed

TInt iReferenceAudioSamplesPlayed[protected]

Holds the number of samples played on audio output at a point where we

want to reference play duration from.

iReferenceAudioSamplesRecorded

TInt iReferenceAudioSamplesRecorded[protected]

Holds the number of samples recorded from audio input at a point where we

want to reference record duration from.

iSinkBuffer

CMMFBuffer *iSinkBuffer[protected]

This is set to point to whichever sink buffer is in use.

iSinkBufferWithSink

TBool iSinkBufferWithSink[protected]

Flag to indicate that a buffer is with the sink.

This are necessary as it is imperrative that when a buffer is with the sink, it must

not be referenced in any way. The reason for this is that it is not mandated that sinks

maintain buffer references. For example, it is valid for DevSound to request more audio data in a

different buffer to the one supplied to it.

iSinkCanReceive

TBool iSinkCanReceive[protected]

Set to true when the sink is able to accept data. EFalse otherwise.

iSinkFourCC

TFourCC iSinkFourCC[protected]

The sink's data type. Same as the codec input data type.

iSnkBufRef

TBool iSnkBufRef[protected]

ETrue if sink buffer is reference to object owned by someone else

iSourceBuffer

CMMFBuffer *iSourceBuffer[protected]

This is the pointer to whichever source buffer is in use

iSourceBufferWithSource

TBool iSourceBufferWithSource[protected]

Flag to indicate that a buffer is with the source.

This is necessary as it is imperrative that when a buffer is with the source, it must

not be referenced in any way. The reason for this is that it is not mandated that sources

maintain buffer references. For example, it is valid for DevSound to return recorded data in a

different buffer to the one supplied to it.

iSourceFourCC

TFourCC iSourceFourCC[protected]

The source's data type. Same as the codec output data type.

iSrcBufRef

TBool iSrcBufRef[protected]

ETrue if the source buffer is reference to object owned by someone else.

iStartPosition

TTimeIntervalMicroSeconds iStartPosition[protected]

The position audio will start playing from.

When stopping, this is set to iPlayWindowStartPosition.

When pausing, this is set to the current position.

iState

TDataPathState iState[protected]

Current data path state.

See also: TDataPathState

iTransferState

TTransferState iTransferState[protected]

Current transfer state.

See also: TTransferState

iUseSuppliedCodecUid

TBool iUseSuppliedCodecUid[protected]

Set to true if data path has to use a supplied codec in its construction.

Member Enumeration Documentation

Enum TDataPathState

Indicates the state of the data path.

Mimics typical MultiMedia behaviour of stopped, primed and playing

EnumeratorValueDescription
EStopped

Stopped.

EPrimed

Primed.

EPlaying

Playing.

ERecording

Recording.

EConverting

Converting.

Enum TNeedBuffer

This indicates what buffers are required in order to operate.

If a real Codec is in use, buffers are required from both source and sink,

else only one is required and source is preferred.

EnumeratorValueDescription
ENoBuffers0x0

No buffers needed.

ENeedSinkBuffer0x01

Sink buffer needed.

ENeedSourceBuffer0x10

Source buffer needed.

Enum TTransferState

Indicates the transfer state.

Buffers maybe be filled, emptied, or have "one" shot initialisatings performed upon them.

TTransferState is used within the datapath RunL which drives databuffer exchange.

EnumeratorValueDescription
EWaitSink

Waiting on a BufferEmptied callback from sink

EWaitSource

Waiting on a BufferFilled callback from source

EInitializeSink

Initialize the sink.

EInitializeSource

Initialize the source.

ENeedSourceData

Source buffer does not contain data.

ENeedSinkData

Sink buffer does not contain data.

ENeedToMatchSourceToSink

There is more source data to send to the sink and need to match sink and source.

ESendDataToSink

Outstanding data to send to sink.

EEndOfData

End of data.

Constructor & Destructor Documentation

CMMFDataPath ( TMediaId, MAsyncEventHandler & )

CMMFDataPath(TMediaIdaMediaId,
MAsyncEventHandler &aEventHandler
)[protected, inline]

~CMMFDataPath ( )

IMPORT_C~CMMFDataPath()[virtual]

Standard destructor.

Member Function Documentation

AddDataSinkL ( MDataSink * )

IMPORT_C voidAddDataSinkL(MDataSink *aSink)[virtual]

Adds a data sink to the datapath and, if the source already exists, tries to establish a connection

between the source and sink.

Parameters
aSinkThe data sink to add to the data path.

AddDataSourceL ( MDataSource * )

IMPORT_C voidAddDataSourceL(MDataSource *aSource)[virtual]

Adds a data source to the datapath and, if the sink already exists, tries to establish a connection

between the source and sink.

Parameters
aSourceThe data source to add to the data path.

AudioSamplesPlayed ( )

TInt AudioSamplesPlayed()const [protected]

AudioSamplesRecorded ( )

TInt AudioSamplesRecorded()const [protected]

BufferEmptiedL ( CMMFBuffer * )

IMPORT_C voidBufferEmptiedL(CMMFBuffer *aBuffer)[virtual]

Indicates the data sink has emptied the buffer.

Called by the CMMFDataPath's MDataSink when it has emptied the buffer

Parameters
aBufferThe emptied buffer.

BufferFilledL ( CMMFBuffer * )

IMPORT_C voidBufferFilledL(CMMFBuffer *aBuffer)[virtual]

Indicates the data source has filled the specified buffer.

Called by the CMMFDataPath's MDataSource when it has filled the buffer.

Parameters
aBufferA pointer to the filled buffer.

CalculateAudioInputPosition ( )

TTimeIntervalMicroSeconds CalculateAudioInputPosition()const [protected]

CalculateAudioOutputPosition ( )

TTimeIntervalMicroSeconds CalculateAudioOutputPosition()const [protected]

CanCreateSinkBuffer ( )

IMPORT_C TBoolCanCreateSinkBuffer()[virtual]

Tests whether the data path can create a sink buffer.

The default implementation returns false.

Return Value
ETrue if the data path can create a sink buffer. EFalse if the data path cannot create a sink buffer.

CanCreateSourceBuffer ( )

IMPORT_C TBoolCanCreateSourceBuffer()[virtual]

Tests whether the data path can create a source buffer.

Would expect datapath to always return NULL, so this is a default implementation of a pure virtual from MDataSink.

The default implementation returns EFalse.

Return Value
ETrue if the data path can create a source buffer. EFalse if the data path cannot create a source buffer.

ClearPlayWindowL ( )

IMPORT_C voidClearPlayWindowL()[virtual]

Sets the play window to the full length of clip.

ConstructL ( TUid )

IMPORT_C voidConstructL(TUidaCodecUid = KNullUid)[protected]

Takes UID of codec on construction, and if not an NULL codec sets the datapath up for codec instantiation.

Parameters
aCodecUidThe UID of the codec.

ConstructSinkL ( const TDesC8 & )

IMPORT_C voidConstructSinkL(const TDesC8 &aInitData)[protected, virtual]

Constructs a sink.

Overridable constuction specific to this datasource.

The default implementation leaves with KErrNotSupported.

Parameters
aInitDataThe initialisation data.

ConstructSourceL ( const TDesC8 & )

IMPORT_C voidConstructSourceL(const TDesC8 &aInitData)[protected, virtual]

Constructs a source.

The default implementation leaves with KErrNotSupported.

Parameters
aInitDataThe initialisation data.

CreateSinkBufferL ( TMediaId )

IMPORT_C CMMFBuffer *CreateSinkBufferL(TMediaIdaMediaId)[virtual]

Creates a sink buffer according to the specifed media ID.

Intended for synchronous usage (buffers supplied by datapath for an MDataSink).

This method is essentially a dummy implementation of an MDataSink pure virtual.

The default implementation returns NULL.

Parameters
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving of different media types.
Return Value
Returns NULL in this instance as datapath can't create sink buffers

CreateSinkBufferL ( TMediaId, TBool & )

IMPORT_C CMMFBuffer *CreateSinkBufferL(TMediaIdaMediaId,
TBool &aReference
)[virtual]

Creates a sink buffer according to the specifed media ID and reference.

Intended for asynchronous usage (buffers supplied by Devsound device).

This method is essentially a dummy implementation of an MDataSink pure virtual.

The default implementation returns NULL.

Parameters
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving for different media types.
aReferenceA boolean indicating buffer ownership.
Return Value
Returns NULL in this instance as datapath can't create sink buffers.

CreateSourceBufferL ( TMediaId )

IMPORT_C CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId)[virtual]

Creates a source buffer.

Intended for synchronous usage (buffers supplied by datapath for a MDataSource)

This method is essentially a dummy implementation of an MDataSource pure virtual.

The default implementation leaves with KErrNotSupported and returns NULL.

Parameters
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving of different media types.
Return Value
A pointer to a newly created buffer. Returns NULL in this instance as datapath can't create source buffers

CreateSourceBufferL ( TMediaId, TBool & )

IMPORT_C CMMFBuffer *CreateSourceBufferL(TMediaIdaMediaId,
TBool &aReference
)[virtual]

Creates a source buffer according to the specifed media ID and reference.

Intended for asynchronous usage (buffers supplied by datapath for a MDataSource)

This method is essentially a dummy implementation of an MDataSource pure virtual.

The default implementation leaves with KErrNotSupported and returns NULL.

Parameters
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving of different media types.
aReferenceA boolean indicating buffer ownership. ETrue if the MDataSource owns the buffer, EFalse if the caller owns the buffer.
Return Value
A pointer to a newly created buffer. Returns NULL in this instance as datapath can't create source buffers.

DetermineBuffersToUseL ( void )

TInt DetermineBuffersToUseL(void)const [protected]

DoCancel ( )

IMPORT_C voidDoCancel()[virtual]

Reimplemented from CActive::DoCancel()

Cancels the clip.

The default implementation is empty.

DoSendEventToClient ( TUid, TInt )

IMPORT_C TIntDoSendEventToClient(TUidaEventType,
TIntaErrorCode
)

Passes error handling and general messages up to clients.

Parameters
aEventTypeCategory code for the event. Category codes can be used as unique identifers.
aErrorCodeStandard error code.
Return Value
The event code sent to client.

EmptyBufferL ( CMMFBuffer *, MDataSource *, TMediaId )

IMPORT_C voidEmptyBufferL(CMMFBuffer *aBuffer,
MDataSource *aSupplier,
TMediaIdaMediaId
)[virtual]

Clears the specified buffer.

Pure virtual dummy implementation, not needed by datapath

comes from MDataSink - CMMFData path is a sink to its MDataSource.

This is only required for an active push MDataSource requesting a buffer empty.

Parameters
aBufferThe buffer to empty.
aSupplierThe MDataSource supplying this buffer.
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving of different media types.

EndOfData ( )

IMPORT_C voidEndOfData()[protected, virtual]

Forces and end of data state on the datapath

FillBufferL ( CMMFBuffer *, MDataSink *, TMediaId )

IMPORT_C voidFillBufferL(CMMFBuffer *aBuffer,
MDataSink *aConsumer,
TMediaIdaMediaId
)[virtual]

Fills the specified buffer.

Pure virtual dummy implementation, not needed by datapath

comes from MDataSink - CMMFData path is a source to its MDataSink

Only required for an active pull MDataSink requesting a buffer fill. The default implementation is empty.

Parameters
aBufferThe buffer to fill.
aConsumerThe MDataSink supplying this buffer.
aMediaIdAn optional mediaID parameter when there are multiple buffers arriving of different media types

InputPosition ( )

TTimeIntervalMicroSeconds InputPosition()const [protected]

NewL ( MAsyncEventHandler & )

IMPORT_C CMMFDataPath *NewL(MAsyncEventHandler &aEventHandler)[static]

Allocates and constructs a data path.

Use this function if the codec UID is not already known by CMMFController

and there is no data path ambiguity - ie only one data path is possible.

Will create codec via fourCC.

Parameters
aEventHandlerInstalls an event handler to provide message passing between clients and sources/sinks.
Return Value
Newly constructed data path object.

NewL ( TMediaId, MAsyncEventHandler & )

IMPORT_C CMMFDataPath *NewL(TMediaIdaMediaId,
MAsyncEventHandler &aEventHandler
)[static]

Allocates and constructs a data path according to the specified media ID.

Use this function if the codec UID is not already known by CMMFController

and there is ambiguity with the data path ie. there is more than one possible data path.

Parameters
aMediaIdOptional media ID parameter when there are multiple media types.
aEventHandlerInstalls an event handler to provide message passing between clients and sources/sinks.
Return Value
A newly constructed data path object.

NewL ( TUid, MAsyncEventHandler & )

IMPORT_C CMMFDataPath *NewL(TUidaCodecUid,
MAsyncEventHandler &aEventHandler
)[static]

Allocates and constructs a data path according to the specified codec UID.

Use this function if the codec UID is already known by CMMFController

and there is no data path ambiguity ie. only one data path is possible

will create codec explicitly using the supplied codec Uid

Parameters
aCodecUidOptional mediaID parameter when there are multiple media types
aEventHandlerInstalls an event handler to provide message passing between clients and sources/sinks.
Return Value
A newly constructed data path object.

NewL ( TUid, TMediaId, MAsyncEventHandler & )

IMPORT_C CMMFDataPath *NewL(TUidaCodecUid,
TMediaIdaMediaId,
MAsyncEventHandler &aEventHandler
)[static]

Allocates and constructs a data path according to the specified codec UID.

Use this function if the codec UID is already known by CMMFController

and there is ambiguity ie. more than one possible data path.

TMediaId used to select the path.

Parameters
aCodecUidThe codec UID.
aMediaIdOptional mediaID parameter when there are multiple media types.
aEventHandlerInstalls an event handler to provide message passing between clients and sources/sinks.
Return Value
A newly constructed data path object.

OutputPosition ( )

TTimeIntervalMicroSeconds OutputPosition()const [protected]

Pause ( )

IMPORT_C voidPause()[virtual]

Pauses playing.

Sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.

PlayL ( )

IMPORT_C voidPlayL()[virtual]

Starts an active scheduler 'play' loop.

Can only play from the primed state.

Position ( )

IMPORT_C TTimeIntervalMicroSecondsPosition()const [virtual]

Gets the data path position.

Return Value
The data path position.

PrimeL ( )

IMPORT_C voidPrimeL()[virtual]

Allocates buffers in preparation to play.

Must be called before calling PlayL().

iSnkBufRef and iSrcBufRef contain ETrue if these buffers are created and owned by a MDataSource or MDataSink

For clean-up purposes, datapath only cleans up buffers allocated directly by PrimeL().

ResetL ( )

IMPORT_C voidResetL()[virtual]

Deletes buffers if this datapath's sources and sinks own the buffers returned by PrimeL().

Typically if buffers are created asychronously, the datapath doesn't own the buffer

so leaves cleanup handling to the owner sources/sinks.

Called when source and sink needs to be de-referenced. Sets iDataPathCreated, iSinkCanReceive,

iSnkBufRef and iSrcBufRef to EFalse; sets iState to EStopped.

RunError ( TInt )

IMPORT_C TIntRunError(TIntaError)[virtual]

Reimplemented from CActive::RunError(TInt)

Handles errors coming from attached sources and passes them to the clients.

Parameters
aErrorStandard error code (KErrNone = No Error).
Return Value
The event code returned to the data path. KErrNone if end of file is encountered.

RunL ( )

IMPORT_C voidRunL()[virtual]

Reimplemented from CActive::RunL()

Runs the clip depending on the current data path and transfer state.

For example, fills the sink buffer if TDataPathState is EPlaying and TTransferState is ENeedSinkData.

SetBlockLength ( TUint )

IMPORT_C TIntSetBlockLength(TUintaBlockLength)

SetPlayWindowL ( const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds & )

IMPORT_C voidSetPlayWindowL(const TTimeIntervalMicroSeconds &aStart,
const TTimeIntervalMicroSeconds &aEnd
)[virtual]

Sets the play window absolutely (i.e. the parameters are relative to the start of the entire clip).

Parameters
aStartThe offset from the start of the Clip
aEndThe offset from the end of the clip (if this is less than aStart, then the two will be inverted).

SetPositionL ( const TTimeIntervalMicroSeconds & )

IMPORT_C voidSetPositionL(const TTimeIntervalMicroSeconds &aPosition)[virtual]

Sets the data path position.

Parameters
aPositionThe data path position.

SinkDataTypeCode ( TMediaId )

IMPORT_C TFourCCSinkDataTypeCode(TMediaIdaMediaId)[virtual]

Gets the sink's data type for the specified media ID.

Parameters
aMediaIdAn optional parameter to specifiy the specific stream when datasource contains more than one stream of data
Return Value
The sink's data type.

SourceDataTypeCode ( TMediaId )

IMPORT_C TFourCCSourceDataTypeCode(TMediaIdaMediaId)[virtual]

Gets the source data type for the specified media ID.

Parameters
aMediaIdAn optional parameter to specifiy specific stream when datasource contains more than one stream of data.
Return Value
The source data type.

State ( )

IMPORT_C TIntState()[virtual]

Returns the current data path state.

Stop ( )

IMPORT_C voidStop()[virtual]

Stops playing.

Resets datapath position - currently does not clean up buffers. Sends KMMFErrorCategoryDataPathGeneralError

to the client if an error occurs.