diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-12C74671-1988-55E7-8320-FE77024A523C.dita --- a/Symbian3/PDK/Source/GUID-12C74671-1988-55E7-8320-FE77024A523C.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-12C74671-1988-55E7-8320-FE77024A523C.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,33 +1,33 @@ - - - - - -Supplying Data to a 3GP Parser

This tutorial describes how to supply data to a 3GP Parser.

Purpose

To use the 3GP Parser in buffer mode, you must supply MP4/3GP/3G2 content in sequential blocks of data. The purpose of this tutorial is to show you how to supply the data to a 3GP Parser.

Required background

The 3GP Library Overview introduces the 3GP Parser.

Introduction

You use the C3GPParse::InsertData() function to supply data to a 3GP Parser. If there is not enough data to process requests, the 3GP Parser returns KErrMM3GPLibMoreDataRequired. You supply more data to the 3GP Parser through the C3GPParse::InsertData() function. A copy of the supplied data will be stored within the 3GP Parser. You are safe to destroy your copy on the return of C3GPParse::InsertData().

Setup and configuration requirements

To initialise the 3GP Parser to read data from a buffer, you must use the correct overload of C3GPParse::Open(). For more information, see Setting up a 3GP Parser.

Using InsertData()

The following tasks are covered in this tutorial:

  • Supplying data to a 3GP Parser

Supplying data to a 3GP Parser

The high-level steps to supply data to a 3GP Parser are shown here:

  • Call C3GPParse::InsertData(const - TDesC8&) and set aBuffer to be a descriptor containing the data to be inserted.

    TInt InsertData(const TDesC8& aBuffer);
Example

The following example shows you how to supply a received data block into the 3GP Parser:

CMyApp::ReceiveFileContentL(const TDesC& aData) - { - ... - // assume parser already setup in buffer mode - ... -// supply the received data block into the parser -User::LeaveIfError(iParser->InsertData(aData)); - -// attempt to retrieve video properties -err = parser->GetVideoProperties(...); -if (err == KErrMM3GPLibMoreDataRequired) - { - // indicate to supplier of the content more data is needed - // before this can be processed. Possibly to trigger CMyApp::ReceiveFileContentL - // to be called again with the next block of data - } -else - { - // do something with the video properties - } + + + + + +Supplying Data to a 3GP Parser

This tutorial describes how to supply data to a 3GP Parser.

Purpose

To use the 3GP Parser in buffer mode, you must supply MP4/3GP/3G2 content in sequential blocks of data. The purpose of this tutorial is to show you how to supply the data to a 3GP Parser.

Required background

The 3GP Library Overview introduces the 3GP Parser.

Introduction

You use the C3GPParse::InsertData() function to supply data to a 3GP Parser. If there is not enough data to process requests, the 3GP Parser returns KErrMM3GPLibMoreDataRequired. You supply more data to the 3GP Parser through the C3GPParse::InsertData() function. A copy of the supplied data will be stored within the 3GP Parser. You are safe to destroy your copy on the return of C3GPParse::InsertData().

Setup and configuration requirements

To initialise the 3GP Parser to read data from a buffer, you must use the correct overload of C3GPParse::Open(). For more information, see Setting up a 3GP Parser.

Using InsertData()

The following tasks are covered in this tutorial:

  • Supplying data to a 3GP Parser

Supplying data to a 3GP Parser

The high-level steps to supply data to a 3GP Parser are shown here:

  • Call C3GPParse::InsertData(const + TDesC8&) and set aBuffer to be a descriptor containing the data to be inserted.

    TInt InsertData(const TDesC8& aBuffer);
Example

The following example shows you how to supply a received data block into the 3GP Parser:

CMyApp::ReceiveFileContentL(const TDesC& aData) + { + ... + // assume parser already setup in buffer mode + ... +// supply the received data block into the parser +User::LeaveIfError(iParser->InsertData(aData)); + +// attempt to retrieve video properties +err = parser->GetVideoProperties(...); +if (err == KErrMM3GPLibMoreDataRequired) + { + // indicate to supplier of the content more data is needed + // before this can be processed. Possibly to trigger CMyApp::ReceiveFileContentL + // to be called again with the next block of data + } +else + { + // do something with the video properties + } }
See also

Setting up a 3GP Parser

Getting Audio and Video Stream Metadata

Reading Video and Audio Content

\ No newline at end of file