Symbian3/SDK/Source/GUID-B340078C-9EFC-4017-8F43-B0BBCE4935DC.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 9 59758314f811
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-B340078C-9EFC-4017-8F43-B0BBCE4935DC" xml:lang="en"><title>Playing
       
    13 a video clip</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>To open, play and retrieve information about video data stored in a
       
    15 file, descriptor, or URL, use the video player utility of the Multimedia Framework
       
    16 to develop your application. To play a video clip, the application needs to
       
    17 repeat the steps described in the illustration below.</p>
       
    18 <fig id="GUID-FC95D96A-BD76-4296-AAA0-832206A27B73"><title>The steps required to play a video clip</title><image href="GUID-9770F3B4-998D-474F-9A82-1B134A4C2869_d0e294365_href.png"/></fig>
       
    19 <p>To play a video clip, use the methods of the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html" format="application/java-archive"><codeph>CVideoPlayerUtility</codeph></xref> class
       
    20 to construct your application.</p>
       
    21 <section id="GUID-73B92565-802E-400E-B991-5A1F19B25EBA"><title>To play a video</title>
       
    22 <ol>
       
    23 <li id="GUID-6BBE2F20-3EF8-4397-B36B-7F8AE0411650"><p>Create a video
       
    24 player object, open a video clip and prepare it to be played.</p>
       
    25 <ul>
       
    26 <li><p>Create a player object using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aNewL%28MVideoPlayerUtilityObserver%20%26amp%3b%2cTInt%2cTMdaPriorityPreference%2cRWsSession%20%26amp%3b%2cCWsScreenDevice%20%26amp%3b%2cRWindowBase%20%26amp%3b%2cconst%20TRect%20%26amp%3b%2cconst%20TRect%20%26amp%3b%29" format="application/java-archive"><codeph>CVideoPlayerUtility::NewL()</codeph></xref> method.</p>
       
    27 </li>
       
    28 <li><p>Open a video clip from a file, descriptor using the respective <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aOpenFileL%28const%20TDesC%20%26amp%3b%2cTUid%29" format="application/java-archive"><codeph>CVideoPlayerUtility::OpenFileL()</codeph></xref> or <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aOpenDesL%28const%20TDesC8%20%26amp%3b%2cTUid%29" format="application/java-archive"><codeph>CVideoPlayerUtility::OpenDesL()</codeph></xref>. <xref href="GUID-795ED4C0-7C82-41DE-AD5B-AC69A426E2A5.dita">Streamed
       
    29 content</xref> can be opened with <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aOpenUrlL%28const%20TDesC%20%26amp%3b%2cTInt%2cconst%20TDesC8%20%26amp%3b%2cTUid%29" format="application/java-archive"><codeph>CVideoPlayerUtility::OpenUrlL()</codeph></xref>. <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/MVideoPlayerUtilityObserverClass.html#%3a%3aMVideoPlayerUtilityObserver%3a%3aMvpuoOpenComplete%28TInt%29" format="application/java-archive"><codeph>MVideoPlayerUtilityObserver::MvpuoOpenComplete()</codeph></xref> is
       
    30 called upon completion.</p></li>
       
    31 <li><p>Prepare the video clip to be read using <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aPrepare%28%29" format="application/java-archive"><codeph>CVideoPlayerUtility::Prepare()</codeph></xref>. <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/MVideoPlayerUtilityObserverClass.html#%3a%3aMVideoPlayerUtilityObserver%3a%3aMvpuoPrepareComplete%28TInt%29" format="application/java-archive"><codeph>MVideoPlayerUtilityObserver::MvpuoPrepareComplete()</codeph></xref> is
       
    32 called upon completion.</p></li>
       
    33 </ul>
       
    34 </li>
       
    35 <li id="GUID-3582516A-2E58-4024-BC82-86E79DF253CF"><p>Configure
       
    36 the player settings.</p><p>You can check and set, for example, the playback
       
    37 priority, display window, audio track, video frame size and frame rate, audio
       
    38 and video codecs and bitrates, and the MIME type of the video clip. For more
       
    39 information on the options, see the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html" format="application/java-archive"><codeph>CVideoPlayerUtility</codeph></xref> class.</p>
       
    40 </li>
       
    41 <li id="GUID-FF788EF1-6991-48CE-A43D-50E5F98856BD"><p>Play the video
       
    42 clip.</p>
       
    43 <ul>
       
    44 <li><p>Start the playback of a video clip using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aPlay%28%29" format="application/java-archive"><codeph>CVideoPlayerUtility::Play()</codeph></xref> method.</p>
       
    45 </li>
       
    46 <li><p>Pause playback using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aPauseL%28%29" format="application/java-archive"><codeph>CVideoPlayerUtility::PauseL()</codeph></xref> method. Resume playback
       
    47 by calling <codeph>CVideoPlayerUtility::Play()</codeph> again.</p></li>
       
    48 <li><p>Stop playback using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aStop%28%29" format="application/java-archive"><codeph>CVideoPlayerUtility::Stop()</codeph></xref> method. If the playback
       
    49 is not explicitly stopped, <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/MVideoPlayerUtilityObserverClass.html" format="application/java-archive"><codeph>MVideoPlayerUtilityObserver::MvpuoPlayComplete()</codeph></xref> is called upon completion.</p></li>
       
    50 </ul>
       
    51 </li>
       
    52 <li id="GUID-C517833F-4A5C-438B-BFAD-05691C805A6F"><p>To exit the
       
    53 application or to switch it to the background, close the video clip and unload
       
    54 all controllers using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoPlayerUtilityClass.html#%3a%3aCVideoPlayerUtility%3a%3aClose%28%29" format="application/java-archive"><codeph>CVideoPlayerUtility::Close()</codeph></xref> method.</p></li>
       
    55 <li id="GUID-EDF371B0-40E6-4FE4-AB3B-6E7E7615D888"><p>Include the <codeph>VideoPlayer.h</codeph> header
       
    56 file in the appropriate class file(s).</p></li>
       
    57 <li id="GUID-F9642238-8046-476A-89C1-78092B67800F"><p>Make sure
       
    58 you have correct <xref href="GUID-6971B0A2-F79B-4E05-8AF3-BB1FC1932A22.dita">capabilities</xref> information
       
    59 set for your application. You need at least the <codeph>UserEnvironment</codeph> capability.
       
    60 If you want to set the recording priority for the video/audio device, you
       
    61 need the <codeph>MultimediaDD</codeph> capability.</p></li>
       
    62 <li id="GUID-7E812E69-C12E-43A5-809F-4A47104F7822"><p>Make sure <codeph>mediaclientvideo.lib</codeph> is
       
    63 accessible to your linker when compiling your application by including it
       
    64 in your <codeph>mmp</codeph> file or by editing the project properties in
       
    65 your IDE, depending on your build environment.</p></li>
       
    66 </ol>
       
    67 </section>
       
    68 <section id="GUID-756A176D-33D2-4A7E-A93A-9874B837BE8C"><title>Additional information
       
    69 on playing a video clip</title>
       
    70 <p>For code examples, see <xref href="http://wiki.forum.nokia.com/index.php/How_to_play_a_video_file_using_CVideoPlayerUtility" scope="external">How
       
    71 to play a video using CVideoPlayerUtility</xref> on Forum Nokia Developer
       
    72 Community Wiki.</p>
       
    73 <p>For more information on <codeph>CVideoPlayerUtility</codeph>, see <xref href="http://developer.symbian.org/wiki/index.php/File:Quick_Recipes_Symbian_multimedia_recipes.pdf" scope="external">Multimedia
       
    74 recipes</xref> at the Symbian Foundation.</p>
       
    75 <p>For information on the codecs needed to play a video clip, see <xref href="GUID-536DCEAF-3598-4D3E-A812-E266720F350D.dita">Supported codecs</xref>.</p>
       
    76 <p>For more information about <codeph>CVideoPlayerUtility</codeph> in the
       
    77 Video Client library see following documents:</p>
       
    78 <ul>
       
    79 <li><p><xref href="GUID-172F46C1-6066-57FA-A815-5AC23ACE159D.dita">Creating
       
    80 and Preparing a Video Player</xref></p></li>
       
    81 <li><p><xref href="GUID-F9896E96-1076-552D-AE54-8F9DABED867F.dita">Configuring
       
    82 the Video Player</xref></p></li>
       
    83 <li><p><xref href="GUID-5F4510C9-5B16-593A-A225-37606800915B.dita">Controlling
       
    84 Video Playback</xref></p></li>
       
    85 <li><p><xref href="GUID-F13C7D36-E4AB-57F1-87A1-EB83AA2258DF.dita">Controlling
       
    86 the Video Controller Plugin</xref></p></li>
       
    87 </ul>
       
    88 </section>
       
    89 </conbody></concept>