#include <mmf/server/mmfdatapathproxy.h>
class RMMFDataPathProxy : public RMMFSubThreadBase |
Public Member Functions | |
---|---|
RMMFDataPathProxy() | |
IMPORT_C TInt | AddDataSink(MDataSink *) |
IMPORT_C TInt | AddDataSource(MDataSource *) |
IMPORT_C TInt | ClearPlayWindow() |
IMPORT_C void | Close() |
IMPORT_C TInt | CreateSubThread() |
IMPORT_C TInt | GetPosition(TTimeIntervalMicroSeconds &) |
IMPORT_C TInt | LoadDataPath() |
IMPORT_C TInt | LoadDataPath(TMediaId) |
IMPORT_C TInt | LoadDataPath(TUid) |
IMPORT_C TInt | LoadDataPath(TUid, TMediaId) |
IMPORT_C TInt | Pause() |
IMPORT_C TInt | Play() |
IMPORT_C TInt | Prime() |
IMPORT_C TInt | SetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &) |
IMPORT_C TInt | SetPosition(const TTimeIntervalMicroSeconds &) |
IMPORT_C TInt | State(TInt &) |
IMPORT_C TInt | Stop() |
Inherited Attributes | |
---|---|
RHandleBase::iHandle | |
RMMFSubThreadBase::iShutdownTimeout | |
RMMFSubThreadBase::iSubThread |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes | |
RSessionBase:TAttachMode |
Proxy class used to create a datapath in a new subthread.
Specify the data sink for this datapath.
If the source already exists, this function tries to establish a connection between the source and the sink. Note that only one data sink can be added to the datapath.
Parameter | Description |
---|---|
aSink | A pointer to the data sink. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | AddDataSource | ( | MDataSource * | aSource | ) |
Specify the data source for this datapath.
If the sink already exists, this function tries to establish a connection between the source and sink. Note that only one data source can be added to the datapath.
Parameter | Description |
---|---|
aSource | A pointer to the data source. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | ClearPlayWindow | ( | ) |
Removes a previously defined play window.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C void | Close | ( | ) |
Reimplemented from RHandleBase::Close()
Deletes the datapath and shuts down the datapath proxy thread.
Calls RMMFSubThreadBase::Shutdown(). This function will not return until the subthread has exited, or a timeout has occurred.
IMPORT_C TInt | CreateSubThread | ( | ) |
Creates a subthread that will contain the datapath.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | GetPosition | ( | TTimeIntervalMicroSeconds & | aPosition | ) | const |
Gets the current position of the datapath in units of time.
Parameter | Description |
---|---|
aPosition | The current position in micro seconds will be copied into this variable. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | LoadDataPath | ( | ) |
Load the datapath in the new thread. Use this method if the codec UID is not known and there is no datapath ambiguity, ie. only one datapath is possible.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
Load the datapath in the new thread.
Use this method if the codec UID is not known but the TMediaId can be used to select which codec to use.
Parameter | Description |
---|---|
aMediaId | The type of media to be handled by this datapath. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
Load the datapath in the new thread.
Use this method if the codec UID is known and there is no datapath ambiguity, ie. only one datapath is possible.
Parameter | Description |
---|---|
aCodecUid | The UID of the codec plugin to be used by the datapath. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
Loads the datapath in the new thread.
Use this method if the codec UID is known and there is datapath ambiguity. The TMediaId will be used to choose the correct path.
Parameter | Description |
---|---|
aCodecUid | The UID of the codec plugin to be used by the datapath. |
aMediaId | The type of media to be handled by this datapath. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | Pause | ( | ) |
Pauses playing.
This function transfers the datapath from the playing into the primed state and sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | Play | ( | ) |
Transfer the datapath from the primed into the playing state.
This function starts an active scheduler play loop and can only play from the primed state.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | Prime | ( | ) |
Transfer the datapath from the stopped into the primed state.
This function allocates buffers in preparation to play and must be called before calling PlayL().
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | SetPlayWindow | ( | const TTimeIntervalMicroSeconds & | aStart, |
const TTimeIntervalMicroSeconds & | aEnd | |||
) |
Sets the play window relative to the start of the entire clip.
Parameter | Description |
---|---|
aStart | The start position in micro seconds relative to the start of the clip. |
aEnd | The end position in micro seconds relative to the start of the clip. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | SetPosition | ( | const TTimeIntervalMicroSeconds & | aPosition | ) |
Sets the current position of the datapath in units of time.
Parameter | Description |
---|---|
aPosition | The required position in micro seconds. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
Gets the current datapath state.
Parameter | Description |
---|---|
aState | The current state of the datapath will be copied into this variable. |
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.
IMPORT_C TInt | Stop | ( | ) |
Stops playing.
This function transfers the datapath from the primed into the stopped state and resets the data path position, but does not clean up buffers. It also sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.
Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.