class CMMFDataPath2 : public CMMFDataPath |
This class is an extended version of CMMFDataPath. CMMFDataPath is extended to implement the loop play functionality in the controller. This class overrides some of the virual functions of CMMFDataPath in order to implement the loop play functionality. All the controller plugins that require loop play functionality should use CMMFDataPath2 in place of CMMFDataPath.
Public Member Functions | |
---|---|
~CMMFDataPath2() | |
void | BufferFilledL(CMMFBuffer *) |
IMPORT_C CMMFDataPath2 * | NewL(MAsyncEventHandler &) |
IMPORT_C CMMFDataPath2 * | NewL(TMediaId, MAsyncEventHandler &) |
IMPORT_C CMMFDataPath2 * | NewL(TUid, MAsyncEventHandler &) |
IMPORT_C CMMFDataPath2 * | NewL(TUid, TMediaId, MAsyncEventHandler &) |
void | Pause() |
void | PlayL() |
TTimeIntervalMicroSeconds | Position() |
IMPORT_C void | PreEmptionPause() |
void | PrimeL() |
void | ResetL() |
IMPORT_C void | RetainRepeatInfo() |
void | RunL() |
IMPORT_C void | SetDrmProperties(MDataSource *, TBool *) |
void | SetPositionL(const TTimeIntervalMicroSeconds &) |
IMPORT_C void | SetRepeats(TInt, const TTimeIntervalMicroSeconds &) |
void | Stop() |
Protected Member Functions | |
---|---|
CMMFDataPath2(TMediaId, MAsyncEventHandler &) | |
TTimeIntervalMicroSeconds | CalculateAudioOutputPosition() |
void | ConstructL(TUid) |
void | DoCancel() |
void | DoFillSourceBufferL() |
void | DoPauseL() |
void | DoPreEmptionPauseL() |
TInt | DoRepeatTrailingSilenceTimerCompleteL() |
void | DoStopL() |
void | FillSourceBufferL() |
TTimeIntervalMicroSeconds | OutputPosition() |
void | PlaySilence() |
TInt | RepeatTrailingSilenceTimerComplete(TAny *) |
Inherited Enumerations | |
---|---|
CActive:TPriority | |
CMMFDataPath:TDataPathState | |
CMMFDataPath:TNeedBuffer | |
CMMFDataPath:TTransferState |
CMMFDataPath2 | ( | TMediaId | aMediaId, |
MAsyncEventHandler & | aEventHandler | ||
) | [protected] |
TMediaId aMediaId | |
MAsyncEventHandler & aEventHandler |
void | BufferFilledL | ( | CMMFBuffer * | aBuffer | ) | [virtual] |
Indicates the data source has filled the specified buffer.
Called by the CMMFDataPath2's MDataSource when it has filled the buffer.
CMMFBuffer * aBuffer | A pointer to the filled buffer. |
TTimeIntervalMicroSeconds | CalculateAudioOutputPosition | ( | ) | const [protected] |
void | ConstructL | ( | TUid | aCodecUid = KNullUid | ) | [protected] |
Takes UID of codec on construction, and if not an NULL codec sets the datapath up for codec instantiation.
TUid aCodecUid = KNullUid | The UID of the codec. |
void | DoPauseL | ( | ) | [protected] |
This is a virtual function datapath (or derivations off) that can be implemented but may be left blank for default behaviour.
Additional Pause method specific to this datapath.
The DataPath implements pause by recording the current position and stopping the source and sink. When Play is called the DataPath uses the stored position as the starting point and resumes playing. The reason for this (rather than using the PauseL() API on sources and sinks) is that some implementations do not support a suitable pause, therefore the DataPath is implemented to support the lowest common denominator.
Note: A suitable pause implementation will retain any buffers in use. There will be no need to call PrimeL() prior to PlayL().
void | DoPreEmptionPauseL | ( | ) | [protected] |
Pauses playing.
Sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
void | DoStopL | ( | ) | [protected] |
This is a virtual function datapath (or derivations off) that can be implemented but may be left blank for default behaviour.
Additional Stop() method specific to this datapath.
IMPORT_C CMMFDataPath2 * | 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.
MAsyncEventHandler & aEventHandler | Installs an event handler to provide message passing between clients and sources/sinks. |
IMPORT_C CMMFDataPath2 * | NewL | ( | TMediaId | aMediaId, |
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.
TMediaId aMediaId | Optional media ID parameter when there are multiple media types. |
MAsyncEventHandler & aEventHandler | Installs an event handler to provide message passing between clients and sources/sinks. |
IMPORT_C CMMFDataPath2 * | NewL | ( | TUid | aCodecUid, |
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
TUid aCodecUid | Optional mediaID parameter when there are multiple media types |
MAsyncEventHandler & aEventHandler | Installs an event handler to provide message passing between clients and sources/sinks. |
IMPORT_C CMMFDataPath2 * | NewL | ( | TUid | aCodecUid, |
TMediaId | aMediaId, | |||
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.
TUid aCodecUid | The codec UID. |
TMediaId aMediaId | Optional mediaID parameter when there are multiple media types. |
MAsyncEventHandler & aEventHandler | Installs an event handler to provide message passing between clients and sources/sinks. |
void | Pause | ( | ) | [virtual] |
Pauses playing.
Sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
void | PlayL | ( | ) | [virtual] |
Starts an active scheduler 'play' loop.
Can only play from the primed state.
void | PrimeL | ( | ) | [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().
TInt | RepeatTrailingSilenceTimerComplete | ( | TAny * | aDataPath | ) | [protected, static] |
TAny * aDataPath |
void | ResetL | ( | ) | [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.
IMPORT_C void | RetainRepeatInfo | ( | ) |
This call indicates PlayL not to reset the iNumberOfTimesPlayed property. This method is used by the controller plugin during repositioning. PlayL call during seeking should not reset the iNumberOfTimesPlayed property.
void | RunL | ( | ) | [virtual] |
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.
IMPORT_C void | SetDrmProperties | ( | MDataSource * | iDrmSource, |
TBool * | aDisableAutoIntent | |||
) |
Sets the Drm file source and the automatic execute intent flag. This method is used by the controller plugin to pass these to the datapath in order to execute the play intent during loop play.
MDataSource * iDrmSource | Data Source on which the play intent needs to be executed. This is usually the CMMFFile source |
TBool * aDisableAutoIntent | Boolean variable which states whether the controller plugin or the datapath needs to execute play intent automatically or not. |
void | SetPositionL | ( | const TTimeIntervalMicroSeconds & | aPosition | ) | [virtual] |
Sets the data path position.
const TTimeIntervalMicroSeconds & aPosition | The data path position. |
IMPORT_C void | SetRepeats | ( | TInt | aRepeatNumberOfTimes, |
const TTimeIntervalMicroSeconds & | aTrailingSilence | |||
) |
Sets the number of times the audio sample is to be repeated during the playback operation.
A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
TInt aRepeatNumberOfTimes | The number of times the audio sample, together with the trailing silence, is to be repeated. If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, is repeated indefinitely or until Stop() is called. If this is set to zero, then the audio sample is not repeated. |
const TTimeIntervalMicroSeconds & aTrailingSilence | The time interval of the trailing silence in microseconds. |
void | Stop | ( | ) | [virtual] |
Stops playing.
Resets datapath position - currently does not clean up buffers. Sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
TTimeIntervalMicroSeconds | iDevSoundRepositionTime | [protected] |
TInt | iNumberOfTimesToRepeat | [protected] |
The number of times to repeat the audio sample.
CPeriodic * | iRepeatTrailingSilenceTimer | [protected] |
Timer used for trailing silences when repeating
TTimeIntervalMicroSeconds | iTimeLeftToPlayComplete | [protected] |
The time left for the play to be completed in a particular repeat
TTimeIntervalMicroSeconds | iTrailingSilence | [protected] |
The time interval of the trailing silence in microseconds.
TTimeIntervalMicroSeconds | iTrailingSilenceLeftToPlay | [protected] |
The time interval of the trailing silence left to play in microseconds.
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.