author | Dominic Pinkman <dominic.pinkman@nokia.com> |
Wed, 16 Jun 2010 10:24:13 +0100 | |
changeset 10 | d4524d6a4472 |
parent 5 | f345bda72bc4 |
child 14 | 578be2adaf3e |
permissions | -rw-r--r-- |
5
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
2 |
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
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 |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
4 |
"Eclipse Public License v1.0" which accompanies this distribution, |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
5 |
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
6 |
<!-- Initial Contributors: |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
7 |
Nokia Corporation - initial contribution. |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
8 |
Contributors: |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
9 |
--> |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
10 |
<!DOCTYPE concept |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
11 |
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
12 |
<concept xml:lang="en" id="GUID-28DF11D8-F895-5D4B-8C6D-AEAB3172F3B6"><title>Setting up a 3GP Composer</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to set up a 3GP Composer. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to set up a 3GP Composer to write (compose) a 3GP, 3G2 or MP4 file. </p> <p><b>Required background</b> </p> <p>The <xref href="GUID-EF71F4BF-2206-5489-BDB9-2F85ED74D6E2.dita">3GP Library Overview</xref> introduces the 3GP Composer. </p> <p><b>Introduction</b> </p> <p>The <xref href="GUID-C463561F-4BDA-3CBE-9588-AFDB5FD889A2.dita"><apiname>C3GPCompose</apiname></xref> class lets you write 3GP, 3G2 and MP4 files. You can specify the location of the output file by supplying a file path or an opened file handle. </p> </section> <section><title>Using a 3GP Composer </title> <p>The following tasks are covered in this tutorial: </p> <ol id="GUID-6622F1F0-77B0-5EB9-BE8D-CB2A7D5B8E83"><li id="GUID-B9ACDA8C-B9DD-5C45-90EB-45F181DEEC44"><p><xref href="GUID-28DF11D8-F895-5D4B-8C6D-AEAB3172F3B6.dita#GUID-28DF11D8-F895-5D4B-8C6D-AEAB3172F3B6/GUID-F3D2FF74-D138-56CE-A76B-95CF60F9D708">Creating an instance of a 3GP Composer</xref> </p> </li> <li id="GUID-4C7DBA07-897B-536B-B33E-155346669212"><p><xref href="GUID-28DF11D8-F895-5D4B-8C6D-AEAB3172F3B6.dita#GUID-28DF11D8-F895-5D4B-8C6D-AEAB3172F3B6/GUID-F8FDE6BB-4E67-53B5-BE5E-41660B3E0793"> Initialising a 3GP Composer for reading 3GP, 3G2 or MP4 data</xref>. </p> </li> </ol> <p id="GUID-F3D2FF74-D138-56CE-A76B-95CF60F9D708"><b>Creating an instance of a 3GP Composer</b> </p> <p>Create an instance of a 3GP Composer by calling one of the overloads of <codeph>C3GPCompose::NewL()</codeph>: </p> <ul><li id="GUID-8E832DE8-8CC6-55A9-9FB6-FCFAC1954410"><p>To use the default buffer size and buffer count, call <xref href="GUID-C463561F-4BDA-3CBE-9588-AFDB5FD889A2.dita"><apiname>C3GPCompose::NewL()</apiname></xref>: </p> <codeblock id="GUID-2EAAD407-6DCD-5808-BA89-5A3010050DF3" xml:space="preserve">static IMPORT_C C3GPCompose *NewL();</codeblock> </li> <li id="GUID-D1EB29E0-0327-5F53-8E5F-22B02B22113C"><p>To set the size of the buffer and the maximum buffer count, call <xref href="GUID-C463561F-4BDA-3CBE-9588-AFDB5FD889A2.dita"><apiname>C3GPCompose::NewL(TInt, TInt)</apiname></xref> and set <codeph>aMediaWriteBufferSize</codeph> to be the write buffer size and <codeph>aWriteBufferMaxCount</codeph> to be the maximum buffer count: </p> <codeblock id="GUID-DA35163A-39FB-58BC-8C58-F6C0DEC31DE9" xml:space="preserve">static IMPORT_C C3GPCompose *NewL(TInt aMediaWriteBufferSize, TInt aWriteBufferMaxCount);</codeblock> </li> </ul> <p id="GUID-F8FDE6BB-4E67-53B5-BE5E-41660B3E0793"><b>Initialising a 3GP Composer for writing 3GP, 3G2 or MP4 data</b> </p> <p>Initialise the 3GP Composer for writing data by calling one of the overloads of <codeph>C3GPCompose::Open()</codeph>: </p> <ul><li id="GUID-7C9EE711-94E4-5F6C-B127-2D11321CE401"><p>To initialise the 3GP Composer to use a file path to write 3GP, 3G2 or MP4 data into a file, call <xref href="GUID-C463561F-4BDA-3CBE-9588-AFDB5FD889A2.dita"><apiname>C3GPCompose::Open(T3GPFileFormatType, const T3GPVideoPropertiesBase, |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
13 |
const T3GPAudioPropertiesBase, const TDesC, TUint)</apiname></xref>: </p> <codeblock id="GUID-3C7BEC34-6D6E-5ACC-8046-B63B0E369864" xml:space="preserve">IMPORT_C TInt Open(T3GPFileFormatType aFileFormat, const T3GPVideoPropertiesBase *aVideo, const T3GPAudioPropertiesBase *aAudio, const TDesC &aFilename, TUint aFlags=E3GPNoFlag);</codeblock> </li> <li id="GUID-4D1EEA7B-524E-5D59-8BDF-7156F4CCB39C"><p>To initialise the 3GP Composer to use a file handle to write 3GP, 3G2 or MP4 data into a file, call <xref href="GUID-C463561F-4BDA-3CBE-9588-AFDB5FD889A2.dita"><apiname>C3GPCompose::Open(T3GPFileFormatType, const T3GPVideoPropertiesBase, |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
14 |
const T3GPAudioPropertiesBase, RFile, TUint)</apiname></xref>: </p> <codeblock id="GUID-29DC8702-EEC4-52F9-9BEF-FBF55875714E" xml:space="preserve">IMPORT_C TInt Open(T3GPFileFormatType aFileFormat, const T3GPVideoPropertiesBase *aVideo, const T3GPAudioPropertiesBase *aAudio, RFile &aFile, TUint aFlags=E3GPNoFlag);</codeblock> </li> </ul> <p> <b>Note</b>: You can use any combination of one video type and one audio type to compose your 3GP, 3G2 and MP4 files. </p> </section> <section><title>Example</title> <p>The following example shows you how to compose a 3GP file with H263 video and AMR NB audio: </p> <codeblock id="GUID-A0C41E83-1F4B-593D-A8A0-0ECDBB8A42BC" xml:space="preserve">CMyApp::WriteFileL(const TDesC& aFile) |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
15 |
{ |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
16 |
... |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
17 |
// create an instance of a 3GP Composer |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
18 |
C3GPCompose* composer = C3GPCompose::NewL(); |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
19 |
CleanupStack::PushL(composer); |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
20 |
|
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
21 |
// set up a 3GP Composer |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
22 |
T3GPVideoPropertiesH263 video(...); |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
23 |
T3GPAudioPropertiesAmr audio(...); |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
24 |
User::LeaveIfError(composer->Open(E3GP3GP, &video, &audio, aFile)); |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
25 |
... |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
26 |
} |
f345bda72bc4
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
27 |
</codeblock> </section> <section><title>See also</title> <p><xref href="GUID-32B58425-81AC-59D6-A17F-21BD06ACB658.dita">Adding Data to a 3GP Composer</xref> </p> <p><xref href="GUID-460089B6-CA35-5DB7-ABC0-A688D6EE77D5.dita">Completing Composition</xref> </p> </section> </conbody></concept> |