diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-AE495355-86EA-50C1-A483-405BF973BB9B.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-AE495355-86EA-50C1-A483-405BF973BB9B.dita Tue Mar 30 11:56:28 2010 +0100 @@ -0,0 +1,31 @@ + + + + + +Releasing 3GP Parser Resources

This tutorial describes how to release 3GP Parser resources.

Purpose

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.

Required background

The 3GP Library Overview introduces the 3GP Parser.

Introduction

Use the C3GPParse::Complete() 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 C3GPParse::Open() functions. If you no longer require the 3GP Parser, you can destroy the C3GPParse instance after calling C3GPParse::Complete().

Using Complete()

The following task is covered in this tutorial:

  • Releasing 3GP Parser resources

Releasing 3GP Parser resources

To release 3GP Parser resources:

  • Call C3GPParse::Complete():

    IMPORT_C TInt Complete();

    To reuse the 3GP Parser object after C3GPParse::Complete(), call one of the C3GPParse::Open() functions. For more information, see Initialising a 3GP Parser for reading 3GP, 3G2 or MP4 data.

Example

The following example shows you how to release 3GP Parser resources:

CMyApp::ReadFileL(const RFile& aFile) + { + ... + // See example code in 3GP Parser tutorials. + ... + User::LeaveIfError(parser->Complete()); + CleanupStack::PopAndDestroy(parser); + ... + }

The following example shows you how to reuse the 3GP Parser after releasing resources:

CMyApp::ReadFileL(const RFile& aFile) + { + ... + // See example code in 3GP Parser tutorials. + ... + // release all parser resource +User::LeaveIfError(parser->Complete()); + +// open a new file using the same parser +User::LeaveIfError(parser->Open(...)); +... + }
See Also

Setting up a 3GP Parser

Supplying Data to a 3GP Parser

Getting Audio and Video Stream Metadata

Reading Video and Audio Content

\ No newline at end of file