Symbian3/PDK/Source/GUID-469377FB-AAE8-5245-A8E1-469C65AFE5C5.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.
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-469377FB-AAE8-5245-A8E1-469C65AFE5C5"><title>Stepping Frames</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to watch frames in a video clip. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to step forward and backward through video frames. </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>Frame step allows you to step the current video playback position forward or backward by a number of frames. This feature is provided by the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-6AA8FCCE-63B1-3EF9-8A41-7A3F1DE28E76"><apiname>CVideoPlayerUtility::StepFrameL()</apiname></xref> method and is only available when playback is paused. </p> <p> <b>Note:</b> This functionality is dependent on the capabilities of the underlying play-controller implementation and the characteristics of the video clip. </p> </section> <section><title>Using Frame Step </title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-BE65641A-E30E-5C22-8C20-4642A385992E"><p><xref href="GUID-469377FB-AAE8-5245-A8E1-469C65AFE5C5.dita#GUID-469377FB-AAE8-5245-A8E1-469C65AFE5C5/GUID-F212F1A1-0ABA-599D-AC32-89D396BB6AD0">Step Frames Forward and Backward </xref>  </p> </li> </ul> <p id="GUID-F212F1A1-0ABA-599D-AC32-89D396BB6AD0"><b>Basic Procedure</b> </p> <p>The high level steps to step frames forward and backward are shown here: </p> <ol id="GUID-910FA4E1-4DE2-5D17-BDC3-F6FD2CBE0707"><li id="GUID-D1A02942-66BB-5EB5-A6F6-29B75CC81C06"><p>Create a new video player utility object. </p> </li> <li id="GUID-0ED6D9F6-A985-5968-82F8-F7E551531201"><p>Open a video clip to play. </p> </li> <li id="GUID-6D417E89-E0EE-575B-A36D-B1A838283558"><p>Use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-45F4B0E5-2EF4-3391-A925-DD31C9E997F6"><apiname>CVideoPlayerUtility::GetPlayRateCapabilitiesL()</apiname></xref> to check frame step is supported. This returns <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref> if frame step is not supported. </p> </li> <li id="GUID-42F37141-25D8-5D62-80BE-0D5D4DD61834"><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-1A6B9052-812F-528E-8D76-16049EBD0591"><p>Call <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-A9DCC4EB-B4B3-3AF4-B78C-DC3531A32DCC"><apiname>CVideoPlayerUtility::Play()</apiname></xref> to start playback. </p> </li> <li id="GUID-4D3D4426-EDB4-5F1F-A6C3-1657E1F7562E"><p>Pause playback using <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-CCF5BF0E-BD93-34AC-812E-443ECD07FE26"><apiname>CVideoPlayerUtility::PauseL()</apiname></xref>. </p> </li> <li id="GUID-6C90DF54-997B-5D82-BD9C-94546975883A"><p>To step forward through the video frames use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-6AA8FCCE-63B1-3EF9-8A41-7A3F1DE28E76"><apiname>CVideoPlayerUtility::StepFrameL()</apiname></xref> and set <xref href="GUID-D39C892F-581C-3A1F-9686-4B48512C6882.dita"><apiname>aStep</apiname></xref> to a positive <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> value. </p> </li> <li id="GUID-F2AA5F17-0657-5C9C-B7E7-C1A6CEC8156E"><p>To step backward through the video frames use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-6AA8FCCE-63B1-3EF9-8A41-7A3F1DE28E76"><apiname>CVideoPlayerUtility::StepFrameL()</apiname></xref> and set <xref href="GUID-D39C892F-581C-3A1F-9686-4B48512C6882.dita"><apiname>aStep</apiname></xref> to a negative <xref href="GUID-7A2A43EC-6125-3BFE-834B-23C37F7B40D5.dita"><apiname>TInt</apiname></xref> value. </p> </li> <li id="GUID-36FD8645-3000-5E92-B316-B8462FD0B53D"><p>Call <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-C103A911-AF93-3350-B731-C186A279F1DC"><apiname>CVideoPlayerUtility::Stop()</apiname></xref> to halt video playback. </p> </li> </ol> <p><b>Example</b> </p> <codeblock id="GUID-6EA0ADC4-A004-58BF-A9F6-2906E7663307" 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
// Call Prepare()
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
// Call Play()
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
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
iVideoPlayer-&gt;GetPlayRateCapabilitiesL(iVideoPlayRateCapabilities);
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
    18
// Return the current playback rate capabilities
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
    19
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
    20
// Check that engine has forward capability.
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
    21
if( iVideoPlayRateCapabilities.iStepForward)
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
    22
{
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
    23
iVideoPlayer-&gt;StepFrameL(10); // Steps to 10th frame from current.
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
    24
}
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
    25
else
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
    26
{
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
    27
// Forward is not supported.
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
    28
}
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
    29
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
    30
// If user wants to rewind. Check that engine has rewind capability.
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
    31
if( iVideoPlayRateCapabilities.iStepBackward)
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
    32
{
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
    33
iVideoPlayer-&gt;StepFrameL(-5); // Steps to 5th frame backward.
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
    34
}
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
    35
else
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
    36
{
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
    37
// Rewind is not supported.
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
    38
}
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
    39
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
    40
// Call Stop() </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-FE7DE542-3FD4-56D2-B281-C670EF1C4FEB.dita">Scaling Automatically</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-F13C7D36-E4AB-57F1-87A1-EB83AA2258DF.dita">Controlling the Video Controller Plugin</xref>  </p> </section> </conbody></concept>