Symbian3/SDK/Source/GUID-688C515E-3D1B-51BB-A776-A246FA232061.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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-688C515E-3D1B-51BB-A776-A246FA232061"><title>Creating and Preparing a Video Recorder</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to get started with the video recorder utility. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to create a new video recorder utility and prepare it for recording video data. </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>The video recorder utility is used to record video clips to files, descriptors or URLs and manipulate embedded meta data. This functionality is implemented by the <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita"><apiname>CVideoRecorderUtility</apiname></xref> class. </p> </section> <section><title>Using Video Recorder Utility</title> <p>The following tasks will be covered in this tutorial: </p> <ul><li id="GUID-21F91659-A12E-5420-B4C5-FBEEB1EEE73E"><p><xref href="GUID-F7598A84-9736-5310-AAA4-5BCC4BE46C16.dita#GUID-F7598A84-9736-5310-AAA4-5BCC4BE46C16/GUID-D9B54B5B-97EE-5DF4-90D5-FF25B4227771">Create a Utility Object </xref>  </p> </li> <li id="GUID-709899B2-A05C-51BA-B8D9-DEF90C6EF528"><p><xref href="GUID-BA2EEEC3-86AC-5B1C-81E2-CC571EB5AB3E.dita#GUID-BA2EEEC3-86AC-5B1C-81E2-CC571EB5AB3E/GUID-BAE58A16-943C-5C5F-B1ED-A70B04411005">Open a Recording Device</xref>  </p> </li> <li id="GUID-24782EE8-9C28-543D-9062-C4A697AAF6F6"><p><xref href="GUID-688C515E-3D1B-51BB-A776-A246FA232061.dita#GUID-688C515E-3D1B-51BB-A776-A246FA232061/GUID-29741489-459B-591F-B9E9-E0255A9AC584">Prepare to Record</xref>  </p> </li> </ul> <p id="GUID-D9B54B5B-97EE-5DF4-90D5-FF25B4227771"><b>Creating a Utility Object </b> </p> <p>The high level steps to create a video recorder utility object are shown here: </p> <ul><li id="GUID-4BBCB100-A806-59AA-B860-CE06075D9353"><p>You can create an object of this utility class using the <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita#GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D/GUID-6FF3F041-5566-352C-BF64-5094A462A056"><apiname>CVideoRecorderUtility::NewL</apiname></xref> function. Some video formats also allow storing of audio data. To facilitate this feature, the class contains audio functions that can manipulate audio data. </p> <codeblock id="GUID-7915F838-E4A6-5EF8-AD86-90A7EC507FFD" xml:space="preserve">void CRecordVideo::ConstructL()
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    13
    {
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    14
    iVideoRecordUtility = CVideoRecorderUtility::NewL(*this);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    15
    }</codeblock> </li> </ul> <p id="GUID-BAE58A16-943C-5C5F-B1ED-A70B04411005"><b>Opening a Recording Device</b> </p> <p>The high level steps to open a recording device are shown here: </p> <ol id="GUID-87D7D324-06CD-55DA-83D9-B433FD7E4C8A"><li id="GUID-133C072D-5E06-5CBE-B6A4-A64F40A579B4"><p>Certain parameters like, the handle to the camera, the controller UID, video format and the codecs to use for video and audio need to be specified for recording. This is shown in the range of open statements shown below based on where you want to save the video clip: </p> <ul><li id="GUID-4972A385-CA09-55B2-ABC2-0E17AFFF80CF"><p> <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita#GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D/GUID-085B4553-555A-35E9-8DE8-B93E615D6AF9"><apiname>CVideoRecorderUtility::OpenFileL</apiname></xref>: This function stores the recorded video clip in a file. </p> <codeblock id="GUID-66D747F9-F663-51C1-B557-D9F51709B3F3" xml:space="preserve">void OpenFileL(const TDesC&amp; aFileName, TInt aCameraHandle, TUid aControllerUid, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
TUid aVideoFormat, TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    17
</codeblock> <p> <b>Note:</b> There is also another method to save a video clip to a file. It is strongly recommended to use this method. </p> <codeblock id="GUID-826E2D41-D332-5FD2-93D3-6378F88B14AF" xml:space="preserve">OpenFileL(const TMMSource&amp; aSource, TUid aControllerUid);</codeblock> <p>Where <codeph>aSource</codeph> is a filename or an open handle to a file where the video clip has to be saved and <codeph>aControllerUid</codeph> is an optionally specified plugin. If specified, it will force the video player to use the controller with the given UID. If no controller plugin is specified, this function searches through a list of all available plugins and attempts to use each one until successful or the end of the list is reached. </p> </li> <li id="GUID-C6C3EA53-1B1F-593E-8053-522135DACB95"><p> <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita#GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D/GUID-9F820878-1396-3D88-A2A6-B99CCD5635AB"><apiname>CVideoRecorderUtility::OpenDesL</apiname></xref>: This function stores the recorded video clip in a descriptor. </p> <codeblock id="GUID-91CF22D9-CB48-587F-ACF5-A3A36B42BF16" xml:space="preserve">void OpenDesL(TDes8&amp; aDescriptor, TInt aCameraHandle, TUid aControllerUid, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    18
TUid aVideoFormat,TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    19
</codeblock> </li> <li id="GUID-CBF3B863-31C0-5107-BD68-B8458AB91A17"><p> <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita#GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D/GUID-F1A1728E-2ABD-31B2-B527-841EFA9A56A5"><apiname>CVideoRecorderUtility::OpenUrlL</apiname></xref>: This function stores the recorded video clip in a URL. </p> <codeblock id="GUID-F287F739-FBCB-53FB-95F6-B60FACCF5009" xml:space="preserve">void OpenUrlL(const TDesC&amp; aUrl, TInt aIapId = KUseDefaultIap, TInt aCameraHandle, TUid
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    20
 aControllerUid, TUid aVideoFormat, TFourCC aVideoType=KFourCCNULL, TFourCC aAudioType=KFourCCNULL);</codeblock> </li> </ul> </li> <li id="GUID-60970A2A-2D5A-5E1A-8E68-D49FBC826C55"><p>Once the opening of the recording device is complete, successfully or otherwise, the callback function <xref href="GUID-3DA683D9-644B-3629-901F-96F1B49EE0C7.dita#GUID-3DA683D9-644B-3629-901F-96F1B49EE0C7/GUID-ADDB899E-EC79-3214-96E7-52825247D420"><apiname>MVideoRecorderUtilityObserver::MvruoOpenComplete()</apiname></xref> is called. This notifies the client whether the video clip was successfully opened or not. </p> </li> </ol> <p id="GUID-29741489-459B-591F-B9E9-E0255A9AC584"><b>Preparing to Record</b> </p> <p>The high level steps to prepare to record video are shown here: </p> <ol id="GUID-6E3C8727-F1E0-5823-ADFB-308301B37C9D"><li id="GUID-FF6C37CA-A481-5338-B8DD-2D136183265D"><p>Once the camera is ready and the video clip is opened successfully, call the <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita#GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D/GUID-A8B11252-2852-36E4-BE16-BC05888F4ECF"><apiname>CVideoRecorderUtility::Prepare()</apiname></xref> function. This function prepares the record controller for use. </p> </li> <li id="GUID-BAD3C61D-9F02-5B6E-B3E0-6AC031B3B6BF"><p>When the preparation of the record controller is complete, successfully or otherwise, a callback function <xref href="GUID-3DA683D9-644B-3629-901F-96F1B49EE0C7.dita#GUID-3DA683D9-644B-3629-901F-96F1B49EE0C7/GUID-8E8E78F1-283A-3576-8075-B8024DC7F61E"><apiname>MVideoRecorderUtilityObserver::MvruoPrepareComplete</apiname></xref> is called to notify that the video recorder is ready to record. </p> </li> </ol> </section> <section><title>See Also</title> <p><xref href="GUID-3B250C0E-5D53-53ED-A02C-16FE8EAEDF86.dita">Configuring the Video Recorder</xref>  </p> <p><xref href="GUID-ED700A4A-3BBF-5048-92CB-E3677A0FD09F.dita">Enabling/Disabling Video Recording</xref>  </p> <p><xref href="GUID-C08BBBAD-3605-53E3-A94F-ECCFFB80E1DD.dita">Controlling Video Recording Quality</xref>  </p> <p><xref href="GUID-18D7228F-A1E5-594A-B654-EF5D74CE17D2.dita">Recording Video Data</xref>  </p> <p><xref href="GUID-2D20B6DF-BE02-50CF-8E9F-14E3402EF952.dita">Setting Video Metadata</xref>  </p> <p><xref href="GUID-44EDB476-33E2-5D91-8CC2-A04369AACCA4.dita">Controlling the Video Plugin</xref>  </p> </section> </conbody></concept>