class CVideoPlayerUtility2 : public CVideoPlayerUtility |
Extension class from CVideoPlayerUtility to allow graphics surface support.
~CVideoPlayerUtility2 | ( | ) |
Destructor. Closes any open video clips and frees any resources held by the Video Player.
IMPORT_C void | AddDisplayL | ( | RWsSession & | aWs, |
TInt | aDisplay, | |||
MMMFSurfaceEventHandler & | aEventHandler | |||
) |
Adds the specified display to the list of surface rendering targets. This API can be used in conjunction with AddDisplayWindowL calls. The caller is responsible for handling surface events generated for the specific display. A single graphics surface is created and shared between all windows and displays. Surface registration and de-registration is managed by the MMF framework.
RWsSession & aWs | Window server session. |
TInt aDisplay | Display to create graphics surface on. |
MMMFSurfaceEventHandler & aEventHandler | Call-back interface for receiving surface specific events. |
IMPORT_C void | AddDisplayWindowL | ( | RWsSession & | aWs, |
CWsScreenDevice & | aScreenDevice, | |||
RWindow & | aWindow, | |||
const TRect & | aVideoExtent, | |||
const TRect & | aWindowClipRect | |||
) |
Adds a new window for displaying the video picture. Client applications must use this method instead of SetDisplayWindowL() when using CVideoPlayerUtility2 .
This method can only be called after opening the source is complete and the client has received an MvpuoOpenComplete() callback.
RWsSession & aWs | The window server session for this window. |
CWsScreenDevice & aScreenDevice | The screen device for the screen that the window is displayed on. |
RWindow & aWindow | The display window. |
const TRect & aVideoExtent | Video extent on the screen, relative to the window. Video picture position within the extent depends on the scaled picture and content alignment or offset. The video extent can be partially or completely outside the window. |
const TRect & aWindowClipRect | Window clipping rectangle, relative to the window. The clipping rectangle specifies the part of the window used for video display. The rectangle must be contained completely within the window. |
IMPORT_C void | AddDisplayWindowL | ( | RWsSession & | aWs, |
CWsScreenDevice & | aScreenDevice, | |||
RWindow & | aWindow | |||
) |
A simplified variant of AddDisplayWindowL() . When this variant is used, the video extent and window clipping rectangle default to the whole window.
This method can only be called after opening the source is complete and the client has received an MvpuoOpenComplete() callback.
RWsSession & aWs | The window server session for this window. |
CWsScreenDevice & aScreenDevice | The screen device for the screen that the window is displayed on. |
RWindow & aWindow | The display window. |
IMPORT_C void | GetScaleFactorL | ( | const RWindow & | aWindow, |
TReal32 & | aWidthPercentage, | |||
TReal32 & | aHeightPercentage | |||
) |
Retrieves the scale factor currently set for a window. This is the preferred method to use with CVideoPlayerUtility2 .
const RWindow & aWindow | Window to retrieve scale factor for. |
TReal32 & aWidthPercentage | On function return, contains the current scaling percentage applied to the width of the video image (100 = original size). |
TReal32 & aHeightPercentage | On function return, contains the current scaling percentage applied to the height of the video image (100 = original size). |
IMPORT_C CVideoPlayerUtility2 * | NewL | ( | MVideoPlayerUtilityObserver & | aObserver, |
TInt | aPriority, | |||
TInt | aPref | |||
) | [static] |
Creates a new instance of the video player utility. Unlike CVideoPlayerUtility::NewL() , the CVideoPlayerUtility2 factory does not require window handles and other video display information as its arguments. The client can set up rendering later with AddDisplayWindowL() , or optionally use the utility without a window, for example, for metadata query purposes.
MVideoPlayerUtilityObserver & aObserver | A client class to receive notifications from the video player. |
TInt aPriority | The 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. |
TInt aPref | The 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. |
IMPORT_C void | RemoveDisplay | ( | TInt | aDisplay | ) |
Removes the specified display from the list of surface rendering targets.
TInt aDisplay | Display id of display to remove |
IMPORT_C void | RemoveDisplayWindow | ( | RWindow & | aWindow | ) |
Removes a window that is currently being used to display the video picture. The window must have previously been added with AddDisplayWindowL() .
This method cannot fail. If the window has not been added with AddDisplayWindowL() , the method call will be ignored.
RWindow & aWindow | The display window. |
IMPORT_C TVideoRotation | RotationL | ( | const RWindow & | aWindow | ) |
Retrieves the video rotation set for a window. This is the preferred method to use with CVideoPlayerUtility2 .
const RWindow & aWindow | Window to retrieve rotation for. |
IMPORT_C void | SetAutoScaleL | ( | const RWindow & | aWindow, |
TAutoScaleType | aScaleType | |||
) |
Set video automatic scaling. When automatic scaling is active, the video picture is scaled automatically to match the video extent, based on the scaling type. This variant of SetAutoScaleL() will always center the picture in the extent.
This is the preferred method to use with CVideoPlayerUtility2 .
Calling SetAutoScaleL() will override any scaling factors set with SetScaleFactorL() . Calling SetScaleFactorL() will disable automatic scaling.
const RWindow & aWindow | Window to set auto scaling options for. |
TAutoScaleType aScaleType | Automatic scaling type |
IMPORT_C void | SetAutoScaleL | ( | const RWindow & | aWindow, |
TAutoScaleType | aScaleType, | |||
TInt | aHorizPos, | |||
TInt | aVertPos | |||
) |
Set video automatic scaling. When automatic scaling is active, the video picture is scaled automatically to match the video extent, based on the scaling type, and positioned according to the parameters.
This is the preferred method to use with CVideoPlayerUtility2 .
Calling SetAutoScaleL() will override any scaling factors set with SetScaleFactorL() . Calling SetScaleFactorL() will disable automatic scaling.
const RWindow & aWindow | Window to set auto scaling options for. |
TAutoScaleType aScaleType | Automatic scaling type |
TInt aHorizPos | Video 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. |
TInt aVertPos | Video 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. |
IMPORT_C void | SetExternalDisplaySwitchingL | ( | TInt | aDisplay, |
TBool | aControl | |||
) |
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.
IMPORT_C void | SetRotationL | ( | const RWindow & | aWindow, |
TVideoRotation | aRotation | |||
) |
Rotates the video image within the window. This is the preferred method to use with CVideoPlayerUtility2 .
The rotation will replace any rotation set with CVideoPlayerUtility::SetRotationL . Likewise with setting the rotation with CVideoPlayerUtility::SetRotationL after a call to CVideoPlayerUtility2::SetRotationL has been made, then the rotation specified will replace any rotation set with CVideoPlayerUtility2::SetRotationL .
const RWindow & aWindow | Window to set rotation for. |
TVideoRotation aRotation | The video rotation to use for aWindow. |
IMPORT_C void | SetScaleFactorL | ( | const RWindow & | aWindow, |
TReal32 | aWidthPercentage, | |||
TReal32 | aHeightPercentage | |||
) |
Scales the video image to a specified percentage of its original size within the window. This is the preferred method to use with CVideoPlayerUtility2 . Setting scale factor will set auto scale to EAutoScaleNone for the window.
The scale factor will replace any scale factor set with CVideoPlayerUtility::SetScaleFactorL . Likewise with setting the scale factor with CVideoPlayerUtility::SetScaleFactorL after a call to CVideoPlayerUtility2::SetScaleFactorL has been made, then the scale factor specified will replace any scale factor set with CVideoPlayerUtility2::SetScaleFactorL .
const RWindow & aWindow | Window to set scale factor for. |
TReal32 aWidthPercentage | The percentage (100 = original size) to be used to scale the width of the video image |
TReal32 aHeightPercentage | The 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. |
IMPORT_C void | SetVideoExtentL | ( | const RWindow & | aWindow, |
const TRect & | aVideoExtent | |||
) |
Sets the video extent on the screen, relative to the window. The extent specifies the area of screen in which the video picture is placed, and may be partially or completely outside of the video window. Video picture position within the extent depends on the picture size and content alignment or offset.
This method can only be called after opening the source is complete and the client has received an MvpuoOpenComplete() callback.
IMPORT_C void | SetWindowClipRectL | ( | const RWindow & | aWindow, |
const TRect & | aWindowClipRect | |||
) |
Sets the window clipping rectangle, relative to the window. The clipping rectangle specifies the part of the window used to display the video picture and must be fully contained within the window.
This method can only be called after opening the source is complete and the client has received an MvpuoOpenComplete() callback.
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.