Location:
VideoPlayer.h
Link against: mediaclientvideo.lib
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, NewL()
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()
, AudioEnabledL()
, AudioTypeL()
, Balance()
, CancelRegisterAudioResourceNotification()
, Close()
, ControllerImplementationInformationL()
, CustomCommandAsync()
, CustomCommandAsync()
, CustomCommandSync()
, CustomCommandSync()
, DurationL()
, GetCropRegionL()
, GetDRMCustomCommand()
, GetFrameL()
, GetFrameL()
, GetScaleFactorL()
, GetVideoLoadingProgressL()
, MaxVolume()
, MetaDataEntryL()
, NewL()
, NumberOfMetaDataEntriesL()
, OpenDesL()
, OpenFileL()
, OpenFileL()
, OpenFileL()
, OpenUrlL()
, PauseL()
, Play()
, Play()
, PositionL()
, Prepare()
, PriorityL()
, RefreshFrameL()
, RegisterAudioResourceNotification()
, RegisterForVideoLoadingNotification()
, RotationL()
, SetBalanceL()
, SetCropRegionL()
, SetDisplayWindowL()
, SetInitScreenNumber()
, SetPositionL()
, SetPriorityL()
, SetRotationL()
, SetScaleFactorL()
, SetVideoFrameRateL()
, SetVolumeL()
, StartDirectScreenAccessL()
, Stop()
, StopDirectScreenAccessL()
, VideoBitRateL()
, VideoFormatMimeType()
, VideoFrameRateL()
, VideoFrameSizeL()
, Volume()
, WillResumePlay()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
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. |
static IMPORT_C 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()
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()
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()
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()
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()
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()
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()
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()
is called.
If playback is already complete, this function has no effect. In addition, under these circumstances the callback function
MVideoPlayerUtilityObserver::MvpuoPlayComplete()
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.
|
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.
|
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 MaxVolume()
).
To determine if the current video clip contains an audio track, use AudioEnabledL()
.
|
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 SetVolumeL()
. 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.
|
IMPORT_C TVideoRotation RotationL() const;
Query the rotation that is currently applied to the video image.
|
IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering);
Scales the video image to a specified percentage of its original size.
|
IMPORT_C void GetScaleFactorL(TReal32 &aWidthPercentage, TReal32 &aHeightPercentage, TBool &aAntiAliasFiltering) const;
Gets the scale factor currently applied to the video image.
|
IMPORT_C void SetCropRegionL(const TRect &aCropRegion);
Selects a region of the video image to be displayed.
|
IMPORT_C void GetCropRegionL(TRect &aCropRegion) const;
Gets the crop region currently applied to the image.
|
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.
|
|
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.
|
|
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.
|
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.
|
|