Symbian3/PDK/Source/GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
--- a/Symbian3/PDK/Source/GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita	Tue Mar 30 11:42:04 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita	Tue Mar 30 11:56:28 2010 +0100
@@ -1,40 +1,40 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
-<!-- This component and the accompanying materials are made available under the terms of the License 
-"Eclipse Public License v1.0" which accompanies this distribution, 
-and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
-<!-- Initial Contributors:
-    Nokia Corporation - initial contribution.
-Contributors: 
--->
-<!DOCTYPE concept
-  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
-<concept xml:lang="en" id="GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2"><title>Fast Forwarding and Rewinding</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to fast forward and rewind video clips. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to fast forward and rewind video clips during playback. </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>You can view a video clip in fast forward, rewind and slow-motion playback. This is achieved by setting the playback velocity to a value higher or lower than normal playback speed. The default playback velocity is 100. Values above 100 and below 0 correspond to fast forward and rewind respectively, while values 1 to 99 represent slow-motioned playback. </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 Playback Velocity </title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-FB5CC1B8-9BE8-5382-81C7-49D9269B7DEB"><p><xref href="GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita#GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2/GUID-744097F7-7679-5309-98BC-C1FB6442B43B">Fast Forward and Rewind a Video Clip</xref>  </p> </li> </ul> <p id="GUID-744097F7-7679-5309-98BC-C1FB6442B43B"><b>Basic Procedure</b> </p> <p>The high level steps to fast forward and rewind a video clip are shown here: </p> <ol id="GUID-41F59ED3-3585-5688-AB8F-360C59508B27"><li id="GUID-9B1EC0AC-441D-5DF1-8E7D-BF6F79DBE8B7"><p>Create a new video player utility object. </p> </li> <li id="GUID-94EBEFAD-7C5E-5214-B7C9-A4E60D97CC73"><p>Open a video clip to play. </p> </li> <li id="GUID-BD33FE51-7723-5D3D-A2B4-79FEBA6CEDE8"><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 the current forward and rewind capabilities. </p> </li> <li id="GUID-56D7CAB6-207C-56D0-B846-F0F0BBEDAF23"><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-B2D54F6F-7BB9-5207-BB02-AAB67941B1BD"><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-7DB0514F-3C2F-5308-8206-E0A7EFF81EDE"><p>The default playback velocity is 100. To fast forward use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-7C05E56D-325D-38F0-831D-54F36DB0DDD7"><apiname>CVideoPlayerUtility::SetPlayVelocityL()</apiname></xref> and set <xref href="GUID-5D9F4230-0A5A-3C31-90EB-D404B020F37D.dita"><apiname>aVelocity</apiname></xref> to a value greater than 100. Velocity set in this call takes effect immediately. </p> </li> <li id="GUID-9E493165-5695-50C7-B559-55478092E079"><p>To rewind use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-7C05E56D-325D-38F0-831D-54F36DB0DDD7"><apiname>CVideoPlayerUtility::SetPlayVelocityL()</apiname></xref> and set <xref href="GUID-5D9F4230-0A5A-3C31-90EB-D404B020F37D.dita"><apiname>aVelocity</apiname></xref> to a value less than 0. Velocity set in this call takes effect immediately. </p> </li> <li id="GUID-069D1596-B643-52D8-9A37-ADB1A59E3CEA"><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-0666098F-F44F-5BF4-805F-251F79D2268C" xml:space="preserve">// Create new video player utility object (iVideoPlayer)
-// Open the video clip
-// Call Prepare()
-// Call Play()
-
-iVideoPlayer-&gt;GetPlayRateCapabilitiesL(iVideoPlayRateCapabilities);
-// Return the current playback rate capabilities
-
-//Check that engine has forward capability.
-if( iVideoPlayRateCapabilities.iPlayForward)
-{
-iVideoPlayer-&gt;SetPlayVelocityL(200); // fast forward
-}
-else
-{
-// Forward is not supported.
-}
-
-// If user wants to rewind. Check that engine has rewind capability.
-if( iVideoPlayRateCapabilities.iPlayBackward)
-{
-iVideoPlayer-&gt;SetPlayVelocityL(-200); // rewind
-}
-else
-{
-// Rewind is not supported.
-}
-
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept xml:lang="en" id="GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2"><title>Fast Forwarding and Rewinding</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to fast forward and rewind video clips. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to fast forward and rewind video clips during playback. </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>You can view a video clip in fast forward, rewind and slow-motion playback. This is achieved by setting the playback velocity to a value higher or lower than normal playback speed. The default playback velocity is 100. Values above 100 and below 0 correspond to fast forward and rewind respectively, while values 1 to 99 represent slow-motioned playback. </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 Playback Velocity </title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-FB5CC1B8-9BE8-5382-81C7-49D9269B7DEB"><p><xref href="GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2.dita#GUID-70B3881F-9532-5F1D-B210-99A15DB93FC2/GUID-744097F7-7679-5309-98BC-C1FB6442B43B">Fast Forward and Rewind a Video Clip</xref>  </p> </li> </ul> <p id="GUID-744097F7-7679-5309-98BC-C1FB6442B43B"><b>Basic Procedure</b> </p> <p>The high level steps to fast forward and rewind a video clip are shown here: </p> <ol id="GUID-41F59ED3-3585-5688-AB8F-360C59508B27"><li id="GUID-9B1EC0AC-441D-5DF1-8E7D-BF6F79DBE8B7"><p>Create a new video player utility object. </p> </li> <li id="GUID-94EBEFAD-7C5E-5214-B7C9-A4E60D97CC73"><p>Open a video clip to play. </p> </li> <li id="GUID-BD33FE51-7723-5D3D-A2B4-79FEBA6CEDE8"><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 the current forward and rewind capabilities. </p> </li> <li id="GUID-56D7CAB6-207C-56D0-B846-F0F0BBEDAF23"><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-B2D54F6F-7BB9-5207-BB02-AAB67941B1BD"><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-7DB0514F-3C2F-5308-8206-E0A7EFF81EDE"><p>The default playback velocity is 100. To fast forward use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-7C05E56D-325D-38F0-831D-54F36DB0DDD7"><apiname>CVideoPlayerUtility::SetPlayVelocityL()</apiname></xref> and set <xref href="GUID-5D9F4230-0A5A-3C31-90EB-D404B020F37D.dita"><apiname>aVelocity</apiname></xref> to a value greater than 100. Velocity set in this call takes effect immediately. </p> </li> <li id="GUID-9E493165-5695-50C7-B559-55478092E079"><p>To rewind use <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-7C05E56D-325D-38F0-831D-54F36DB0DDD7"><apiname>CVideoPlayerUtility::SetPlayVelocityL()</apiname></xref> and set <xref href="GUID-5D9F4230-0A5A-3C31-90EB-D404B020F37D.dita"><apiname>aVelocity</apiname></xref> to a value less than 0. Velocity set in this call takes effect immediately. </p> </li> <li id="GUID-069D1596-B643-52D8-9A37-ADB1A59E3CEA"><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-0666098F-F44F-5BF4-805F-251F79D2268C" xml:space="preserve">// Create new video player utility object (iVideoPlayer)
+// Open the video clip
+// Call Prepare()
+// Call Play()
+
+iVideoPlayer-&gt;GetPlayRateCapabilitiesL(iVideoPlayRateCapabilities);
+// Return the current playback rate capabilities
+
+//Check that engine has forward capability.
+if( iVideoPlayRateCapabilities.iPlayForward)
+{
+iVideoPlayer-&gt;SetPlayVelocityL(200); // fast forward
+}
+else
+{
+// Forward is not supported.
+}
+
+// If user wants to rewind. Check that engine has rewind capability.
+if( iVideoPlayRateCapabilities.iPlayBackward)
+{
+iVideoPlayer-&gt;SetPlayVelocityL(-200); // rewind
+}
+else
+{
+// Rewind is not supported.
+}
+
 // 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-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>
\ No newline at end of file