Symbian3/PDK/Source/GUID-AE495355-86EA-50C1-A483-405BF973BB9B.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 16:16:55 +0100
changeset 6 43e37759235e
parent 5 f345bda72bc4
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of example code"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-AE495355-86EA-50C1-A483-405BF973BB9B"><title>Releasing 3GP Parser Resources</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This tutorial describes how to release 3GP Parser resources. </p> <section><title>Purpose</title> <p>When you have finished using the 3GP Parser, you must release all associated resources. The purpose of this tutorial is to show you how to complete the parsing process. </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>Use the <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Complete()</apiname></xref> function to release 3GP Parser resources. If you want to reuse the 3GP Parser, you can open another file or buffer by calling one of the <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Open()</apiname></xref> functions. If you no longer require the 3GP Parser, you can destroy the <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse</apiname></xref> instance after calling <codeph>C3GPParse::Complete()</codeph>. </p> </section> <section><title>Using Complete() </title> <p>The following task is covered in this tutorial: </p> <ul><li id="GUID-DEDA6DB3-F0AB-5DA3-A7F4-F0717B73753B"><p><xref href="GUID-AE495355-86EA-50C1-A483-405BF973BB9B.dita#GUID-AE495355-86EA-50C1-A483-405BF973BB9B/GUID-DD1F2D7F-470E-5DCD-8842-20AB0EB69E9A">Releasing 3GP Parser resources</xref>  </p> </li> </ul> <p id="GUID-DD1F2D7F-470E-5DCD-8842-20AB0EB69E9A"><b>Releasing 3GP Parser resources</b> </p> <p>To release 3GP Parser resources: </p> <ul><li id="GUID-DE8B6D0F-1929-5EB9-A920-8BB3C993F9FF"><p>Call <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Complete()</apiname></xref>: </p> <codeblock id="GUID-D0A7EDB4-1716-5113-ABF9-2E9DC7C5FF55" xml:space="preserve">IMPORT_C TInt Complete();</codeblock> <p>To reuse the 3GP Parser object after <codeph>C3GPParse::Complete()</codeph>, call one of the <xref href="GUID-BF3A60C9-0F4C-3712-90E3-ACBD73BE4EB6.dita"><apiname>C3GPParse::Open()</apiname></xref> functions. For more information, see <xref href="GUID-4D4A2853-B573-5B16-B9E3-0E4853C90BCD.dita#GUID-4D4A2853-B573-5B16-B9E3-0E4853C90BCD/GUID-A38F0C28-0032-5F14-9974-4F009E5E1D66">Initialising a 3GP Parser for reading 3GP, 3G2 or MP4 data</xref>. </p> </li> </ul> </section> <section><title>Example</title> <p>The following example shows you how to release 3GP Parser resources: </p> <codeblock id="GUID-3DC3ACD0-1A75-5702-951E-520310A23A42" xml:space="preserve">CMyApp::ReadFileL(const RFile&amp; aFile)
    {
    ...
    // See example code in 3GP Parser tutorials.
    ...
    User::LeaveIfError(parser-&gt;Complete());
    CleanupStack::PopAndDestroy(parser);
    ...
    }</codeblock> <p>The following example shows you how to reuse the 3GP Parser after releasing resources: </p> <codeblock id="GUID-16270C10-6C4C-58E1-8418-1F369A4DC4E6" xml:space="preserve">CMyApp::ReadFileL(const RFile&amp; aFile)
    {
    ...
    // See example code in 3GP Parser tutorials.
    ...
    // release all parser resource
User::LeaveIfError(parser-&gt;Complete());

// open a new file using the same parser
User::LeaveIfError(parser-&gt;Open(...));
...
    }</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-CC4BA8E7-BCAB-58F7-AC5D-BA75A82D04AE.dita">Getting Audio and Video Stream Metadata</xref>  </p> <p><xref href="GUID-EFD05CAF-A8CF-5C2E-B7C9-51023D2438DF.dita">Reading Video and Audio Content</xref>  </p> </section> </conbody></concept>