|
||
class CVideoPlayerUtility : public CBase, public MMMFClientUtility;
Plays sampled video data.
The class offers a simple interface to open, play and obtain information from sampled video data. The video data can be provided using files, descriptors or URLs.
Note: Some video formats also allow the storing of audio data. To accommodate this, this class contains audio functions that can manipulate such data.
While this class is abstract, CVideoPlayerUtility::NewL(MVideoPlayerUtilityObserver &,TInt,TMdaPriorityPreference,RWsSession &,CWsScreenDevice &,RWindowBase
&,const TRect &,const TRect &)
constructs, initialises and returns pointers to instances of concrete classes derived from this abstract class. This concrete
class is part of the MMF implementation and is private.
MMMFClientUtility
- No description.
CBase
-
Base class for all classes to be instantiated on the heap.
CVideoPlayerUtility
-
Plays sampled video data.
Defined in CVideoPlayerUtility
:
AudioBitRateL()const
Returns the audio bit rate in bits/second.AudioEnabledL()const
Returns whether the current clip has an audio stream and audio playback is enabl...AudioTypeL()const
Returns the codec used for the audio component of the video clip.Balance()const
Returns the current balance setting for the audio track of the video clip.CancelRegisterAudioResourceNotification(TUid)
Cancels the registration for audio resource notification.Close()
Closes the video clip.ControllerImplementationInformationL()
Returns the controller implementation information associated with the current co...CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)
Sends an asynchronous custom command to the controller.CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)
Send a asynchronous custom command to the controller.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &)
Sends a synchronous custom command to the controller.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &)
Sends a synchronous custom command to the controller.DurationL()const
Returns the duration of video clip in mircoseconds.GetCropRegionL(TRect &)const
Gets the crop region currently applied to the image.GetDRMCustomCommand()
Gets a controller's DRM custom command implementation.GetFrameL(TDisplayMode)
Gets the current frame. The current frame is requested, and will be sent to the ...GetScaleFactorL(TReal32 &,TReal32 &,TBool &)const
Gets the scale factor currently applied to the video image.GetVideoLoadingProgressL(TInt &)
Gets the progress of video clip loading/rebuffering.MaxVolume()const
Returns an integer representing the maximum volume that the audio track can supp...MetaDataEntryL(TInt)const
Returns a meta data entry from the clip.NewL(MVideoPlayerUtilityObserver &,TInt,TMdaPriorityPreference,RWsSession &,CWsScreenDevice &,RWindowBase &,const TRect &,const
TRect &)
Constructs and initialises a new instance of the video player utility.NumberOfMetaDataEntriesL()const
Returns the number of meta data entries associated with this clip.OpenDesL(const TDesC8 &,TUid)
Opens a video clip contained in a descriptor.OpenFileL(const RFile &,TUid)
Opens a video clip from a file.OpenFileL(const TDesC &,TUid)
Opens a video clip from a file.OpenFileL(const TMMSource &,TUid)
Opens a video clip from a file.OpenUrlL(const TDesC &,TInt,const TDesC8 &,TUid)
Opens a video clip from a URL.PauseL()
Video playback is paused. The current position is maintained and playback can be...Play()
Begins playback of the initialised video sample at the current volume and priori...Play(const TTimeIntervalMicroSeconds &,const TTimeIntervalMicroSeconds &)
Begins playback of the initialised video sample at the specified start and end p...PositionL()const
Returns the current playback position.Prepare()
Prepares the video clip to be accessed.PriorityL(TInt &,TMdaPriorityPreference &)const
Get the current playback priority. This is used to arbitrate between simultaneou...RefreshFrameL()
Requests the video controller to redraw the current frame.RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &,TUid,const TDesC8 &)
Registers for notification, when audio resource is available.RegisterForVideoLoadingNotification(MVideoLoadingObserver &)
Register to receive notifications of video clip loading/rebuffering.RotationL()const
Query the rotation that is currently applied to the video image.SetBalanceL(TInt)
Sets the current playback balance for the audio track of the video clip.SetCropRegionL(const TRect &)
Selects a region of the video image to be displayed.SetDisplayWindowL(RWsSession &,CWsScreenDevice &,RWindowBase &,const TRect &,const TRect &)
Sets the display window. This is used to provide the video controller with an ar...SetInitScreenNumber(TInt)
Sets the initial screen to be used for the video display.SetPositionL(const TTimeIntervalMicroSeconds &)
Sets the position within the video clip from where to start playback.SetPriorityL(TInt,TMdaPriorityPreference)
Sets the playback priority.SetRotationL(TVideoRotation)
Rotates the video image on the screen.SetScaleFactorL(TReal32,TReal32,TBool)
Scales the video image to a specified percentage of its original size.SetVideoFrameRateL(TReal32)
Sets the video frame rate.SetVolumeL(TInt)
Sets the playback volume for the audio track of the video clip.StartDirectScreenAccessL()
Enables a client application to start the video player using direct screen acces...Stop()
Stops playback of the video sample as soon as is possible.StopDirectScreenAccessL()
Enables a client application to stop the video player from using direct screen a...VideoBitRateL()const
Returns the video bit rate.VideoFormatMimeType()const
Returns the video format's MIME type.VideoFrameRateL()const
Returns the video frame rate in frames/second.VideoFrameSizeL(TSize &)const
Gets the video frame size.Volume()const
Returns the current playback volume for the audio track of the video clip.WillResumePlay()
Waits for the client to resume the play even after the default timer expires. Un...Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...NewL(MVideoPlayerUtilityObserver &,TInt,TMdaPriorityPreference,RWsSession &,CWsScreenDevice &,RWindowBase &,const TRect &,const
TRect &)
Capability: | MultimediaDD | A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD. |
IMPORT_C static CVideoPlayerUtility* NewL(MVideoPlayerUtilityObserver &aObserver, TInt aPriority, TMdaPriorityPreference aPref,
RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, const TRect &aScreenRect, const TRect &aClipRect);
Constructs and initialises a new instance of the video player utility.
This function leaves if the video player utility object cannot be created.
|
|
IMPORT_C void OpenFileL(const TDesC &aFileName, TUid aControllerUid=TUid::Null());
Opens a video clip from a file.
This function opens a video clip from a file using an optionally specified plugin. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached.
Once the opening of the video clip is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt)
is called.
This function leaves if errors are encountered opening the specified video clip file, or in initialising a specified/unspecified controller plugin.
This function can leave with one of the specified error codes. Most open failures will however be reported through the MVideoPlayerUtilityObserver
interface.
|
IMPORT_C void OpenFileL(const RFile &aFileName, TUid aControllerUid=TUid::Null());
Opens a video clip from a file.
This function opens a video clip from a file using an optionally specified plugin. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached.
Once the opening of the video clip is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt)
is called.
This function leaves if errors are encountered opening the specified video clip file, or in initialising a specified/unspecified controller plugin.
This function can leave with one of the specified error codes. Most open failures will however be reported through the MVideoPlayerUtilityObserver
interface.
|
IMPORT_C void OpenFileL(const TMMSource &aSource, TUid aControllerUid=TUid::Null());
Opens a video clip from a file.
This function opens a video clip from a file using an optionally specified plugin. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached.
Once the opening of the video clip is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt)
is called.
This function leaves if errors are encountered opening the specified video clip file, or in initialising a specified/unspecified controller plugin.
This function can leave with one of the specified error codes. Most open failures will however be reported through the MVideoPlayerUtilityObserver
interface.
|
IMPORT_C void OpenDesL(const TDesC8 &aDescriptor, TUid aControllerUid=TUid::Null());
Opens a video clip contained in a descriptor.
This function opens a video clip contained as binary data in a descriptor using an optionally specified plugin. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached.
Once the opening of the video clip is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt)
is called.
This function can leave with one of the specified error codes. Most open failures will however be reported through the interface.
|
IMPORT_C void OpenUrlL(const TDesC &aUrl, TInt aIapId=KUseDefaultIap, const TDesC8 &aMimeType=KNullDesC8, TUid aControllerUid=TUid::Null());
Opens a video clip from a URL.
This function opens a video clip stored at a specified URL and identified by a MIME type. In addition a plugin can be specified if necessary. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached.
Once the opening of the video clip is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoOpenComplete(TInt)
is called.
This function can leave with one of the specified error codes. Most open failures will however be reported through the MVideoPlayerUtilityObserver
interface.
|
IMPORT_C void Prepare();
Prepares the video clip to be accessed.
A call to this method tells the loaded controller plugin to finalise its configuration and to prepare to start reading the video clip. It is not possible to play the video clip or query any of its properties (e.g. duration, meta data etc.) until this method has signalled its completion (successful or otherwise) via the callback MvpuoPrepareComplete.
IMPORT_C void Play();
Begins playback of the initialised video sample at the current volume and priority levels.
When playing of the video sample is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoPlayComplete(TInt)
is called.
IMPORT_C void Play(const TTimeIntervalMicroSeconds &aStartPoint, const TTimeIntervalMicroSeconds &aEndPoint);
Begins playback of the initialised video sample at the specified start and end points.
When playing of the video sample is complete, successfully or otherwise, the callback function MVideoPlayerUtilityObserver::MvpuoPlayComplete(TInt)
is called.
|
IMPORT_C TInt Stop();
Stops playback of the video sample as soon as is possible.
If the video sample is playing, playback is stopped as soon as possible and the callback function MVideoPlayerUtilityObserver::MvpuoPlayComplete(TInt)
is called.
If playback is already complete, this function has no effect. In addition, under these circumstances the callback function
MVideoPlayerUtilityObserver::MvpuoPlayComplete(TInt)
is not called either.
The position is reset to the beginning of the file.
|
IMPORT_C void PauseL();
Video playback is paused. The current position is maintained and playback can be resumed by calling Play.
Capability: | MultimediaDD | A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD. |
IMPORT_C void SetPriorityL(TInt aPriority, TMdaPriorityPreference aPref);
Sets the playback priority.
This is used to arbitrate between multiple objects simultaneously trying to accesses the sound hardware.
|
IMPORT_C void PriorityL(TInt &aPriority, TMdaPriorityPreference &aPref) const;
Get the current playback priority. This is used to arbitrate between simultaneous accesses of the sound hardware.
|
IMPORT_C void SetDisplayWindowL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, const TRect &aWindowRect,
const TRect &aClipRect);
Sets the display window. This is used to provide the video controller with an area of the display to render the current video frame.
|
IMPORT_C void RegisterForVideoLoadingNotification(MVideoLoadingObserver &aCallback);
Register to receive notifications of video clip loading/rebuffering.
When a video clip is being streamed in, it may require rebuffering from time to time. This function "switches on" callbacks that report the status of the rebuffering.
The two callbacks that can be sent are MVideoLoadingObserver::MvloLoadingStarted()
and MVideoLoadingObserver::MvloLoadingComplete()
.
|
IMPORT_C void GetVideoLoadingProgressL(TInt &aPercentageComplete);
Gets the progress of video clip loading/rebuffering.
|
IMPORT_C void GetFrameL(TDisplayMode aDisplayMode);
Gets the current frame. The current frame is requested, and will be sent to the client asynchrynously via the MvpuoFrameReady callback.
|
IMPORT_C void GetFrameL(TDisplayMode aDisplayMode, ContentAccess::TIntent aIntent);
Gets the current frame. The current frame is requested, and will be sent to the client asynchrynously via the MvpuoFrameReady callback.
|
IMPORT_C void RefreshFrameL();
Requests the video controller to redraw the current frame.
IMPORT_C TReal32 VideoFrameRateL() const;
Returns the video frame rate in frames/second.
|
IMPORT_C void SetVideoFrameRateL(TReal32 aFramesPerSecond);
Sets the video frame rate.
|
IMPORT_C void VideoFrameSizeL(TSize &aSize) const;
Gets the video frame size.
|
IMPORT_C const TDesC8& VideoFormatMimeType() const;
Returns the video format's MIME type.
|
CVideoPlayerUtility::NumberOfMetaDataEntriesL()const
Returns the number of meta data entries associated with this clip.IMPORT_C TInt VideoBitRateL() const;
Returns the video bit rate.
|
IMPORT_C TInt AudioBitRateL() const;
Returns the audio bit rate in bits/second.
|
IMPORT_C TFourCC AudioTypeL() const;
Returns the codec used for the audio component of the video clip.
|
IMPORT_C TBool AudioEnabledL() const;
Returns whether the current clip has an audio stream and audio playback is enabled. This method will return EFalse if the
clip does no have an audio track or if audio playback has been disabled with CVideoPlayerUtility::SetAudioEnabledL(TBool)
.
|
IMPORT_C void SetPositionL(const TTimeIntervalMicroSeconds &aPosition);
Sets the position within the video clip from where to start playback.
|
IMPORT_C TTimeIntervalMicroSeconds PositionL() const;
Returns the current playback position.
|
IMPORT_C TTimeIntervalMicroSeconds DurationL() const;
Returns the duration of video clip in mircoseconds.
|
IMPORT_C void SetVolumeL(TInt aVolume);
Sets the playback volume for the audio track of the video clip.
The volume can be changed before or during playback and is effective immediately. The volume can be set to any value between
zero (mute) and the maximum permissible volume (determined using CVideoPlayerUtility::MaxVolume()const
).
To determine if the current video clip contains an audio track, use CVideoPlayerUtility::AudioEnabledL()const
.
|
IMPORT_C TInt Volume() const;
Returns the current playback volume for the audio track of the video clip.
|
IMPORT_C TInt MaxVolume() const;
Returns an integer representing the maximum volume that the audio track can support.
This is the maximum value that can be passed to CVideoPlayerUtility::SetVolumeL(TInt)
. This value is platform independent, but is always greater than or equal to one.
|
IMPORT_C void SetBalanceL(TInt aBalance);
Sets the current playback balance for the audio track of the video clip.
The balance can be any value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight, the default value being KMMFBalanceCenter.
|
IMPORT_C TInt Balance() const;
Returns the current balance setting for the audio track of the video clip.
|
IMPORT_C void SetRotationL(TVideoRotation aRotation);
Rotates the video image on the screen.
|
CVideoPlayerUtility::RotationL()const
Query the rotation that is currently applied to the video image.IMPORT_C TVideoRotation RotationL() const;
Query the rotation that is currently applied to the video image.
|
CVideoPlayerUtility::SetRotationL(TVideoRotation)
Rotates the video image on the screen.IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering);
Scales the video image to a specified percentage of its original size.
|
CVideoPlayerUtility::GetScaleFactorL(TReal32 &,TReal32 &,TBool &)const
Gets the scale factor currently applied to the video image.IMPORT_C void GetScaleFactorL(TReal32 &aWidthPercentage, TReal32 &aHeightPercentage, TBool &aAntiAliasFiltering) const;
Gets the scale factor currently applied to the video image.
|
CVideoPlayerUtility::SetScaleFactorL(TReal32,TReal32,TBool)
Scales the video image to a specified percentage of its original size.IMPORT_C void SetCropRegionL(const TRect &aCropRegion);
Selects a region of the video image to be displayed.
|
CVideoPlayerUtility::GetCropRegionL(TRect &)const
Gets the crop region currently applied to the image.IMPORT_C void GetCropRegionL(TRect &aCropRegion) const;
Gets the crop region currently applied to the image.
|
CVideoPlayerUtility::SetCropRegionL(const TRect &)
Selects a region of the video image to be displayed.IMPORT_C TInt NumberOfMetaDataEntriesL() const;
Returns the number of meta data entries associated with this clip.
|
IMPORT_C CMMFMetaDataEntry* MetaDataEntryL(TInt aIndex) const;
Returns a meta data entry from the clip.
|
|
CVideoPlayerUtility::NumberOfMetaDataEntriesL()const
Returns the number of meta data entries associated with this clip.IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
Returns the controller implementation information associated with the current controller.
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom);
Sends a synchronous custom command to the controller.
|
|
IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2);
Sends a synchronous custom command to the controller.
|
|
CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TDes8 &aDataFrom, TRequestStatus &aStatus);
Sends an asynchronous custom command to the controller.
Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.
|
CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)
IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const
TDesC8 &aDataTo2, TRequestStatus &aStatus);
Send a asynchronous custom command to the controller.
Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller framework.
|
IMPORT_C MMMFDRMCustomCommand* GetDRMCustomCommand();
Gets a controller's DRM custom command implementation.
|
IMPORT_C void StopDirectScreenAccessL();
Enables a client application to stop the video player from using direct screen access (DSA).
This function leaves if errors are encountered when trying to stop DSA.
IMPORT_C void StartDirectScreenAccessL();
Enables a client application to start the video player using direct screen access (DSA).
This function leaves if errors are encountered when trying to start DSA.
IMPORT_C TInt RegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &aCallback, TUid aNotificationEventUid,
const TDesC8 &aNotificationRegistrationData=KNullDesC8);
Registers for notification, when audio resource is available.
|
|
IMPORT_C TInt CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
Cancels the registration for audio resource notification.
|
|
IMPORT_C TInt WillResumePlay();
Waits for the client to resume the play even after the default timer expires. Unless the client completes the play no other client gets notification.
|
IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
Sets the initial screen to be used for the video display.
|
|