CDrmPlayerUtility Class Reference
class CDrmPlayerUtility : public CBase
|
Used by third party developers to play sampled audio data. The class offers a simple interface to open, play and obtain information from, sampled audio data. The audio data can be supplied either in a file (file-based), as a descriptor (descriptor-based) or as a URL reference.
DRMAudioPlayer.lib
-
Since
-
Series 60 3.0
Public Member Functions
|
|
~CDrmPlayerUtility
()
|
IMPORT_C
TInt
|
ClearPlayWindow
()
|
IMPORT_C void
|
Close
()
|
IMPORT_C const
CMMFControllerImplementationInformation
&
|
ControllerImplementationInformationL
()
|
IMPORT_C void
|
CustomCommandAsync
(const
TMMFMessageDestinationPckg
&,
TInt
, const
TDesC8
&, const
TDesC8
&,
TDes8
&,
TRequestStatus
&)
|
IMPORT_C void
|
CustomCommandAsync
(const
TMMFMessageDestinationPckg
&,
TInt
, const
TDesC8
&, const
TDesC8
&,
TRequestStatus
&)
|
IMPORT_C
TInt
|
CustomCommandSync
(const
TMMFMessageDestinationPckg
&,
TInt
, const
TDesC8
&, const
TDesC8
&,
TDes8
&)
|
IMPORT_C
TInt
|
CustomCommandSync
(const
TMMFMessageDestinationPckg
&,
TInt
, const
TDesC8
&, const
TDesC8
&)
|
IMPORT_C const
TTimeIntervalMicroSeconds
&
|
Duration
()
|
IMPORT_C void
|
GetAudioLoadingProgressL
(
TInt
&)
|
IMPORT_C
TInt
|
GetBalance
(
TInt
&)
|
IMPORT_C
TInt
|
GetBitRate
(
TUint
&)
|
IMPORT_C
CMMFMetaDataEntry
*
|
GetMetaDataEntryL
(
TInt
)
|
IMPORT_C
TInt
|
GetNumberOfMetaDataEntries
(
TInt
&)
|
IMPORT_C
TInt
|
GetPosition
(
TTimeIntervalMicroSeconds
&)
|
IMPORT_C
TInt
|
GetVolume
(
TInt
&)
|
IMPORT_C
TInt
|
MaxVolume
()
|
IMPORT_C
CDrmPlayerUtility
*
|
NewDesPlayerL
(const
TDesC8
&,
MDrmAudioPlayerCallback
&,
TInt
,
TMdaPriorityPreference
)
|
IMPORT_C
CDrmPlayerUtility
*
|
NewDesPlayerReadOnlyL
(const
TDesC8
&,
MDrmAudioPlayerCallback
&,
TInt
,
TMdaPriorityPreference
)
|
IMPORT_C
CDrmPlayerUtility
*
|
NewFilePlayerL
(const
TDesC
&,
MDrmAudioPlayerCallback
&,
TInt
,
TMdaPriorityPreference
)
|
IMPORT_C
CDrmPlayerUtility
*
|
NewL
(
MDrmAudioPlayerCallback
&,
TInt
,
TMdaPriorityPreference
)
|
IMPORT_C void
|
OpenDesL
(const
TDesC8
&)
|
IMPORT_C void
|
OpenFileL
(const
TDesC
&)
|
IMPORT_C void
|
OpenFileL
(const
RFile
&)
|
IMPORT_C void
|
OpenFileL
(const
TMMSource
&)
|
IMPORT_C void
|
OpenUrlL
(const
TDesC
&,
TInt
, const
TDesC8
&)
|
IMPORT_C
TInt
|
Pause
()
|
IMPORT_C void
|
Play
()
|
IMPORT_C void
|
RegisterForAudioLoadingNotification
(
MAudioLoadingObserver
&)
|
IMPORT_C
TInt
|
SetBalance
(
TInt
)
|
IMPORT_C
TInt
|
SetPlayWindow
(const
TTimeIntervalMicroSeconds
&, const
TTimeIntervalMicroSeconds
&)
|
IMPORT_C void
|
SetPosition
(const
TTimeIntervalMicroSeconds
&)
|
IMPORT_C
TInt
|
SetPriority
(
TInt
,
TMdaPriorityPreference
)
|
IMPORT_C void
|
SetRepeats
(
TInt
, const
TTimeIntervalMicroSeconds
&)
|
IMPORT_C void
|
SetVolume
(
TInt
)
|
IMPORT_C void
|
SetVolumeRamp
(const
TTimeIntervalMicroSeconds
&)
|
IMPORT_C void
|
Stop
()
|
Constructor & Destructor Documentation
~CDrmPlayerUtility()
IMPORT_C
|
~CDrmPlayerUtility
|
(
|
)
|
|
Member Functions Documentation
ClearPlayWindow()
IMPORT_C
TInt
|
ClearPlayWindow
|
(
|
)
|
|
Clears the current playback window.
Close()
Closes the current audio clip.
ControllerImplementationInformationL()
Returns controller implementation parameters
CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
Sends a custom command asynchronously to the controller plugin
Parameters
const
TMMFMessageDestinationPckg
& aDestination
|
The destination of the custom command, consisting of the unique ID of the interface of this custom command and a special handle id KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin
|
TInt
aFunction
|
The function number to indicate which function is to be called on the controller's custom command interface.
|
const
TDesC8
& aDataTo1
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL.
|
const
TDesC8
& aDataTo2
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL
|
TDes8
& aDataFrom
|
The TRequestStatus of an active object. This will contain the result of the custom command on completion. The exact range of result values is dependent on the custom command interface
|
TRequestStatus
& aStatus
|
|
CustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
Sends a custom command asynchronously to the controller plugin
Parameters
const
TMMFMessageDestinationPckg
& aDestination
|
The destination of the custom command, consisting of the unique ID of the interface of this custom command and a special handle id KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin
|
TInt
aFunction
|
The function number to indicate which function is to be called on the controller's custom command interface.
|
const
TDesC8
& aDataTo1
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL.
|
const
TDesC8
& aDataTo2
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL
|
TRequestStatus
& aStatus
|
|
CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
Sends a custom command synchronously to the controller plugin
Parameters
const
TMMFMessageDestinationPckg
& aDestination
|
The destination of the custom command, consisting of the unique ID of the interface of this custom command and a special handle id KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin
|
TInt
aFunction
|
The function number to indicate which function is to be called on the controller's custom command interface.
|
const
TDesC8
& aDataTo1
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL.
|
const
TDesC8
& aDataTo2
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL
|
TDes8
& aDataFrom
|
A reference to an area of memory to which the controller plugin will write any data to be passed back to the client. Cannot be NULL
|
CustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
Sends a custom command synchronously to the controller plugin
Parameters
const
TMMFMessageDestinationPckg
& aDestination
|
The destination of the custom command, consisting of the unique ID of the interface of this custom command and a special handle id KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin
|
TInt
aFunction
|
The function number to indicate which function is to be called on the controller's custom command interface.
|
const
TDesC8
& aDataTo1
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL.
|
const
TDesC8
& aDataTo2
|
A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Can be NULL
|
Duration()
Returns the duration of the audio sample in microseconds.
GetAudioLoadingProgressL(TInt &)
IMPORT_C void
|
GetAudioLoadingProgressL
|
(
|
TInt
&
|
aPercentageProgress
|
)
|
|
Gets the progress of audio loading
Parameters
TInt
& aPercentageProgress
|
Upon return, contains the percentage progress
|
GetBalance(TInt &)
IMPORT_C
TInt
|
GetBalance
|
(
|
TInt
&
|
aBalance
|
)
|
|
Returns the current playback balance.
Parameters
TInt
& aBalance
|
On return, contains the current balance setting
|
GetBitRate(TUint &)
IMPORT_C
TInt
|
GetBitRate
|
(
|
TUint
&
|
aBitRate
|
)
|
|
Returns the current bit rate
Parameters
TUint
& aBitRate
|
On return, contains the current bit rate
|
GetMetaDataEntryL(TInt)
Returns a specified meta data entry from the audio clip.
Parameters
TInt
aMetaDataIndex
|
The index of the meta data entry to return
|
GetNumberOfMetaDataEntries(TInt &)
IMPORT_C
TInt
|
GetNumberOfMetaDataEntries
|
(
|
TInt
&
|
aNumEntries
|
)
|
|
Gets the number of meta data entries in the current audio clip.
Parameters
TInt
& aNumEntries
|
On return, contains the number of meta data entries
|
GetPosition(TTimeIntervalMicroSeconds &)
Returns the current playback position in microseconds from the start of the clip.
GetVolume(TInt &)
IMPORT_C
TInt
|
GetVolume
|
(
|
TInt
&
|
aVolume
|
)
|
|
Returns the current playback volume.
Parameters
TInt
& aVolume
|
A value between 0 (mute) and the maximum volume setting
|
MaxVolume()
IMPORT_C
TInt
|
MaxVolume
|
(
|
)
|
|
Returns an integer representing the maximum volume that the audio clip can support.
NewDesPlayerL(const TDesC8 &, MDrmAudioPlayerCallback &, TInt, TMdaPriorityPreference)
NewDesPlayerReadOnlyL(const TDesC8 &, MDrmAudioPlayerCallback &, TInt, TMdaPriorityPreference)
NewFilePlayerL(const TDesC &, MDrmAudioPlayerCallback &, TInt, TMdaPriorityPreference)
NewL(MDrmAudioPlayerCallback &, TInt, TMdaPriorityPreference)
OpenDesL(const TDesC8 &)
IMPORT_C void
|
OpenDesL
|
(
|
const
TDesC8
&
|
aDescriptor
|
)
|
|
Opens an audio clip from a descriptor.
Parameters
const
TDesC8
& aDescriptor
|
The descriptor containing the audio clip
|
OpenFileL(const TDesC &)
IMPORT_C void
|
OpenFileL
|
(
|
const
TDesC
&
|
aFileName
|
)
|
|
Opens an audio clip from a file.
Parameters
const
TDesC
& aFileName
|
The file containing the audio clip
|
OpenFileL(const RFile &)
IMPORT_C void
|
OpenFileL
|
(
|
const
RFile
&
|
aFile
|
)
|
|
Opens an audio clip from a file.
Parameters
const
RFile
& aFile
|
The file handle of the file containing the clip
|
OpenFileL(const TMMSource &)
IMPORT_C void
|
OpenFileL
|
(
|
const
TMMSource
&
|
aSource
|
)
|
|
Opens an audio clip from a file.
Parameters
const
TMMSource
& aSource
|
The source of the file containing the clip
|
OpenUrlL(const TDesC &, TInt, const TDesC8 &)
Opens an audio clip from a URL.
Pause()
Pauses playback of the audio clip
Play()
Begins playback of the initialised audio sample at the current volume and priority levels.
RegisterForAudioLoadingNotification(MAudioLoadingObserver &)
Allows user to register for audio loading callback
SetBalance(TInt)
Sets the current playback balance.
SetPlayWindow(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)
Defines the size of the current playback window.
Parameters
const
TTimeIntervalMicroSeconds
& aStart
|
The position defining the start of the window, measured in microseconds. If this value is less than zero, it is set to zero. If this value is greater than aEnd, then it is swapped with aEnd.
|
const
TTimeIntervalMicroSeconds
& aEnd
|
The position defining the end of the window, measured in microseconds. If this value is greater than the value returned by Duration(), it is set to the value of Duration(). If this value is less than aStart, then it is swapped with aStart.
|
SetPosition(const TTimeIntervalMicroSeconds &)
Returns the current playback position in microseconds from the start of the clip.
Parameters
const
TTimeIntervalMicroSeconds
& aPosition
|
The number of microseconds from the start of the clip to the current play position
|
SetPriority(TInt, TMdaPriorityPreference)
Set the priority for playback.
Parameters
TInt
aPriority
|
The priority level to apply, EMdaPriorityMin client can be interrupted by any other client, EMdaPriorityNormal client can only be interrupted by a client with a higher priority or EMdaPriorityMax client cannot be interrupted by other clients.
|
TMdaPriorityPreference
aPref
|
The time and quality preferences to apply.
|
SetRepeats(TInt, const TTimeIntervalMicroSeconds &)
Sets the number of times the audio sample should be repeated during the playback operation
Parameters
TInt
aRepeatNumberOfTimes
|
The number of times to repeat the sample. Use 0 for no repeat, KMdaRepeatForever for continuous, any other value for number of times.
|
const
TTimeIntervalMicroSeconds
& aTrailingSilence
|
The duration of silence after the sample has played in microseconds.
|
SetVolume(TInt)
IMPORT_C void
|
SetVolume
|
(
|
TInt
|
aVolume
|
)
|
|
Changes the current playback volume to a specified value.
Parameters
TInt
aVolume
|
Any value between 0 (mute) and the maximum volume
|
SetVolumeRamp(const TTimeIntervalMicroSeconds &)
Changes the current playback volume to a specified value.
Stop()
Stops playback of the audio sample as soon as is possible.
Member Data Documentation
CDrmAudioPlayerAdaptation * iProperties
This member is internal and not intended for use.
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.