8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-AB9A3EA2-2B99-4502-A161-8EE5BF477D41" xml:lang="en"><title>Capturing |
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> |
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 |
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. |
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 |
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> |
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> |
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_d0e290621_href.png"/></fig> |
19 <p>Important implementation considerations include:</p> |
19 <p>Important implementation considerations include:</p> |
20 <ul> |
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 |
21 <li><p>Make sure you include the <codeph>VideoRecorder.h</codeph> and <codeph>mmfcontrollerpluginresolver.h</codeph> header |
22 format UIDs.</p></li> |
22 files in the appropriate class files.</p></li> |
|
23 <li><p>Make sure you have correct <xref href="GUID-6971B0A2-F79B-4E05-8AF3-BB1FC1932A22.dita">capabilities</xref> information |
|
24 set for your application. You need at least the <codeph>UserEnvironment</codeph> capability. |
|
25 If you want to set the recording priority for the video and audio device, |
|
26 you need the <codeph>MultimediaDD</codeph> capability.</p></li> |
|
27 <li><p>Make sure <codeph>mediaclientvideo.lib</codeph> and <codeph>mmfcontrollerframework.lib</codeph> are |
|
28 accessible to your linker when compiling your application by including it |
|
29 in your <codeph>mmp</codeph> file or by editing the project properties in |
|
30 your IDE, depending on your build environment.</p></li> |
|
31 <li><p>To open a file for recording the <xref href="GUID-8A183C79-0EA4-3A4A-B95F-E2F1BF74238D.dita"><apiname>CVideoRecorderUtility</apiname></xref> class |
|
32 requires the MMF Controller Framework API to specify controller and format |
|
33 UIDs.</p></li> |
23 <li><p>If you need to use the display of the device as a viewfinder |
34 <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 |
35 for your video application, request viewfinder frames using the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCamera</apiname></xref> class, |
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> |
36 and draw them yourself. For more information, see step 3 in <xref href="GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE.dita#GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE/GUID-A7ED7A90-1432-4905-A0A5-0CC725997127">To capture still images on a mobile device </xref>.</p></li> |
26 </li> |
|
27 <li><p>The settings you can use in your application depend on what |
37 <li><p>The settings you can use in your application depend on what |
28 the camera hardware on the device supports.</p></li> |
38 the camera hardware on the device supports.</p></li> |
29 </ul> |
39 </ul> |
30 <section id="GUID-0C91A376-92FB-4C5F-8DCF-68A24D01CB9C"><title>To capture a |
40 <section id="GUID-0C91A376-92FB-4C5F-8DCF-68A24D01CB9C"><title>To capture a |
31 video clip</title> |
41 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> |
42 <p>Use the methods of the <codeph>CVideoRecorderUtility</codeph> class |
|
43 to construct your application.</p> |
33 <ol> |
44 <ol> |
34 <li id="GUID-77A80BE7-A452-42C4-A815-712402597071"><p>Initialize |
45 <li id="GUID-77A80BE7-A452-42C4-A815-712402597071"><p>Initialize |
35 the video recorder.</p> |
46 the video recorder.</p> |
36 <ul> |
47 <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> |
48 <li><p>Create a video recorder object using the <codeph>CVideoRecorderUtility::NewL</codeph> method.</p> |
38 </li> |
49 </li> |
39 <li><p>Resolve the supported video format and retrieve a list of |
50 <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> |
51 controllers using the <codeph>CMMFControllerPluginSelectionParameters</codeph> and <codeph>CMMFFormatSelectionParameters</codeph> classes, |
|
52 and the respective type definitions <codeph>RMMFControllerImplInfoArray</codeph> and <codeph>RMMFFormatImplInfoArray</codeph>. </p> |
|
53 </li> |
41 <li><p>Open a file, descriptor or an URL to store the video clip |
54 <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> |
55 in using the respective <codeph>CVideoRecorderUtility::OpenFileL</codeph>, <codeph>CVideoRecorderUtility::OpenDesL</codeph>, |
|
56 or <codeph>CVideoRecorderUtility::OpenUrlL</codeph> method.</p></li> |
|
57 <li><p>Set the maximum video clip size using the <codeph>CVideoRecorderUtility::SetMaxClipSizeL()</codeph> method.</p> |
43 </li> |
58 </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> |
59 <li><p>Prepare the record controller using the <codeph>CVideoRecorderUtility::Prepare()</codeph> method. <codeph>MVideoRecorderUtilityObserver::MvruoPrepareComplete</codeph> is called upon completion.</p></li> |
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> |
60 </ul> |
49 </li> |
61 </li> |
50 <li id="GUID-8A46469A-E0BE-4789-ADEE-C900FF7CB331"><p>Configure |
62 <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, |
63 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 |
64 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 |
65 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> |
66 more information on the options, see the <codeph>CVideoRecorderUtility</codeph> class.</p> |
|
67 </li> |
55 <li id="GUID-CB57B0CC-14AD-464F-82FF-9D80CD369CD5"><p>Capture the |
68 <li id="GUID-CB57B0CC-14AD-464F-82FF-9D80CD369CD5"><p>Capture the |
56 video clip.</p> |
69 video clip.</p> |
57 <ul> |
70 <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> |
71 <li><p>Start recording a video using the <codeph>CVideoRecorderUtility::Record()</codeph> method.</p> |
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> |
72 </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> |
73 <li><p>Pause recording using the <codeph>CVideoRecorderUtility::PauseL()</codeph> method.</p> |
|
74 </li> |
|
75 <li><p>Stop recording using the <codeph>CVideoRecorderUtility::Stop()</codeph> method.</p> |
|
76 </li> |
61 </ul> |
77 </ul> |
62 </li> |
78 </li> |
63 <li id="GUID-6CB8476D-CC81-4776-B42F-F6AF3EDEBE76"><p>To exit the |
79 <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 |
80 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> |
81 using the <codeph>CVideoRecorderUtility::Close()</codeph> method.</p></li> |
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> |
82 </ol> |
77 </section> |
83 </section> |
78 <section id="GUID-AA5B55BE-12E2-4CDF-9FA6-717669E07095"><title>Additional information |
84 <section id="GUID-AA5B55BE-12E2-4CDF-9FA6-717669E07095"><title>Additional information |
79 on capturing a video</title> |
85 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 |
86 <p>For a reference example, see the <xref href="GUID-55BF8452-F9FF-5CF3-9D74-3BC7F5447551.dita">Camera |
81 Example: Capturing and controlling the images using Camera</xref>.</p> |
87 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 |
88 <p>For more information on <codeph>CVideoRecorderUtility</codeph>, see:</p> |
83 recipes</xref> at the Symbian Foundation.</p> |
89 <ul> |
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 |
90 <li><p><xref href="GUID-2DC80BA9-7AA2-5CD3-9105-1DE28CE196C1.dita">Video |
85 in the Video Client library.</p> |
91 Client Overview</xref></p></li> |
|
92 <li><p><xref href="http://developer.symbian.org/wiki/index.php/File:Quick_Recipes_Symbian_multimedia_recipes.pdf" scope="external">Multimedia |
|
93 recipes</xref> at the Symbian Foundation</p></li> |
|
94 </ul> |
|
95 <p>For information on using encoded H264 video frames, see <xref href="GUID-D038D77F-A6B8-5A18-8978-4981AE8D0F35.dita">Using |
|
96 the Encoded H264 Video Frames to Capture Video</xref>.</p> |
86 </section> |
97 </section> |
87 </conbody></concept> |
98 </conbody></concept> |