Symbian3/SDK/Source/GUID-AB9A3EA2-2B99-4502-A161-8EE5BF477D41.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-AB9A3EA2-2B99-4502-A161-8EE5BF477D41" xml:lang="en"><title>Capturing
       
    13 a video clip</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>To record video data to a file, descriptor, or an URL, use the video
       
    15 recorder utility of the Multimedia Framework (MMF) to develop your application.
       
    16 To make use of the onboard camera to capture a video clip, the application
       
    17 needs to repeat the steps described in the illustration below.</p>
       
    18 <fig id="GUID-FEDF24E9-1171-4814-B3C9-21B4E37003BB"><title>The steps required to capture a video clip</title><image href="GUID-141D8786-9987-4E5E-9395-484C87B323FB_d0e267376_href.png"/></fig>
       
    19 <p>Important implementation considerations include:</p>
       
    20 <ul>
       
    21 <li><p>To open a file for recording the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html" format="application/java-archive"><codeph>CVideoRecorderUtility</codeph></xref> class requires the MMF Controller Framework API to specify controller and
       
    22 format UIDs.</p></li>
       
    23 <li><p>If you need to use the display of the device as a viewfinder
       
    24 for your video application, request viewfinder frames using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Camera_Framework/CCameraClass.html" format="application/java-archive"><codeph>CCamera</codeph></xref> class, and draw them yourself. For more information, see step
       
    25 3 in <xref href="GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE.dita#GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE/GUID-A7ED7A90-1432-4905-A0A5-0CC725997127"/>.</p>
       
    26 </li>
       
    27 <li><p>The settings you can use in your application depend on what
       
    28 the camera hardware on the device supports.</p></li>
       
    29 </ul>
       
    30 <section><title>To capture a video clip</title>
       
    31 <p>Use the methods of the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html" format="application/java-archive"><codeph>CVideoRecorderUtility</codeph></xref> class to construct your application.</p>
       
    32 <ol>
       
    33 <li id="GUID-77A80BE7-A452-42C4-A815-712402597071"><p>Initialize
       
    34 the video recorder.</p>
       
    35 <ul>
       
    36 <li><p>Create a video recorder object using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aNewL%28MVideoRecorderUtilityObserver%20%26amp%3b%2cTInt%2cTMdaPriorityPreference%29" format="application/java-archive"><codeph>CVideoRecorderUtility::NewL</codeph></xref> method.</p>
       
    37 </li>
       
    38 <li><p>Resolve the supported video format and retrieve a list of
       
    39 controllers using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CMMFControllerPluginSelectionParametersClass.html" format="application/java-archive"><codeph>CMMFControllerPluginSelectionParameters</codeph></xref> and <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CMMFFormatSelectionParametersClass.html" format="application/java-archive"><codeph>CMMFFormatSelectionParameters</codeph></xref> classes, and the respective type definitions <codeph>RMMFControllerImplInfoArray</codeph> and <codeph>RMMFFormatImplInfoArray</codeph>. </p></li>
       
    40 <li><p>Open a file, descriptor or an URL to store the video clip
       
    41 in using the respective <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aOpenFileL%28const%20TDesC%20%26amp%3b%2cTInt%2cTUid%2cTUid%2cconst%20TDesC8%20%26amp%3b%2cTFourCC%29" format="application/java-archive"><codeph>CVideoRecorderUtility::OpenFileL</codeph></xref>, <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aOpenDesL%28TDes8%20%26amp%3b%2cTInt%2cTUid%2cTUid%2cconst%20TDesC8%20%26amp%3b%2cTFourCC%29" format="application/java-archive"><codeph>CVideoRecorderUtility::OpenDesL</codeph></xref>, or <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aOpenUrlL%28const%20TDesC%20%26amp%3b%2cTInt%2cTInt%2cTUid%2cTUid%2cconst%20TDesC8%20%26amp%3b%2cTFourCC%29" format="application/java-archive"><codeph>CVideoRecorderUtility::OpenUrlL</codeph></xref> method.</p>
       
    42 </li>
       
    43 <li><p>Set the maximum video clip size using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aSetMaxClipSizeL%28TInt%29" format="application/java-archive"><codeph>CVideoRecorderUtility::SetMaxClipSizeL()</codeph></xref> method.</p>
       
    44 </li>
       
    45 <li><p>Prepare the record controller using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aPrepare%28%29" format="application/java-archive"><codeph>CVideoRecorderUtility::Prepare()</codeph></xref> method. <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/MVideoRecorderUtilityObserverClass.html#%3a%3aMVideoRecorderUtilityObserver%3a%3aMvruoPrepareComplete%28TInt%29" format="application/java-archive"><codeph>MVideoRecorderUtilityObserver::MvruoPrepareComplete</codeph></xref> is
       
    46 called upon completion.</p></li>
       
    47 </ul>
       
    48 </li>
       
    49 <li id="GUID-8A46469A-E0BE-4789-ADEE-C900FF7CB331"><p>Configure
       
    50 the audio and video settings.</p><p>You can check and set, for example,
       
    51 the recording priority, audio track, video frame size and frame rate, audio
       
    52 and video codecs and bit rates, and recording gain of the video clip. For
       
    53 more information on the options, see the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html" format="application/java-archive"><codeph>CVideoRecorderUtility</codeph></xref> class.</p></li>
       
    54 <li id="GUID-CB57B0CC-14AD-464F-82FF-9D80CD369CD5"><p>Capture the
       
    55 video clip.</p>
       
    56 <ul>
       
    57 <li><p>Start recording a video using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aRecord%28%29" format="application/java-archive"><codeph>CVideoRecorderUtility::Record()</codeph></xref> method.</p></li>
       
    58 <li><p>Pause recording using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aPauseL%28%29" format="application/java-archive"><codeph>CVideoRecorderUtility::PauseL()</codeph></xref> method.</p></li>
       
    59 <li><p>Stop recording using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aStop%28%29" format="application/java-archive"><codeph>CVideoRecorderUtility::Stop()</codeph></xref> method.</p></li>
       
    60 </ul>
       
    61 </li>
       
    62 <li id="GUID-6CB8476D-CC81-4776-B42F-F6AF3EDEBE76"><p>To exit the
       
    63 application or to switch it to the background, close audio and video controllers
       
    64 using the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Multimedia_Framework/CVideoRecorderUtilityClass.html#%3a%3aCVideoRecorderUtility%3a%3aClose%28%29" format="application/java-archive"><codeph>CVideoRecorderUtility::Close()</codeph></xref> method.</p>
       
    65 </li>
       
    66 <li id="GUID-1E55A71D-1A7F-4734-9DC5-713DA776F3C6"><p>Include <codeph>VideoRecorder.h</codeph> and <codeph>mmfcontrollerpluginresolver.h</codeph> header files in the appropriate class files.</p></li>
       
    67 <li id="GUID-CA9BF127-499A-4EFE-9E63-74032194200F"><p>Make sure
       
    68 you have correct <xref href="GUID-6971B0A2-F79B-4E05-8AF3-BB1FC1932A22.dita">capabilities</xref> information
       
    69 set for your application. You need at least the <codeph>UserEnvironment</codeph> capability.
       
    70 If you want to set the recording priority for the video and audio device,
       
    71 you need the <codeph>MultimediaDD</codeph> capability.</p></li>
       
    72 <li id="GUID-78DDD170-958F-4FD2-87ED-A550CCB4D7E3"><p>Make sure <codeph>mediaclientvideo.lib</codeph> and <codeph>mmfcontrollerframework.lib</codeph> are accessible to your linker when compiling your application by including
       
    73 it in your <codeph>mmp</codeph> file or by editing the project properties
       
    74 in your IDE, depending on your build environment.</p></li>
       
    75 </ol>
       
    76 </section>
       
    77 <section><title>Additional information on capturing a video</title>
       
    78 <p>For a reference example, see the <xref href="http://www.forum.nokia.com/info/sw.nokia.com/id/48d38e98-2b78-4da8-b111-63e9c7d34feb/S60_Platform_Video_Example_v2_0_en.zip.html" scope="external">S60 Platform Video Example v2.0</xref> on Forum Nokia.</p>
       
    79 <p>For more information on <codeph>CVideoRecorderUtility</codeph>, see <xref href="http://developer.symbian.com/main/documentation/books/books_files/quick/multimedia_recipes.pdf?strScope=website&amp;searchString=CVideoPlayerUtility" scope="external">Multimedia recipes</xref> in the Symbian Developer Network.</p>
       
    80 <p>For more information on <codeph>CVideoRecorderUtility</codeph> see the <xref href="GUID-18D7228F-A1E5-594A-B654-EF5D74CE17D2.dita">Recording Video Data</xref> tutorial
       
    81 in the Video Client library.</p>
       
    82 </section>
       
    83 </conbody></concept>