Symbian3/PDK/Source/GUID-FE7DE542-3FD4-56D2-B281-C670EF1C4FEB.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 5 f345bda72bc4
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<concept xml:lang="en" id="GUID-FE7DE542-3FD4-56D2-B281-C670EF1C4FEB"><title> Scaling Automatically</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to set automatic scaling. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to scale the video picture to automatically match the video window. </p> <p><b>Required Background</b> </p> <p>The <xref href="GUID-2DC80BA9-7AA2-5CD3-9105-1DE28CE196C1.dita">Video Client Overview</xref> introduces the video client utilities. </p> <p><b>Introduction</b> </p> <p>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 <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-F6AE0276-9C47-3342-8768-290E13586AF9"><apiname>CVideoPlayerUtility::SetAutoScaleL()</apiname></xref> method. </p> <p> <b>Note:</b> Not all video controllers support automatic scaling. </p> </section> <section><title>Using Automatic Scaling </title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-E5D983C4-821C-5B95-A97D-4748FCF6C442"><p><xref href="GUID-FE7DE542-3FD4-56D2-B281-C670EF1C4FEB.dita#GUID-FE7DE542-3FD4-56D2-B281-C670EF1C4FEB/GUID-E5B9D967-820A-5854-A634-F752E9033BDB">Set Automatic Scaling</xref>  </p> </li> </ul> <p id="GUID-E5B9D967-820A-5854-A634-F752E9033BDB"><b>Basic Procedure</b> </p> <p>The high level steps to set automatic scaling are shown here: </p> <ol id="GUID-47B6A15C-9909-54FD-AC5F-E3BB03B2441C"><li id="GUID-F6231296-DAF6-5704-8B65-303BDFEF3664"><p>Create a new video player utility object. </p> </li> <li id="GUID-B84AE1FF-B56F-5AE8-9F51-227CE150D06D"><p>Open a video clip to play. </p> </li> <li id="GUID-A5C9FA0F-3A03-5283-B0A2-8032AB24D4E0"><p>Set automatic scaling using one of the following methods: </p> <ul><li id="GUID-80CEC490-3990-57A8-A305-A8D0E62B746A"><p> <b>Based on Scaling Type</b>  </p> <p>Call <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-F6AE0276-9C47-3342-8768-290E13586AF9"><apiname>CVideoPlayerUtility::SetAutoScaleL()</apiname></xref> and set <xref href="GUID-3F4883AD-AE6B-3353-883E-3389E3DB6040.dita"><apiname>aScaleType</apiname></xref> to the automatic scaling type required. </p> </li> <li id="GUID-8A3E0397-75C5-5D2B-A0F6-92F01537A0DA"><p> <b>Based on Scaling Type and Vertical and Horizontal Position</b>  </p> <p>Call <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-F6AE0276-9C47-3342-8768-290E13586AF9"><apiname>CVideoPlayerUtility::SetAutoScaleL()</apiname></xref> and set <xref href="GUID-3F4883AD-AE6B-3353-883E-3389E3DB6040.dita"><apiname>aScaleType</apiname></xref>, <xref href="GUID-A8FC551F-3E90-3359-9D3F-76A6180E3AB0.dita"><apiname>aHorizPos</apiname></xref> and <xref href="GUID-B4900AC3-0A39-320B-AD92-47F84DFD6875.dita"><apiname>aVertPos</apiname></xref> to the required values. </p> </li> </ul> <p> <b>Note:</b> Calling <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-F6AE0276-9C47-3342-8768-290E13586AF9"><apiname>CVideoPlayerUtility::SetAutoScaleL()</apiname></xref> will override any scaling factors set with <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-82617B68-03F5-3B7F-961E-FEA20A595913"><apiname>CVideoPlayerUtility::SetScaleFactorL()</apiname></xref>. </p> </li> <li id="GUID-979D9C6B-12A8-5B79-8C86-D27DFB0BA776"><p>Call the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-B4FB00AA-A85B-3A3F-91BE-C5347462BA95"><apiname>CVideoPlayerUtility::Prepare()</apiname></xref> method. </p> </li> <li id="GUID-9442FF1C-79C4-52CD-B552-4A477C01CDF1"><p>Control playback normally. </p> </li> </ol> <p><b>Example</b> </p> <codeblock id="GUID-690C0DBD-A771-556C-86D7-F1B26CA96EA3" xml:space="preserve">//Create new video player utility object (iVideoPlayer) 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
// Open the video clip
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
iVideoPlayer-&gt;SetAutoScaleL(EAutoScaleBestFit); 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
// scale picture to best fit window without clipping
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    18
// Call Prepare() and then Play() to playback normally</codeblock> </section> <section><title>See Also</title> <p><xref href="GUID-172F46C1-6066-57FA-A815-5AC23ACE159D.dita">Creating and Preparing a Video Player</xref>  </p> <p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita">Configuring the Video Player</xref> </p> <p><xref href="GUID-733B9695-0C7C-5637-9025-6CE3BAA1A23E.dita"> Enabling/Disabling Audio or Video Playback Separately</xref>  </p> <p><xref href="GUID-5F4510C9-5B16-593A-A225-37606800915B.dita">Controlling Video Playback</xref>  </p> <p><xref href="GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita">Fast Forwarding and Rewinding</xref>  </p> <p><xref href="GUID-469377FB-AAE8-5245-A8E1-469C65AFE5C5.dita">Stepping Frames</xref>  </p> <p><xref href="GUID-F13C7D36-E4AB-57F1-87A1-EB83AA2258DF.dita">Controlling the Video Controller Plugin</xref>  </p> </section> </conbody></concept>