Symbian3/SDK/Source/GUID-AB9A3EA2-2B99-4502-A161-8EE5BF477D41.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     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_d0e294116_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 id="GUID-0C91A376-92FB-4C5F-8DCF-68A24D01CB9C"><title>To capture a
       
    31 video clip</title>
       
    32 <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>
       
    33 <ol>
       
    34 <li id="GUID-77A80BE7-A452-42C4-A815-712402597071"><p>Initialize
       
    35 the video recorder.</p>
       
    36 <ul>
       
    37 <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>
       
    38 </li>
       
    39 <li><p>Resolve the supported video format and retrieve a list of
       
    40 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>
       
    41 <li><p>Open a file, descriptor or an URL to store the video clip
       
    42 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>
       
    43 </li>
       
    44 <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>
       
    45 </li>
       
    46 <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
       
    47 called upon completion.</p></li>
       
    48 </ul>
       
    49 </li>
       
    50 <li id="GUID-8A46469A-E0BE-4789-ADEE-C900FF7CB331"><p>Configure
       
    51 the audio and video settings.</p><p>You can check and set, for example,
       
    52 the recording priority, audio track, video frame size and frame rate, audio
       
    53 and video codecs and bit rates, and recording gain of the video clip. For
       
    54 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>
       
    55 <li id="GUID-CB57B0CC-14AD-464F-82FF-9D80CD369CD5"><p>Capture the
       
    56 video clip.</p>
       
    57 <ul>
       
    58 <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>
       
    59 <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>
       
    60 <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>
       
    61 </ul>
       
    62 </li>
       
    63 <li id="GUID-6CB8476D-CC81-4776-B42F-F6AF3EDEBE76"><p>To exit the
       
    64 application or to switch it to the background, close audio and video controllers
       
    65 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>
       
    66 </li>
       
    67 <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>
       
    68 <li id="GUID-CA9BF127-499A-4EFE-9E63-74032194200F"><p>Make sure
       
    69 you have correct <xref href="GUID-6971B0A2-F79B-4E05-8AF3-BB1FC1932A22.dita">capabilities</xref> information
       
    70 set for your application. You need at least the <codeph>UserEnvironment</codeph> capability.
       
    71 If you want to set the recording priority for the video and audio device,
       
    72 you need the <codeph>MultimediaDD</codeph> capability.</p></li>
       
    73 <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
       
    74 it in your <codeph>mmp</codeph> file or by editing the project properties
       
    75 in your IDE, depending on your build environment.</p></li>
       
    76 </ol>
       
    77 </section>
       
    78 <section id="GUID-AA5B55BE-12E2-4CDF-9FA6-717669E07095"><title>Additional information
       
    79 on capturing a video</title>
       
    80 <p>For a reference example, see the <xref href="GUID-55BF8452-F9FF-5CF3-9D74-3BC7F5447551-GENID-1-8-1-18-1-1-4-1-5-1.dita">Camera
       
    81 Example: Capturing and controlling the images using Camera</xref>.</p>
       
    82 <p>For more information on <codeph>CVideoRecorderUtility</codeph>, see <xref href="http://developer.symbian.org/wiki/index.php/File:Quick_Recipes_Symbian_multimedia_recipes.pdf" scope="external">Multimedia
       
    83 recipes</xref> at the Symbian Foundation.</p>
       
    84 <p>For more information on <codeph>CVideoRecorderUtility</codeph> see the <xref href="GUID-18D7228F-A1E5-594A-B654-EF5D74CE17D2.dita">Recording Video Data</xref> tutorial
       
    85 in the Video Client library.</p>
       
    86 </section>
       
    87 </conbody></concept>