This tutorial describes how to release 3GP Parser resources.
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().
The following task is covered in this tutorial:
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.
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(...)); ... }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.