CVideoPlayerUtility Class Reference

#include <videoplayer.h>

Link against: mediaclientvideo.lib

class CVideoPlayerUtility : public CBase

Inherits from

  • CVideoPlayerUtility
    Public Member Functions
    ~CVideoPlayerUtility()
    IMPORT_C TIntAudioBitRateL()
    IMPORT_C TBoolAudioEnabledL()
    IMPORT_C TFourCCAudioTypeL()
    IMPORT_C TIntBalance()
    IMPORT_C TIntCancelRegisterAudioResourceNotification(TUid)
    IMPORT_C voidClose()
    IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()
    IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
    IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
    IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
    IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
    IMPORT_C TTimeIntervalMicroSecondsDurationL()
    IMPORT_C voidGetCropRegionL(TRect &)
    IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()
    IMPORT_C voidGetFrameL(TDisplayMode)
    IMPORT_C voidGetFrameL(TDisplayMode, ContentAccess::TIntent)
    IMPORT_C voidGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities &)
    IMPORT_C voidGetScaleFactorL(TReal32 &, TReal32 &, TBool &)
    IMPORT_C voidGetVideoLoadingProgressL(TInt &)
    IMPORT_C TIntMaxVolume()
    IMPORT_C CMMFMetaDataEntry *MetaDataEntryL(TInt)
    IMPORT_C CVideoPlayerUtility *NewL(MVideoPlayerUtilityObserver &, TInt, TInt, RWsSession &, CWsScreenDevice &, RWindowBase &, const TRect &, const TRect &)
    IMPORT_C TIntNumberOfMetaDataEntriesL()
    IMPORT_C voidOpenDesL(const TDesC8 &, TUid)
    IMPORT_C voidOpenFileL(const TDesC &, TUid)
    IMPORT_C voidOpenFileL(const RFile &, TUid)
    IMPORT_C voidOpenFileL(const TMMSource &, TUid)
    IMPORT_C voidOpenUrlL(const TDesC &, TInt, const TDesC8 &, TUid)
    IMPORT_C voidPauseL()
    IMPORT_C voidPlay()
    IMPORT_C voidPlay(const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds &)
    IMPORT_C TIntPlayVelocityL()
    IMPORT_C TTimeIntervalMicroSecondsPositionL()
    IMPORT_C voidPrepare()
    IMPORT_C voidPriorityL(TInt &, TMdaPriorityPreference &)
    IMPORT_C voidRefreshFrameL()
    IMPORT_C TIntRegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 &)
    IMPORT_C voidRegisterForVideoLoadingNotification(MVideoLoadingObserver &)
    IMPORT_C TVideoRotationRotationL()
    IMPORT_C voidSetAudioEnabledL(TBool)
    IMPORT_C voidSetAutoScaleL(TAutoScaleType)
    IMPORT_C voidSetAutoScaleL(TAutoScaleType, TInt, TInt)
    IMPORT_C voidSetBalanceL(TInt)
    IMPORT_C voidSetCropRegionL(const TRect &)
    IMPORT_C voidSetDisplayWindowL(RWsSession &, CWsScreenDevice &, RWindowBase &, const TRect &, const TRect &)
    IMPORT_C voidSetExternalDisplaySwitchingL(TInt, TBool)
    IMPORT_C TIntSetInitScreenNumber(TInt)
    IMPORT_C voidSetPlayVelocityL(TInt)
    IMPORT_C voidSetPositionL(const TTimeIntervalMicroSeconds &)
    IMPORT_C voidSetPriorityL(TInt, TInt)
    IMPORT_C voidSetRotationL(TVideoRotation)
    IMPORT_C voidSetScaleFactorL(TReal32, TReal32, TBool)
    IMPORT_C voidSetVideoEnabledL(TBool)
    IMPORT_C voidSetVideoFrameRateL(TReal32)
    IMPORT_C voidSetVolumeL(TInt)
    IMPORT_C voidStartDirectScreenAccessL()
    IMPORT_C voidStepFrameL(TInt)
    IMPORT_C TIntStop()
    IMPORT_C voidStopDirectScreenAccessL()
    IMPORT_C TIntVideoBitRateL()
    IMPORT_C TBoolVideoEnabledL()
    IMPORT_C const TDesC8 &VideoFormatMimeType()
    IMPORT_C TReal32VideoFrameRateL()
    IMPORT_C voidVideoFrameSizeL(TSize &)
    IMPORT_C TIntVolume()
    IMPORT_C TIntWillResumePlay()
    Inherited Functions
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    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.

    Since
    7.0s

    Constructor & Destructor Documentation

    ~CVideoPlayerUtility ( )

    ~CVideoPlayerUtility()

    Destructor. Closes any open video clips and frees any resources held by the Video Player.

    Since
    7.0s

    Member Function Documentation

    AudioBitRateL ( )

    IMPORT_C TIntAudioBitRateL()const

    Returns the audio bit rate in bits/second.

    Since
    7.0s

    Returns: The audio bit rate (bits/second).

    AudioEnabledL ( )

    IMPORT_C TBoolAudioEnabledL()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 SetAudioEnabledL().

    Since
    7.0s

    Returns: ETrue if an audio track is present and audio playback is enabled, otherwise EFalse.

    AudioTypeL ( )

    IMPORT_C TFourCCAudioTypeL()const

    Returns the codec used for the audio component of the video clip.

    Since
    7.0s

    Returns: The four character code representing the audio codec.

    Balance ( )

    IMPORT_C TIntBalance()const

    Returns the current balance setting for the audio track of the video clip.

    Since
    7.0s

    Returns: A balance value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.

    CancelRegisterAudioResourceNotification ( TUid )

    IMPORT_C TIntCancelRegisterAudioResourceNotification(TUidaNotificationEventId)

    Cancels the registration for audio resource notification.

    ParameterDescription
    aNotificationEventIdThe Event to be cancellled.

    Returns: An error code indicating if the cancellation is successful. KErrNone on success, otherwise another of the system-wide error codes.

    Close ( )

    IMPORT_C voidClose()

    Closes the video clip.

    Since
    7.0s

    ControllerImplementationInformationL ( )

    IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL()

    Returns the controller implementation information associated with the current controller.

    Since
    7.0s

    Returns: The controller implementation structure associated with the controller.

    CustomCommandAsync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus & )

    IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
    TIntaFunction,
    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.

    Since
    7.0s
    ParameterDescription
    aDestinationThe destination of the message, consisting of the uid of the interface of this message.
    aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
    aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.
    aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

    CustomCommandAsync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus & )

    IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
    TIntaFunction,
    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.

    Since
    7.0s
    ParameterDescription
    aDestinationThe destination of the message, consisting of the uid of the interface of this message.
    aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
    aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aStatusThe TRequestStatus of an active object. This will contain the result of the request on completion. The exact range of result values is dependent on the interface.

    CustomCommandSync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 & )

    IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
    TIntaFunction,
    const TDesC8 &aDataTo1,
    const TDesC8 &aDataTo2,
    TDes8 &aDataFrom
    )

    Sends a synchronous custom command to the controller.

    Since
    7.0s
    ParameterDescription
    aDestinationThe destination of the message, consisting of the UID of the interface of this message.
    aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
    aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataFromA reference to an area of memory to which the controller framework will write any data to be passed back to the client. Can't be KNullDesC8.

    Returns: The result of the request. The exact range of values is dependent on the interface.

    CustomCommandSync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 & )

    IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
    TIntaFunction,
    const TDesC8 &aDataTo1,
    const TDesC8 &aDataTo2
    )

    Sends a synchronous custom command to the controller.

    Since
    7.0s
    ParameterDescription
    aDestinationThe destination of the message, consisting of the uid of the interface of this message.
    aFunctionThe function number to indicate which function is to be called on the interface defined in the aDestination parameter.
    aDataTo1A reference to the first chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.
    aDataTo2A reference to the second chunk of data to be copied to the controller framework. The exact contents of the data are dependent on the interface being called. Can be KNullDesC8.

    Returns: The result of the request. The exact range of values is dependent on the interface.

    DurationL ( )

    IMPORT_C TTimeIntervalMicroSecondsDurationL()const

    Returns the duration of video clip in mircoseconds.

    Since
    7.0s

    Returns: The duration of clip in microseconds.

    GetCropRegionL ( TRect & )

    IMPORT_C voidGetCropRegionL(TRect &aCropRegion)const

    Gets the crop region currently applied to the image.

    Since
    7.0s

    See also: SetCropRegionL

    ParameterDescription
    aCropRegionThe dimensions of the crop region, relative to the video image. If no crop region has been applied, the full dimensions of the video image will be returned.

    GetDRMCustomCommand ( )

    IMPORT_C MMMFDRMCustomCommand *GetDRMCustomCommand()

    Gets a controller's DRM custom command implementation.

    Returns: A pointer to a controller's DRM custom command implementation, or NULL if the controller does not support it.

    GetFrameL ( TDisplayMode )

    IMPORT_C voidGetFrameL(TDisplayModeaDisplayMode)

    Gets the current frame. The current frame is requested, and will be sent to the client asynchrynously via the MvpuoFrameReady callback.

    Since
    7.0s
    ParameterDescription
    aDisplayModeThe display mode for the retrieved frame.

    GetFrameL ( TDisplayMode, ContentAccess::TIntent )

    IMPORT_C voidGetFrameL(TDisplayModeaDisplayMode,
    ContentAccess::TIntentaIntent
    )

    Gets the current frame. The current frame is requested, and will be sent to the client asynchrynously via the MvpuoFrameReady callback.

    ParameterDescription
    aDisplayModeThe display mode for the retrieved frame.
    aIntentThe DRM Intent to pass to the controller.

    GetPlayRateCapabilitiesL ( TVideoPlayRateCapabilities & )

    IMPORT_C voidGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities &aCapabilities)const

    Queries the current playback rate capabilities. The capabilities describe whether fast forward, reverse playback, slow motion, or step backward or forward is possible. The capabilities may depend on the controller implementation and the video clip. Additionally, only normal-speed forward playback is typically possible in streamed playback.

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    The video clip has been opened
    leave
    KErrNotReady The video clip has not yet been opened
    ParameterDescription
    aCapabilitiesPlayback rate capabilities

    GetScaleFactorL ( TReal32 &, TReal32 &, TBool & )

    IMPORT_C voidGetScaleFactorL(TReal32 &aWidthPercentage,
    TReal32 &aHeightPercentage,
    TBool &aAntiAliasFiltering
    )const

    Gets the scale factor currently applied to the video image.

    Since
    7.0s

    See also: SetScaleFactorL

    ParameterDescription
    aWidthPercentageOn function return, contains the current scaling percentage applied to the width of the video image (100 = original size).
    aHeightPercentageOn function return, contains the current scaling percentage applied to the height of the of the video image (100 = original size).
    aAntiAliasFilteringThe boolean specifying if anit-aliasing is being used.

    GetVideoLoadingProgressL ( TInt & )

    IMPORT_C voidGetVideoLoadingProgressL(TInt &aPercentageComplete)

    Gets the progress of video clip loading/rebuffering.

    Since
    7.0s
    ParameterDescription
    aPercentageCompleteThe percentage of loading/rebuffering complete. The parameter is zero if loading has not begun and 100 if loading has already completed.

    MaxVolume ( )

    IMPORT_C TIntMaxVolume()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.

    Since
    7.0s

    Returns: The naximum playback volume.

    MetaDataEntryL ( TInt )

    IMPORT_C CMMFMetaDataEntry *MetaDataEntryL(TIntaIndex)const

    Returns a meta data entry from the clip.

    Since
    7.0s

    See also: NumberOfMetaDataEntriesL

    ParameterDescription
    aIndexThe index of the meta data entry to retrieve.

    Returns: The metadata entry requested.

    NewL ( MVideoPlayerUtilityObserver &, TInt, TInt, RWsSession &, CWsScreenDevice &, RWindowBase &, const TRect &, const TRect & )

    IMPORT_C CVideoPlayerUtility *NewL(MVideoPlayerUtilityObserver &aObserver,
    TIntaPriority,
    TIntaPref,
    RWsSession &aWs,
    CWsScreenDevice &aScreenDevice,
    RWindowBase &aWindow,
    const TRect &aScreenRect,
    const TRect &aClipRect
    )[static]

    Constructs and initialises a new instance of the video player utility.

    This function leaves if the video player utility object cannot be created.

    Since
    7.0s
    Note: The Priority Value and Priority Preference are used primarily when deciding what to do when several audio clients attempt to play or record simultaneously. In addition to the Priority Value and Preference, the adaptation may consider other parameters such as the SecureId and Capabilities of the client process. Whatever, the decision as to what to do in such situations is up to the audio adaptation, and may vary between different phones. Portable applications are advised not to assume any specific behaviour.
    ParameterDescription
    aObserverA client class to receive notifications from the video player.
    aPriorityThe Priority Value - this client's relative priority. This is a value between EMdaPriorityMin and EMdaPriorityMax and represents a relative priority. A higher value indicates a more important request.
    aPrefThe Priority Preference - an additional audio policy parameter. The suggested default is EMdaPriorityPreferenceNone. Further values are given by TMdaPriorityPreference, and additional values may be supported by given phones and/or platforms, but should not be depended upon by portable code.
    aWsThe window server session id.
    aScreenDeviceThe software device screen.
    aWindowThe display window.
    aScreenRectThe dimensions of the display window.
    aClipRectThe area of the video clip to display in the window.

    Returns: A pointer to the new video player utility object.

    NumberOfMetaDataEntriesL ( )

    IMPORT_C TIntNumberOfMetaDataEntriesL()const

    Returns the number of meta data entries associated with this clip.

    Since
    7.0s

    Returns: The number of meta data entries.

    OpenDesL ( const TDesC8 &, TUid )

    IMPORT_C voidOpenDesL(const TDesC8 &aDescriptor,
    TUidaControllerUid = KNullUid
    )

    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.

    From Symbian release v9.5 onwards, this function will enable graphics surface use if the controller supports it. If this function is called through an instance of the derived class CVideoPlayerUtility2 and the controller doesn't support graphics surfaces, it fails with KErrNotSupported.

    Since
    7.0s
    ParameterDescription
    aDescriptorThe descriptor containing the video clip
    aControllerUidIf specified, it will force the video player to use the controller with the given UID.

    OpenFileL ( const TDesC &, TUid )

    IMPORT_C voidOpenFileL(const TDesC &aFileName,
    TUidaControllerUid = KNullUid
    )

    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.

    From Symbian release v9.5 onwards, this function will enable graphics surface use if the controller supports it. If this function is called through an instance of the derived class CVideoPlayerUtility2 and the controller doesn't support graphics surfaces, it fails with KErrNotSupported.

    Since
    7.0s
    ParameterDescription
    aFileNameThe full path name of the file containing the video data.
    aControllerUidIf specified, it will force the video player to use the controller with the given UID.

    OpenFileL ( const RFile &, TUid )

    IMPORT_C voidOpenFileL(const RFile &aFileName,
    TUidaControllerUid = KNullUid
    )

    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.

    From Symbian release v9.5 onwards, this function will enable graphics surface use if the controller supports it. If this function is called through an instance of the derived class CVideoPlayerUtility2 and the controller doesn't support graphics surfaces, it fails with KErrNotSupported.

    Since
    7.0s
    ParameterDescription
    aFileNameAn open handle to a file containing the video clip
    aControllerUidIf specified, it will force the video player to use the controller with the given UID.

    OpenFileL ( const TMMSource &, TUid )

    IMPORT_C voidOpenFileL(const TMMSource &aSource,
    TUidaControllerUid = KNullUid
    )

    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.

    From Symbian release v9.5 onwards, this function will enable graphics surface use if the controller supports it. If this function is called through an instance of the derived class CVideoPlayerUtility2 and the controller doesn't support graphics surfaces, it fails with KErrNotSupported.

    ParameterDescription
    aSourceA filename or an open handle to a file containing the video clip
    aControllerUidIf specified, it will force the video player to use the controller with the given UID.

    OpenUrlL ( const TDesC &, TInt, const TDesC8 &, TUid )

    IMPORT_C voidOpenUrlL(const TDesC &aUrl,
    TIntaIapId =  KUseDefaultIap ,
    const TDesC8 &aMimeType =  KNullDesC8 ,
    TUidaControllerUid = KNullUid
    )

    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.

    From Symbian release v9.5 onwards, this function will enable graphics surface use if the controller supports it. If this function is called through an instance of the derived class CVideoPlayerUtility2 and the controller doesn't support graphics surfaces, it fails with KErrNotSupported.

    Since
    7.0s
    ParameterDescription
    aUrlThe URL of the video clip to open.
    aIapIdThe Id of the internet access point to use
    aMimeTypeThe MIME type associated with this video clip. This is used to determine the format of the video clip.
    aControllerUidIf specified, it will force the video player to use the controller with the given Uid.

    PauseL ( )

    IMPORT_C voidPauseL()

    Video playback is paused. The current position is maintained and playback can be resumed by calling Play.

    Since
    7.0s

    Play ( )

    IMPORT_C voidPlay()

    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.

    Since
    7.0s

    Play ( const TTimeIntervalMicroSeconds &, const TTimeIntervalMicroSeconds & )

    IMPORT_C voidPlay(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.

    Since
    7.0s
    ParameterDescription
    aStartPointThe point at which to start playback.
    aEndPointThe point at which to terminate playback.

    PlayVelocityL ( )

    IMPORT_C TIntPlayVelocityL()const

    Returns the current playback velocity. If setting play velocity is not supported or velocity is not set this will return default play velocity 100 corresponding to normal playback.

    If implementation is not supporting the velocity set with SetPlayVelocityL it will default to the nearest velocity. In this case this API will return the value it has defaulted to.

    If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    Playback has been started, but may be paused.

    See also: CVideoPlayerUtility::SetPlayVelocityL()

    leave
    KErrNotReady Playback has not yet been started

    Returns: The current playback velocity as a percentage relative to the normal video clip speed.

    PositionL ( )

    IMPORT_C TTimeIntervalMicroSecondsPositionL()const

    Returns the current playback position.

    Since
    7.0s

    Returns: The current position from the start of the clip in microseconds.

    Prepare ( )

    IMPORT_C voidPrepare()

    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.

    Since
    7.0s

    PriorityL ( TInt &, TMdaPriorityPreference & )

    IMPORT_C voidPriorityL(TInt &aPriority,
    TMdaPriorityPreference &aPref
    )const

    Get the current playback priority. This is used to arbitrate between simultaneous accesses of the sound hardware.

    Since
    7.0s
    ParameterDescription
    aPriorityOn return, contains the priority level, 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.
    aPrefOn return, contains the time and quality preferences, enumerated in TMdaPriorityPreference.

    RefreshFrameL ( )

    IMPORT_C voidRefreshFrameL()

    Requests the video controller to redraw the current frame.

    Since
    7.0s

    RegisterAudioResourceNotification ( MMMFAudioResourceNotificationCallback &, TUid, const TDesC8 & )

    IMPORT_C TIntRegisterAudioResourceNotification(MMMFAudioResourceNotificationCallback &aCallback,
    TUidaNotificationEventUid,
    const TDesC8 &aNotificationRegistrationData =  KNullDesC8
    )

    Registers for notification, when audio resource is available.

    ParameterDescription
    aCallbackObserver interface for audio resource notification event
    aNotificationEventUidThe Event for which the client registers.
    aNotificationRegistrationDataData specific to notification registration.This has been reserved for future use and its value should be NULL.

    Returns: An error code indicating if the registration is successful. KErrNone on success, otherwise another of the system-wide error codes.

    RegisterForVideoLoadingNotification ( MVideoLoadingObserver & )

    IMPORT_C voidRegisterForVideoLoadingNotification(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().

    Since
    7.0s
    ParameterDescription
    aCallbackThe object to receive video loading notifications.

    RotationL ( )

    IMPORT_C TVideoRotationRotationL()const

    Query the rotation that is currently applied to the video image.

    Since
    7.0s

    See also: SetRotationL

    Returns: The applied rotation

    SetAudioEnabledL ( TBool )

    IMPORT_C voidSetAudioEnabledL(TBoolaAudioEnabled)

    Enables or disables audio playback. This function is used to disable audio playback in a video clip to play only the video track. By default audio playback is always enabled if the clip has an audio track.

    This method can be called after the video clip has been opened, but only before calling Prepare().

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    The video clip has been opened by the client and Prepare() has not been called.
    leave
    KErrNotSupported This method is not supported -- audio playback is always enabled
    leave
    KErrNotReady The clip has not been opened or the client has already called Prepare().
    ParameterDescription
    aAudioEnabledETrue to enable audio playback, EFalse to disable

    SetAutoScaleL ( TAutoScaleType )

    IMPORT_C voidSetAutoScaleL(TAutoScaleTypeaScaleType)

    Set video automatic scaling. When automatic scaling is active, the video picture is scaled automatically to match the video window, based on the scaling type. This variant of SetAutoScaleL() will always center the picture in the window.

    Calling SetAutoScaleL() will override any scaling factors set with SetScaleFactorL(). Calling SetScaleFactorL() will disable automatic scaling.

    Not all video controllers support automatic scaling.

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    See also: TAutoScaleType, THorizontalAlign, TVerticalAlign

    Pre-condition
    The video clip has been opened by the client
    leave
    KErrNotSupported Automatic scaling is not supported
    ParameterDescription
    aScaleTypeAutomatic scaling type

    SetAutoScaleL ( TAutoScaleType, TInt, TInt )

    IMPORT_C voidSetAutoScaleL(TAutoScaleTypeaScaleType,
    TIntaHorizPos,
    TIntaVertPos
    )

    Set video automatic scaling. When automatic scaling is active, the video picture is scaled automatically to match the video window, based on the scaling type, and positioned according to the parameters.

    Calling SetAutoScaleL() will override any scaling factors set with SetScaleFactorL(). Calling SetScaleFactorL() will disable automatic scaling.

    Not all video controller support automatic scaling.

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    See also: TAutoScaleType, THorizontalAlign, TVerticalAlign

    Pre-condition
    The video clip has been opened by the client.
    leave
    KErrNotSupported Automatic scaling is not supported
    ParameterDescription
    aScaleTypeAutomatic scaling type
    aHorizPosVideo picture horizontal position, relative to the video window. The value can be either a pixel offset (positive or negative) from the top left corner of the window to the top left corner of the picture, or an alignment constant from enum THorizontalAlign.
    aVertPosVideo picture vertical position, relative to the video window. The value can be either a pixel offset (positive or negative) from the top left corner of the window to the top left corner of the picture, or an alignment constant from enum TVerticalAlign.

    SetBalanceL ( TInt )

    IMPORT_C voidSetBalanceL(TIntaBalance)

    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.

    Since
    7.0s
    ParameterDescription
    aBalanceThe balance value to set.

    SetCropRegionL ( const TRect & )

    IMPORT_C voidSetCropRegionL(const TRect &aCropRegion)

    Selects a region of the video image to be displayed.

    Since
    7.0s

    See also: GetCropRegionL

    ParameterDescription
    aCropRegionThe dimensions of the crop region, relative to the video image.

    SetDisplayWindowL ( RWsSession &, CWsScreenDevice &, RWindowBase &, const TRect &, const TRect & )

    IMPORT_C voidSetDisplayWindowL(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.

    From Symbian release 9.5 onwards this method is not supported when called on an instance of CVideoPlayerUtility2, and will always leave with KErrNotSupported.

    Since
    7.0s
    ParameterDescription
    aWsThe window server session ID.
    aScreenDeviceThe software device screen.
    aWindowThe window to display.
    aWindowRectThe dimensions of the display window.
    aClipRectThe area of the video clip to display in the window.

    SetExternalDisplaySwitchingL ( TInt, TBool )

    IMPORT_C voidSetExternalDisplaySwitchingL(TIntaDisplay,
    TBoolaControl
    )

    When enabled sets automatic switching of surface to/from external display when it is connected/disconnected from the device.

    Automatic switching is enabled by default, but only if the client thread that created this utility has an Active Scheduler installed and the device supports external display switching.

    To use this function the client thread must have an Active Scheduler installed otherwise it will leave with KErrNotReady.

    leave
    KErrNotSupported Device does not support external displays
    leave
    KErrNotReady CActiveScheduler is not installed
    ParameterDescription
    aDisplayDisplay id of display to enable external switching for.
    aControlETrue to enable. EFalse to disable.

    SetInitScreenNumber ( TInt )

    IMPORT_C TIntSetInitScreenNumber(TIntaScreenNumber)

    Sets the initial screen to be used for the video display.

    From Symbian release 9.5 onwards this method is not supported when called on an instance of CVideoPlayerUtility2, and will always leave with KErrNotSupported.

    ParameterDescription
    aScreenNumberThe screen number of the device.

    Returns: KErrNotSupported if the secondary screen display is not supported in Multimedia Framework or from Symbian release 9.5 onwards when called on an instance of CVideoPlayerUtility2. KErrNone on success.

    SetPlayVelocityL ( TInt )

    IMPORT_C voidSetPlayVelocityL(TIntaVelocity)

    Set video playback velocity relative to the normal video clip speed. This method can be used for fast forward, rewind, and slow-motion playback, depending on the capabilities of the underlying play-controller implementation and the characteristics of the video clip. Velocity set in this call will take effect immediately. Additionally, playback velocity cannot be changed for streamed video. Use GetPlayRateCapabilitiesL() to determine what playback modes are available.

    Note that due to performance reasons, it may not be possible to perform fast forward or rewind at the requested speed. If that happens, the play-controller will use the nearest available velocity. This is not considered an error and the method will not leave. User can query velocity in effect by calling PlayVelocityL().

    The default playback velocity is 100. Play velocity is persistent across stop play calls on utility. That is SetPlayVelocityL(),call StopL(),then PlayL() will play with the velocity set in most recent call. On opening different file the velocity will default to 100.

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    Playback has been started, but may be paused.

    See also: CVideoPlayerUtility::GetPlayRateCapabilitiesL()

    leave
    KErrNotSupported The requested playback velocity is not supported.
    leave
    KErrNotReady Playback has not yet been started
    ParameterDescription
    aVelocityPlayback velocity as a percentage relative to the normal video clip speed. Use 100 for normal-speed forward playback and negative value for reverse. Values above 100 and below 0 correspond to fast forward and rewind respectively, while values 1 to 100 represent slow-motioned playback.

    SetPositionL ( const TTimeIntervalMicroSeconds & )

    IMPORT_C voidSetPositionL(const TTimeIntervalMicroSeconds &aPosition)

    Sets the position within the video clip from where to start playback.

    Since
    7.0s
    ParameterDescription
    aPositionPosition from start of clip in microseconds.

    SetPriorityL ( TInt, TInt )

    IMPORT_C voidSetPriorityL(TIntaPriority,
    TIntaPref
    )

    Sets the playback priority.

    This is used to arbitrate between multiple objects simultaneously trying to accesses the sound hardware.

    See also: CVideoPlayerUtility::NewL()

    Since
    7.0s
    ParameterDescription
    aPriorityThe Priority Value.
    aPrefThe Priority Preference.

    SetRotationL ( TVideoRotation )

    IMPORT_C voidSetRotationL(TVideoRotationaRotation)

    Rotates the video image on the screen.

    See also: RotationL

    Since
    7.0s
    ParameterDescription
    aRotationThe desired rotation to apply in 90 degree increments.

    SetScaleFactorL ( TReal32, TReal32, TBool )

    IMPORT_C voidSetScaleFactorL(TReal32aWidthPercentage,
    TReal32aHeightPercentage,
    TBoolaAntiAliasFiltering
    )

    Scales the video image to a specified percentage of its original size.

    Since
    7.0s

    See also: GetScaleFactorL

    ParameterDescription
    aWidthPercentageThe percentage (100 = original size) to be used to scale the width of the video image
    aHeightPercentageThe percentage (100 = original size) to be used to scale the height of the video image. If this is not equal to aWidthPercentage then the image may be distorted.
    aAntiAliasFilteringA boolean specifying if anti-aliasing should be used. True if anti-aliasing filtering should be used. If the plugin does not support this kind of processing, this value will be ignored.

    SetVideoEnabledL ( TBool )

    IMPORT_C voidSetVideoEnabledL(TBoolaVideoEnabled)

    Enables or disables video playback. This function is used to disable video playback in a video clip to play only the audio track. By default video playback is always enabled if the clip has a video track.

    This method can be called after the video clip has been opened, but only before calling Prepare().

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    The video clip has been opened by the client and Prepare() has not been called.
    leave
    KErrNotSupported This method is not supported -- video playback is always enabled.
    leave
    KErrNotReady The clip has not been opened or the client has already called Prepare().
    ParameterDescription
    aVideoEnabledETrue to enable video playback, EFalse to disable

    SetVideoFrameRateL ( TReal32 )

    IMPORT_C voidSetVideoFrameRateL(TReal32aFramesPerSecond)

    Sets the video frame rate.

    Since
    7.0s
    ParameterDescription
    aFramesPerSecondThe number of frames per second to request.

    SetVolumeL ( TInt )

    IMPORT_C voidSetVolumeL(TIntaVolume)

    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().

    Since
    7.0s
    ParameterDescription
    aVolumeThe volume, between 0 and MaxVolume().

    StartDirectScreenAccessL ( )

    IMPORT_C voidStartDirectScreenAccessL()

    Enables a client application to start the video player using direct screen access (DSA).

    From Symbian release 9.5 onwards this method is not supported when called on an instance of CVideoPlayerUtility2, and will always leave with KErrNotSupported.

    This function leaves if errors are encountered when trying to start DSA.

    StepFrameL ( TInt )

    IMPORT_C voidStepFrameL(TIntaStep)

    Steps the current video playback position forward or backward by a number of frames. Frame step is only available when playback is paused.

    Support for frame stepping may depend on the underlying play-controller implementation and the video clip open. Additionally, frame step is typically not available in streamed playback. Use GetPlayRateCapabilitiesL() to query if frame step is currently possible. Application may check the value of the current positon after stepping through several frames by calling PositionL() API.

    Implementations may not be able to step exactly the number of frames requested, especially when stepping backwards. If this happens, the play-controller will step to a frame close to the one requested. This is not considered an error.

    This function quits or exits leaving any of the system wide error codes. Common error codes are listed below.

    Pre-condition
    Playback has been started and is currently paused. That means this API can be called only in paused state.

    See also: CVideoPlayerUtility::GetPlayRateCapabilitiesL()

    leave
    KErrNotSupported Frame step is not supported. Note that some implementations may support step forward but not step backward.
    leave
    KErrNotReady Playback has not yet been started or is not in paused state.
    ParameterDescription
    aStepThe number of frames to step. Use positive values for stepping forward and negative values for stepping back.

    Stop ( )

    IMPORT_C TIntStop()

    Stops playback of the video sample as soon as is possible.

    If the video sample is playing, playback is stopped as soon as possible.

    If playback is already complete, this function has no effect.

    The position is reset to the beginning of the file.

    Since
    7.0s

    Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

    StopDirectScreenAccessL ( )

    IMPORT_C voidStopDirectScreenAccessL()

    Enables a client application to stop the video player from using direct screen access (DSA).

    From Symbian release 9.5 onwards this method is not supported when called on an instance of CVideoPlayerUtility2, and will always leave with KErrNotSupported.

    This function leaves if errors are encountered when trying to stop DSA.

    VideoBitRateL ( )

    IMPORT_C TIntVideoBitRateL()const

    Returns the video bit rate.

    Since
    7.0s

    Returns: The video bit rate in bits/second.

    VideoEnabledL ( )

    IMPORT_C TBoolVideoEnabledL()const

    Queries whether video playback is currently enabled or not. If an error occurs, this function leaves with any of the system wide error codes. Common error codes are listed below.

    Returns: ETrue if video playback is enabled, EFalse if not.

    VideoFormatMimeType ( )

    IMPORT_C const TDesC8 &VideoFormatMimeType()const

    Returns the video format's MIME type.

    Since
    7.0s

    See also: NumberOfMetaDataEntriesL

    Returns: The video clip's MIME type.

    VideoFrameRateL ( )

    IMPORT_C TReal32VideoFrameRateL()const

    Returns the video frame rate in frames/second.

    Since
    7.0s

    Returns: The video frame rate (frames/second).

    VideoFrameSizeL ( TSize & )

    IMPORT_C voidVideoFrameSizeL(TSize &aSize)const

    Gets the video frame size.

    Since
    7.0s
    ParameterDescription
    aSizeThe video frame size

    Volume ( )

    IMPORT_C TIntVolume()const

    Returns the current playback volume for the audio track of the video clip.

    Since
    7.0s

    Returns: A value between 0 (mute) and the maximum volume returned by MaxVolume().

    WillResumePlay ( )

    IMPORT_C TIntWillResumePlay()

    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.

    Returns: An error code indicating if the function call is successful. KErrNone on success, otherwise another of the system-wide error codes.