Scaling Automatically

This tutorial describes how to set automatic scaling.

Purpose

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.

Using Automatic Scaling

The following tasks are covered in this tutorial:

Basic Procedure

The high level steps to set automatic scaling are shown here:

  1. Create a new video player utility object.

  2. Open a video clip to play.

  3. Set automatic scaling using one of the following methods:

    Note: Calling CVideoPlayerUtility::SetAutoScaleL() will override any scaling factors set with CVideoPlayerUtility::SetScaleFactorL().

  4. Call the CVideoPlayerUtility::Prepare() method.

  5. 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

See Also

Creating and Preparing a Video Player

Configuring the Video Player

Enabling/Disabling Audio or Video Playback Separately

Controlling Video Playback

Fast Forwarding and Rewinding

Stepping Frames

Controlling the Video Controller Plugin