This tutorial describes how to set automatic scaling.
The purpose of this tutorial is to show you how to scale the video picture to automatically match the video window.
Required Background
The Video Client Overview introduces the video client utilities.
Introduction
Automatic scaling enables you to set video display settings, such as best fit or stretch, that can apply irrespective of the resolution of a video clip. This functionality is provided by the CVideoPlayerUtility::SetAutoScaleL() method.
Note: Not all video controllers support automatic scaling.
The following tasks are covered in this tutorial:
The high level steps to set automatic scaling are shown here:
Create a new video player utility object.
Open a video clip to play.
Set automatic scaling using one of the following methods:
Based on Scaling Type
Call CVideoPlayerUtility::SetAutoScaleL() and set aScaleType to the automatic scaling type required.
Based on Scaling Type and Vertical and Horizontal Position
Call CVideoPlayerUtility::SetAutoScaleL() and set aScaleType, aHorizPos and aVertPos to the required values.
Note: Calling CVideoPlayerUtility::SetAutoScaleL() will override any scaling factors set with CVideoPlayerUtility::SetScaleFactorL().
Call the CVideoPlayerUtility::Prepare() method.
Control playback normally.
Example
//Create new video player utility object (iVideoPlayer) // Open the video clip iVideoPlayer->SetAutoScaleL(EAutoScaleBestFit); // scale picture to best fit window without clipping // Call Prepare() and then Play() to playback normally
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.