This tutorial describes how to configure the video player.
The purpose of this tutorial is to show you how to make configuration adjustments to the video player.
The Video Client Overview introduces the video client utilities.
The video player utility is used to open, play, and obtain information from sampled video data. This functionality is implemented by the CVideoPlayerUtility class. The video data can be supplied either in a file, a descriptor or a URL.
The following tasks will be covered in this tutorial:
The high level steps to set the display window are shown here:
CVideoPlayerUtility::SetDisplayWindowL : This is used to provide the video controller with an area of display to render the current video frame. It can be represented pictorially as shown below:
The screeenRect specifies the area within the window provided for displaying the video image. This rectangle is in screen coordinates. The video frame will be fitted to this rectangle as best possible, while maintaining the original aspect ratio.
The ClipRect specifies the region to draw. The drawn region will be the intersection between the ClipRect and the ScreenRect.
A crop region is defined as a region in the source video frame. The cropped region is displayed in the center of the ScreenRect with the same scaling as if it was displayed as part of the whole image. This could be used to zoom in on a region by setting the crop region, and setting the scale factor to fill the WindowRect.
The current volume settings can be reported and set appropriately with the help of the following functions: :
CVideoPlayerUtility::Volume() : Returns the current playback volume for the audio track of the video clip.
CVideoPlayerUtility::MaxVolume() : Returns the maximum volume that the audio track can support.
CVideoPlayerUtility::SetVolumeL() : This function allows the volume of the audio track of the video clip to be set. The volume can be changed before or during playback and comes to effect immediately. The volume can be set to a value anywhere between zero and the maximum permissible volume.
The audio playback balance settings can be done using the following functions:
CVideoPlayerUtility::SetBalanceL() : This function sets the current playback balance for the audio track of the video clip. It can be any value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight.
CVideoPlayerUtility::Balance() : This function returns the current playback balance settings for the audio track of the video clip.
To set the priority for the playback to access the sound hardware, use the following methods:
PriorityL() : This function returns the current playback priority. This is used to arbitrate between multiple objects simultaneously trying to accesses the sound hardware.
SetPriorityL() : This function sets the playback priority.
The high level steps to query and set the bit and frame rate:
CVideoPlayerUtility::VideoBitRateL() : This function returns the bit rate of the video clip. This returns the video clip's bit rate in bits per second.
CVideoPlayerUtility::VideoFrameRateL() : This function returns the video frame rate. This returns the video frame rate in frames per second.
CVideoPlayerUtility::SetVideoFrameRateL() : This function is used to set the number of video frames to be displayed per second.
Note: The presence of an audio track within a video clip can be determined using AudioEnabledL() .
The current playback position can be queried and set using the following functions:
CVideoPlayerUtility::PositionL() : This function returns the current playback position. It returns the current position from the start of the clip in microseconds.
CVideoPlayerUtility::SetPositionL() : This function sets the position for the playback within the video clip to start.
This section explains the functions that reports and sets the MIME type and codecs for video and audio data that is already open. The functions are as stated below:
CVideoPlayerUtility::VideoFormatMimeType() : This returns the current MIME type of the video clip currently open.
The datatype of the audio track used by the video clip can be retrieved using and AudioTypeL() .
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.