author | Dominic Pinkman <dominic.pinkman@nokia.com> |
Fri, 13 Aug 2010 16:47:46 +0100 | |
changeset 14 | 578be2adaf3e |
parent 5 | f345bda72bc4 |
permissions | -rw-r--r-- |
14
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
2 |
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
3 |
<!-- This component and the accompanying materials are made available under the terms of the License |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
4 |
"Eclipse Public License v1.0" which accompanies this distribution, |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
5 |
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
6 |
<!-- Initial Contributors: |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
7 |
Nokia Corporation - initial contribution. |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
8 |
Contributors: |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
9 |
--> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
10 |
<!DOCTYPE concept |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
11 |
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
12 |
<concept xml:lang="en" id="GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE"><title>Getting Audio and Video Stream Metadata</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to get audio and video stream metadata. </p> <section><title>Purpose</title> <p>The purpose of this tutorial is to show you how to get metadata from audio and video streams. This tutorial looks at two of the 3GP Parser metadata functions: <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>GetVideoProperties()</apiname></xref> and <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>GetAudioProperties()</apiname></xref>. </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 Parser. </p> <p><b>Introduction</b> </p> <p>You can use the 3GP Parser to get the following metadata: </p> <ul><li id="GUID-539EFD0E-0A07-502D-AA33-99175C28B145"><p>Video properties (video type, length of video, frame rate, bit rate, width/height of image, and timescale) </p> </li> <li id="GUID-ADBFD31D-6AB2-5115-9EC7-588E2A199830"><p>Audio properties (audio type, length of audio, frames per sample, average bit rate, and timescale) </p> </li> <li id="GUID-35357E2A-E4C5-5AED-8A1B-DCBEEF6AF7F1"><p>Stream properties (stream size, stream average bit rate) </p> </li> <li id="GUID-6679D24E-AB69-597A-94D2-D51E8F1AEA9D"><p>Video decoder specific information </p> </li> <li id="GUID-A6729B87-EDC1-5791-9816-042D9CE318AD"><p>Audio decoder specific information </p> </li> <li id="GUID-1DE3A641-6DFD-5A8F-A11D-AA53F318E44B"><p>User data atom </p> </li> <li id="GUID-7C0CB6B4-95BB-5A6A-9017-6F9AA10E353D"><p>QCELP (Qualcomm CELP Codec) storage mode </p> </li> <li id="GUID-2F0FBC1E-CD71-541D-AD2D-C1F939AD53EE"><p>Video clip properties. </p> </li> </ul> </section> <section><title>Using GetVideoProperties() and GetAudioProperties()</title> <p>The following tasks are covered in this tutorial: </p> <ul><li id="GUID-92BBF778-801A-558D-BF55-EB5632564C27"><p><xref href="GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE.dita#GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE/GUID-3E26BB43-4120-557B-ADFE-4FBAFBC6BED8"> Getting video stream properties</xref> </p> </li> <li id="GUID-5ABA9179-6EB4-5E61-940D-676E7661D663"><p><xref href="GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE.dita#GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE/GUID-58DECA94-B0EA-57A3-BEDA-BBC1B674A3A0">Getting audio stream properties</xref> </p> </li> </ul> <p id="GUID-3E26BB43-4120-557B-ADFE-4FBAFBC6BED8"><b>Getting video stream properties</b> </p> <p>To return the properties that describe a video stream: </p> <ul><li id="GUID-A4F7FCD0-44BC-5649-88FC-9B9EC13DD243"><p>Call <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::GetVideoProperties(T3GPVideoType&, |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
13 |
TUint&, TReal&, TUint&, TSize&, TUint&)</apiname></xref>: </p> <codeblock id="GUID-A1EC3749-8693-5C32-9663-DFF8C61301CD" xml:space="preserve">TInt GetVideoProperties(T3GPVideoType& aType, TUint& aLength, TReal& aFrameRate, TUint& aAvgBitRate, TSize& aSize, TUint& aTimeScale) const;</codeblock> <p>This function returns video type, length of video, frame rate, bit rate, width/height of image, and timescale. </p> <p> <b>Notes</b>: </p> <ul><li id="GUID-0E2606EA-8052-5C00-B138-15D040E098C7"><p>In buffer mode, make sure there is enough data supplied to the 3GP Parser before you call <codeph>C3GPParse::GetVideoProperties()</codeph>. For more information, see <xref href="GUID-12C74671-1988-55E7-8320-FE77024A523C.dita">Supplying Data to a 3GP Parser</xref>. </p> </li> <li id="GUID-872B0007-D54E-5767-AC9E-7077999E5484"><p>Getting metadata does not change the position of the video data cursor. For optimisation purposes, metadata values are cached in the 3GP Parser until <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Complete()</apiname></xref> is called. </p> </li> </ul> </li> </ul> <p id="GUID-58DECA94-B0EA-57A3-BEDA-BBC1B674A3A0"><b> Getting audio stream properties</b> </p> <p>To return the properties that describe an audio stream: </p> <ul><li id="GUID-3CF730AC-8B78-5D29-A82A-5857FB4215F3"><p>Call <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::GetAudioProperties(T3GPAudioType&, |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
14 |
TUint&, TInt&, TUint&, TUint&)</apiname></xref>: </p> <codeblock id="GUID-8E67C839-99FC-5089-90D4-5BA325813518" xml:space="preserve">TInt GetAudioProperties(T3GPAudioType& aType, TUint& aLength, TInt& aFramesPerSample, TUint& aAvgBitRate, TUint& aTimeScale) const;</codeblock> <p>This function returns audio type, length of audio, frames per sample, average bit rate, and timescale. </p> <p> <b>Notes</b>: </p> <ul><li id="GUID-EBDF6598-0822-5300-B08A-3FDBFC2820DD"><p>In buffer mode, make sure there is enough data supplied to the 3GP Parser before you call <codeph>C3GPParse::GetAudioProperties()</codeph>. For more information, see <xref href="GUID-12C74671-1988-55E7-8320-FE77024A523C.dita">Supplying Data to a 3GP Parser</xref>. </p> </li> <li id="GUID-28215E0F-8DB1-5646-95CE-6E2DFF9BCDDF"><p>Getting metadata does not change the position of the audio data cursor. For optimisation purposes, metadata values are cached in the 3GP Parser until <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Complete()</apiname></xref> is called. </p> </li> </ul> </li> </ul> </section> <section><title>Example</title> <p>The following example shows you how to get audio and video property metadata: </p> <codeblock id="GUID-10EF667E-28FF-521F-96CC-6B6ECFD85E24" xml:space="preserve">CMyApp::ReadFileL(const RFile& aFile) |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
15 |
{ |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
16 |
... |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
17 |
// see example setup code in Setting up a 3GP Parser. |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
18 |
... |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
19 |
// retrieve video properties of the content |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
20 |
User::LeaveIfError(parser->GetVideoProperties(...)); |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
21 |
|
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
22 |
// retrieve audio properties of the content |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
23 |
User::LeaveIfError(parser->GetAudioProperties(...)); |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
24 |
... |
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
|
25 |
}</codeblock> </section> <section><title>See also</title> <p><xref href="GUID-4D4A2853-B573-5B16-B9E3-0E4853C90BCD.dita">Setting up a 3GP Parser</xref> </p> <p><xref href="GUID-12C74671-1988-55E7-8320-FE77024A523C.dita"> Supplying Data to a 3GP Parser</xref> </p> <p><xref href="GUID-EFD05CAF-A8CF-5C2E-B7C9-51023D2438DF.dita">Reading Video and Audio Content</xref> </p> </section> </conbody></concept> |