Symbian3/PDK/Source/GUID-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
child 14 578be2adaf3e
permissions -rw-r--r--
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"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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-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&amp;,
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
                  TUint&amp;, TReal&amp;, TUint&amp;, TSize&amp;, TUint&amp;)</apiname></xref>: </p> <codeblock id="GUID-A1EC3749-8693-5C32-9663-DFF8C61301CD" xml:space="preserve">TInt GetVideoProperties(T3GPVideoType&amp; aType, TUint&amp; aLength, TReal&amp; aFrameRate, TUint&amp; aAvgBitRate, TSize&amp; aSize, TUint&amp; 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&amp;,
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
                  TUint&amp;, TInt&amp;, TUint&amp;, TUint&amp;)</apiname></xref>: </p> <codeblock id="GUID-8E67C839-99FC-5089-90D4-5BA325813518" xml:space="preserve">TInt GetAudioProperties(T3GPAudioType&amp; aType, TUint&amp; aLength, TInt&amp; aFramesPerSample, TUint&amp; aAvgBitRate, TUint&amp; 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&amp; 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
// see example setup code in Setting up a 3GP Parser. 
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
...
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
// retrieve video properties of the content
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
User::LeaveIfError(parser-&gt;GetVideoProperties(...));
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
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
// retrieve audio properties of the content
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
User::LeaveIfError(parser-&gt;GetAudioProperties(...));
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
...
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>