class MMPXPlaybackUtility |
Main client interface for playback. Some terms used in the documentation of this interface:
Engine - it is the 'engine' which manages the playback and maintains the state. An abstract concept for where the playback functionality is somehow implemented, but is completely hidden from the client.
Player - the engine may access of a number of 'players' for playback, using only one at a time. A player is an abstract concept representing the knowledge to play either a 'specific kind of item', or 'play in a specific way', or both. The player may therefore automatically change between items if required ('specific kind of item'), or the client may choose the players that are used ('play in a specific way').
Sub player - a player may support 0 or more 'sub' players, a logical concept whereby the client,having chosen a player, can select options within this player identified by name (text)
Playlist - an abstract list of items. A collection path allows the client to cross reference the playlist with a collection, for example to iterate through the playlist, extract user-supplied metadata etc.
mpxplaybackutility.lib
Public Member Functions | |
---|---|
void | AddObserverL (MMPXPlaybackObserver &) |
void | AddSubscriptionL (const CMPXSubscription &) |
void | CancelRequest () |
void | ClearSubscriptionsL () |
void | Close () |
void | CommandL ( TMPXPlaybackCommand , TInt ) |
void | CommandL ( CMPXCommand &, MMPXPlaybackCallback *) |
void | GetClientsL ( RArray < TProcessId > &) |
void | Init64L (RFile64 &) |
void | InitL (const CMPXCollectionPlaylist &, TBool ) |
void | InitL (const TDesC &, const TDesC8 *) |
void | InitL ( RFile &) |
void | InitStreaming64L (RFile64 &, const ) |
void | InitStreamingL (const TDesC &, const TDesC8 *, const TInt ) |
void | InitStreamingL ( RFile &, const TInt ) |
IMPORT_C MMPXPlaybackUtility * | NewL (const TUid &, MMPXPlaybackObserver *) |
IMPORT_C MMPXPlaybackUtility * | NewL (const TMPXCategory , const TUid &, MMPXPlaybackObserver *) |
MMPXPlayerManager & | PlayerManager () |
void | PropertyL (MMPXPlaybackCallback &, TMPXPlaybackProperty ) |
void | RemoveObserverL (MMPXPlaybackObserver &) |
void | RemoveSubscriptionL (const CMPXSubscription &) |
void | SetL ( TMPXPlaybackProperty , TInt ) |
TInt | SetPrimaryClientL () |
void | SetPriority ( TInt ) |
MMPXSource * | Source () |
TMPXPlaybackState | StateL () |
CDesCArray * | SupportedExtensions () |
CDesCArray * | SupportedMimeTypes () |
CDesCArray * | SupportedSchemas () |
IMPORT_C MMPXPlaybackUtility * | UtilityL (const TUid &) |
IMPORT_C MMPXPlaybackUtility * | UtilityL (const TMPXCategory , const TUid &) |
void | ValueL (MMPXPlaybackCallback &, TMPXPlaybackProperty ) |
void | AddObserverL | ( | MMPXPlaybackObserver & | aObs | ) | [pure virtual] |
Add a Observer. Clients only receive events from the engine corresponding to the specific mode the interface was created in.
MMPXPlaybackObserver & aObs | observer to be added |
void | AddSubscriptionL | ( | const CMPXSubscription & | aSubscription | ) | [pure virtual] |
Adds a message subscription for this client.
const CMPXSubscription & aSubscription | subscription to be added |
void | CancelRequest | ( | ) | [pure virtual] |
Stops any async operations that are currently under way.
void | ClearSubscriptionsL | ( | ) | [pure virtual] |
Removes all message subscriptions for this client.
void | Close | ( | ) | [pure virtual] |
Frees up client side resources only; a player is freed when there are no clients using it, and all resources are freed when the last client closed.
void | CommandL | ( | TMPXPlaybackCommand | aCmd, |
TInt | aData = 0 | |||
) | [pure virtual] |
Issue player commands, with optional data. ECommandReceived and ECommandComplete events should follow.
TMPXPlaybackCommand aCmd | the command |
TInt aData = 0 | optional data |
void | CommandL | ( | CMPXCommand & | aCmd, |
MMPXPlaybackCallback * | aCallback = NULL | |||
) | [pure virtual] |
Send a command to the playback server.
CMPXCommand & aCmd | reference to command object |
MMPXPlaybackCallback * aCallback = NULL | call back when command exection completed. Asynchronously command only |
void | GetClientsL | ( | RArray < TProcessId > & | aClients | ) | [pure virtual] |
Returns PIds of clients that are using the engine in the mode this interface was created in. For example, if a client was interested in all the clients' pids with an active engine, they would:
MMPXPlaybackUtility* m=MMPXPlaybackUtilityNewL(EActivePlayer); RArray<TProcessId> pids; m->GetClients(pids); ......... pids-> Close() ; m-> Close() ; From the Array of clients returned, the first one will be the last active one.
RArray < TProcessId > & aClients | Array of Pids returned. |
void | Init64L | ( | RFile64 & | ) | [inline, virtual] |
Inititialises with a single item, may not be part of any collection Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected() .
RFile64 & |
void | InitL | ( | const CMPXCollectionPlaylist & | aPlaylist, |
TBool | aPlay = ETrue | |||
) | [pure virtual] |
Initializes a track given by aCollectionPath.
const CMPXCollectionPlaylist & aPlaylist | |
TBool aPlay = ETrue | Whether to initialize for playback, or else just to setup the engine first |
void | InitL | ( | const TDesC & | aUri, |
const TDesC8 * | aType = NULL | |||
) | [pure virtual] |
Inititialises with a single item, may not be part of any collection.
void | InitL | ( | RFile & | aShareableFile | ) | [pure virtual] |
Inititialises with a single item, may not be part of any collection Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected() .
RFile & aShareableFile | shareable file handle |
void | InitStreaming64L | ( | RFile64 & | , |
const | TInt | |||
) | [inline, virtual] |
Inititialises for streaming with URI and Access Point, the file may not be part of any collection Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected() .
RFile64 & | |
const TInt |
void | InitStreamingL | ( | const TDesC & | aUri, |
const TDesC8 * | aType, | |||
const TInt | aAccessPoint | |||
) | [pure virtual] |
Inititialises for streaming with URI and Access Point
void | InitStreamingL | ( | RFile & | aShareableFile, |
const TInt | aAccessPoint | |||
) | [pure virtual] |
Inititialises for streaming with URI and Access Point, the file may not be part of any collection Before this function can be called, the file server session which owns this file handle must first be marked as shareable by calling RFs::ShareProtected() .
IMPORT_C MMPXPlaybackUtility * | NewL | ( | const TUid & | aModeId = KPbModeDefault , |
MMPXPlaybackObserver * | aObs = NULL | |||
) | [static] |
Creates the interface for the client. This interface is bound to (i.e. controls and recieves events from) either an existing engine or a new one, according to:
aModeId=KPbModeDefault - bound to the same engine as any other player running in same thread, or KPbModeNewPlayer if none. aModeId=KPbModeActivePlayer - bound to whichever engine has audio access, else whichever is running, provided the category of client and engine match. Else KPbModeNewPlayer if none. aModeId=KPbModeNewPlayer - new engine created specifically for client, may be shared later. aModeId=Application UID - bound to the same engine as the stand alone Application. When no category is supplied (as with this API), EMPXCategoryMusic is assumed. For category description, refer to next API.
const TUid & aModeId = KPbModeDefault | playback mode |
MMPXPlaybackObserver * aObs = NULL | plabyback observer |
IMPORT_C MMPXPlaybackUtility * | NewL | ( | const TMPXCategory | aCategory, |
const TUid & | aModeId = KPbModeDefault , | |||
MMPXPlaybackObserver * | aObs = NULL | |||
) | [static] |
Creates the interface for the client. This interface is bound to (i.e. controls and recieves events from) either an existing engine or a new one, according to:
aModeId=KPbModeDefault - bound to the same engine as any other player running in same thread, or KPbModeNewPlayer if none. aModeId=KPbModeActivePlayer - bound to whichever engine has audio access, else whichever is running, provided the category of client and engine match. Else KPbModeNewPlayer if none. aModeId=KPbModeNewPlayer - new engine created specifically for client, may be shared later. aModeId=Application UID - bound to the same engine as the stand alone Application.
aCategory - a client can associate itself with a category (TMPXCategory). Category is used primarily with the KPbModeActivePlayer mode. The client gets EActivePlayerChanged message only when an engine with the same category becomes active. If a new engine (player) is created, the engine is tagged with the category. When no category is supplied, EMPXCategoryMusic is assumed.
const TMPXCategory aCategory | engine category (TMPXCategory) |
const TUid & aModeId = KPbModeDefault | playback mode |
MMPXPlaybackObserver * aObs = NULL | plabyback observer |
MMPXPlayerManager & | PlayerManager | ( | ) | [pure virtual] |
Player manager.
void | PropertyL | ( | MMPXPlaybackCallback & | aCallback, |
TMPXPlaybackProperty | aProperty | |||
) | [pure virtual] |
Get value of a playback property, Asyc. Result will be called back in HandleProperty.
MMPXPlaybackCallback & aCallback | playback callback |
TMPXPlaybackProperty aProperty | the property |
void | RemoveObserverL | ( | MMPXPlaybackObserver & | aObs | ) | [pure virtual] |
Remove a observer.
MMPXPlaybackObserver & aObs | observer to be removed |
void | RemoveSubscriptionL | ( | const CMPXSubscription & | aSubscription | ) | [pure virtual] |
Removes a message subscription for this client.
const CMPXSubscription & aSubscription | subscription to be removed. |
void | SetL | ( | TMPXPlaybackProperty | aProperty, |
TInt | aValue | |||
) | [pure virtual] |
Set playback property, EPropertyChanged event when complete.
TMPXPlaybackProperty aProperty | the property to be set |
TInt aValue | the the value of the property |
TInt | SetPrimaryClientL | ( | ) | [inline, virtual] |
Sets the primary client
void | SetPriority | ( | TInt | aPriority | ) | [pure virtual] |
Sets the priority of the playback utility.
TInt aPriority | Priority to set |
MMPXSource * | Source | ( | ) | [pure virtual] |
Current source of playlist being played, NULL if none was supplied.
CDesCArray * | SupportedExtensions | ( | ) | [pure virtual] |
Return a list of file extensions supported by playback framework.
CDesCArray * | SupportedMimeTypes | ( | ) | [pure virtual] |
Return a list of mime types supported by playback framework.
CDesCArray * | SupportedSchemas | ( | ) | [pure virtual] |
Return a list of schemas supported by playback framework.
IMPORT_C MMPXPlaybackUtility * | UtilityL | ( | const TUid & | aModeId = KPbModeDefault | ) | [static] |
const TUid & aModeId = KPbModeDefault |
IMPORT_C MMPXPlaybackUtility * | UtilityL | ( | const TMPXCategory | aCategory, |
const TUid & | aModeId = KPbModeDefault | |||
) | [static] |
const TMPXCategory aCategory | |
const TUid & aModeId = KPbModeDefault |
void | ValueL | ( | MMPXPlaybackCallback & | aCallback, |
TMPXPlaybackProperty | aProperty | |||
) | [pure virtual] |
Get value of a playback property, Asyc.
MMPXPlaybackCallback & aCallback | playback callback |
TMPXPlaybackProperty aProperty | the property |
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.