Symbian3/SDK/Source/GUID-733B9695-0C7C-5637-9025-6CE3BAA1A23E.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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-733B9695-0C7C-5637-9025-6CE3BAA1A23E"><title>Enabling/Disabling Audio or Video Playback Separately</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to enable/disable audio or video playback. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to enable/disable audio or video playback separately in a video clip. </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 enable/disable the audio and video separately when playing video clips. This means you can: </p> <ul><li id="GUID-7C82E83E-F21D-527D-8EDE-C6D6BD6A4C95"><p>Watch a video clip without the audio track. </p> </li> <li id="GUID-C17844DE-4DA8-5429-8F8C-C1975CB38D39"><p>Listen only to the audio track of a video clip. </p> </li> </ul> <p> <b>Note:</b> By default, audio and video are enabled. </p> <p>This functionality is made available through the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-1A1F7E42-B4A9-3ECC-9E3B-116B9C1A2957"><apiname>CVideoPlayerUtility::SetAudioEnabledL()</apiname></xref> and <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-B32A7F90-CF94-3FD0-AA88-5637B53EE963"><apiname>CVideoPlayerUtility::SetVideoEnabledL()</apiname></xref> methods. </p> </section> <section><title>Using Audio and Video Playback </title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-F46D4C0E-AD97-5422-90B2-6E3DCAECF878"><p><xref href="GUID-733B9695-0C7C-5637-9025-6CE3BAA1A23E.dita#GUID-733B9695-0C7C-5637-9025-6CE3BAA1A23E/GUID-46521E47-DD9F-55BD-8514-71EB1673D649">Enable/Disable Audio or Video Playback</xref>  </p> </li> </ul> <p id="GUID-46521E47-DD9F-55BD-8514-71EB1673D649"><b>Basic Procedure</b> </p> <p>The high level steps to enable/disable audio or video playback are shown here: </p> <ol id="GUID-9842E64F-5744-51B9-8F10-C6FEA866989B"><li id="GUID-8D9334A5-03D3-5459-A5B4-0C5521DEBB53"><p>Create a new video player utility object. </p> </li> <li id="GUID-95541FE8-E715-55F8-8079-E31D6D3B2B35"><p>Open a video clip to play. </p> </li> <li id="GUID-38E3FF92-B861-55A5-8CCC-A83D6C8293F7"><p>Enable/disable audio playback using the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-1A1F7E42-B4A9-3ECC-9E3B-116B9C1A2957"><apiname>CVideoPlayerUtility::SetAudioEnabledL()</apiname></xref> method: </p> <ul><li id="GUID-29F9045A-9F33-5AC2-91FB-A71AF118CBA1"><p>To enable audio playback set the <xref href="GUID-ADFB0F12-0F07-34EF-BB0A-97B320E88FA2.dita"><apiname>aAudioEnabled</apiname></xref> parameter to <codeph>ETrue</codeph>. </p> </li> <li id="GUID-2A6F6425-DD6F-5C15-93C9-7059BDAF095D"><p>To disable audio playback set the <xref href="GUID-ADFB0F12-0F07-34EF-BB0A-97B320E88FA2.dita"><apiname>aAudioEnabled</apiname></xref> parameter to <codeph>EFalse</codeph>. </p> </li> </ul> </li> <li id="GUID-5C780C81-D62D-512E-AAFB-EC022468368C"><p>Enable/disable video playback using the <xref href="GUID-0F1F8AC6-B99F-3274-A785-9977197AF762.dita#GUID-0F1F8AC6-B99F-3274-A785-9977197AF762/GUID-B32A7F90-CF94-3FD0-AA88-5637B53EE963"><apiname>CVideoPlayerUtility::SetVideoEnabledL()</apiname></xref> method: </p> <ul><li id="GUID-A5EAF9EA-6231-5FE7-984D-5FFF50515FCC"><p>To enable video playback set the <xref href="GUID-3329785F-DE09-3E93-A814-E7D18FBA60FB.dita"><apiname>aVideoEnabled</apiname></xref> parameter to <codeph>ETrue</codeph>. </p> </li> <li id="GUID-DA7ABC77-AA3C-59F4-A006-40DD76A82BF8"><p>To disable video playback set the <xref href="GUID-3329785F-DE09-3E93-A814-E7D18FBA60FB.dita"><apiname>aVideoEnabled</apiname></xref> parameter to <codeph>EFalse</codeph>. </p> </li> </ul> </li> <li id="GUID-A9DFDB4A-CA82-5DCB-A864-ACA048E7AA9F"><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-4A6D8B95-40DA-5AFC-9F3D-8751BC3F8876"><p>Control playback normally. </p> </li> </ol> <p><b>Example</b> </p> <codeblock id="GUID-363701E5-726D-5F05-B9DC-424778A0AF80" xml:space="preserve">//Create new video player utility object (iVideoPlayer) 
// Open the video clip

iVideoPlayer-&gt;SetAudioEnabledL(EFalse); // disable audio playback

iVideoVideoPlayer-&gt;SetVideoEnabledL(ETrue); // enable video playback

// Audio has been disabled
// Playback will be video only
// Call Prepare() and then Play() to control 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-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-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>