Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Audio Metadata Reader API

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (14 Jun 2013)

Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.


The Audio Metadata Reader API provides classes useful to get metadata information of an audio file.

Use cases

Some of the basic uses of this API are to retrieve the count of metadata fields, fields information like artist name, length of the file, year of album, etc.

Example code

Header files

#include <MetaDataFieldContainer.h>
#include <MetaDataUtility.h>
#include <MetaDataField.hrh>

Link against:

LIBRARY MetaDataUtility.lib

The classes used are CMetaDataFieldContainer and CMetaDataUtility.

void CTestAudioMetadataReaderAPIAppUi::ConstructL()
CMetaDataUtility* iMDUtility = CMetaDataUtility::NewL();
void CTestAudioMetadataReaderAPIAppUi::GetMetadataL()
//Returns the number of metadata fields.
TInt iMetaCount = iMDUtility->MetaDataCount();
TBuf<64> itext;
CEikonEnv::InfoWinL(_L("METADATA COUNT:"),itext);
//Returns the metadata fields found in this source.
const CMetaDataFieldContainer& iMDfield = iMDUtility->MetaDataFieldsL();
TMetaDataFieldId aFieldId;
for(TInt i=0;i < iMetaCount;i++)
//Returns the field at given location, first element at position 0.
TBuf<50> iMetaField;
CEikonEnv::InfoWinL(_L("METADATA FIELD ID:"),iMetaField);
//Returns the metadata field that corresponds to the field ID.
TPtrC iMetaData = iMDfield.Field(aFieldId);
CEikonEnv::InfoWinL(_L("METADATA FIELD:"),iMetaField);

Example Application

This page was last modified on 14 June 2013, at 04:58.
51 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.