diff options
author | PacketVideo CM <engbuild@pv.com> | 2010-06-15 16:36:06 -0700 |
---|---|---|
committer | PacketVideo CM <engbuild@pv.com> | 2010-06-15 16:36:06 -0700 |
commit | 88860bff58e1488b0c20341e54dec2ef4cc3beb4 (patch) | |
tree | e028c8749f6deacf9fbfb96b2532038d0e052b04 | |
parent | e7ca47b8a6c5fdcdb604f4f18a1a73fed824e4e7 (diff) | |
download | opencore-88860bff58e1488b0c20341e54dec2ef4cc3beb4.tar.gz |
RIO-7189: Add profile and channel metadata support in AAC and AMR parsers
Change-Id: Ic26e046707c51cf82ecc4a392307eebd9acd32d6
-rw-r--r-- | engines/2way/src/pv_2way_sdkinfo.h | 2 | ||||
-rw-r--r-- | engines/author/src/pv_author_sdkinfo.h | 2 | ||||
-rw-r--r-- | engines/player/src/pv_player_sdkinfo.h | 2 | ||||
-rw-r--r-- | fileformats/rawaac/parser/include/aacfileparser.h | 10 | ||||
-rw-r--r-- | fileformats/rawaac/parser/src/aacfileparser.cpp | 21 | ||||
-rw-r--r-- | fileformats/rawgsmamr/parser/include/amrfileparser.h | 8 | ||||
-rw-r--r-- | fileformats/rawgsmamr/parser/src/amrfileparser.cpp | 16 | ||||
-rw-r--r-- | nodes/pvaacffparsernode/include/pvmf_aacffparser_defs.h | 2 | ||||
-rw-r--r-- | nodes/pvaacffparsernode/src/pvmf_aacffparser_node.cpp | 89 | ||||
-rw-r--r-- | nodes/pvamrffparsernode/src/pvmf_amrffparser_node.cpp | 35 |
10 files changed, 174 insertions, 13 deletions
diff --git a/engines/2way/src/pv_2way_sdkinfo.h b/engines/2way/src/pv_2way_sdkinfo.h index ffaa4a6cf..dd092af05 100644 --- a/engines/2way/src/pv_2way_sdkinfo.h +++ b/engines/2way/src/pv_2way_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PV2WAY_ENGINE_SDKINFO_LABEL "1487966" +#define PV2WAY_ENGINE_SDKINFO_LABEL "1488381" #define PV2WAY_ENGINE_SDKINFO_DATE 0x20100609 #endif //PV_2WAY_SDKINFO_H_INCLUDED diff --git a/engines/author/src/pv_author_sdkinfo.h b/engines/author/src/pv_author_sdkinfo.h index 4dfd51294..8fe185938 100644 --- a/engines/author/src/pv_author_sdkinfo.h +++ b/engines/author/src/pv_author_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1487966" +#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1488381" #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100609 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED diff --git a/engines/player/src/pv_player_sdkinfo.h b/engines/player/src/pv_player_sdkinfo.h index ac7a94157..6a8ca522e 100644 --- a/engines/player/src/pv_player_sdkinfo.h +++ b/engines/player/src/pv_player_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVPLAYER_ENGINE_SDKINFO_LABEL "1487966" +#define PVPLAYER_ENGINE_SDKINFO_LABEL "1488381" #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100609 #endif //PV_PLAYER_SDKINFO_H_INCLUDED diff --git a/fileformats/rawaac/parser/include/aacfileparser.h b/fileformats/rawaac/parser/include/aacfileparser.h index 77c911a7c..45d19aa92 100644 --- a/fileformats/rawaac/parser/include/aacfileparser.h +++ b/fileformats/rawaac/parser/include/aacfileparser.h @@ -197,6 +197,8 @@ typedef struct TAACFormat iFormat; int32 iFileSize; int32 iHeaderLength; + int32 iChannels; + int32 iProfile; } TPVAacFileInfo; @@ -325,7 +327,7 @@ class AACBitstreamObject * @param adifHeaderLen Length of header * @returns Result of operation: EVERYTHING_OK, READ_ERROR etc. */ - int32 getFileInfo(int32& fileSize, TAACFormat& format, uint8& sampleFreqIndex, uint32& bitRate, uint32& adifHeaderLen, OSCL_wString&); + int32 getFileInfo(int32& fileSize, TAACFormat& format, uint8& sampleFreqIndex, uint32& bitRate, uint32& adifHeaderLen, uint8& channels, uint8& profile, OSCL_wString&); /** * @brief Expanded adts search for file information @@ -419,6 +421,8 @@ class AACBitstreamObject iActual_size = iMax_size = AACBitstreamObject::MAIN_BUFF_SIZE; iPos = AACBitstreamObject::MAIN_BUFF_SIZE; iAACFormat = EAACUnrecognized; + iChannels = 0; + iProfile = 0; if (ipAACFile) { @@ -475,6 +479,8 @@ class AACBitstreamObject uint32 iBitrate; // max bitrate for variable rate bitstream PVID3ParCom* iID3Parser; PVLogger *iLogger; + uint8 iChannels; //channel index + uint8 iProfile; //profile index public: uint32 GetByteOffsetToStartOfAudioFrames() @@ -687,6 +693,8 @@ class CAACFileParser uint32 iMetadataSize; uint32 iDownloadFileSize; uint8 iSampleFreqTableIndex; + uint8 iAACChannels; + uint8 iAACProfile; PVFile iAACFile; diff --git a/fileformats/rawaac/parser/src/aacfileparser.cpp b/fileformats/rawaac/parser/src/aacfileparser.cpp index 8dcebeb37..f0c9a88c4 100644 --- a/fileformats/rawaac/parser/src/aacfileparser.cpp +++ b/fileformats/rawaac/parser/src/aacfileparser.cpp @@ -509,7 +509,7 @@ int32 AACBitstreamObject::find_adts_syncword(uint8 *pBuffer) } //! get clip information: file size, format(ADTS or ADIF) and sampling rate index -int32 AACBitstreamObject::getFileInfo(int32& fileSize, TAACFormat& format, uint8& sampleFreqIndex, uint32& bitRate, uint32& HeaderLen, OSCL_wString&/*aClip*/) +int32 AACBitstreamObject::getFileInfo(int32& fileSize, TAACFormat& format, uint8& sampleFreqIndex, uint32& bitRate, uint32& HeaderLen, uint8& channels, uint8& profile, OSCL_wString&/*aClip*/) { uint32 id; uint32 bitstreamType; @@ -1343,6 +1343,17 @@ int32 AACBitstreamObject::getFileInfo(int32& fileSize, TAACFormat& format, uint8 // get sample frequency index iSampleFreqIndex = sampleFreqIndex = (uint8)((pBuffer[2 + index] & 0x3c) >> 2); + //get profile index + iProfile = (uint8)((pBuffer[2+index] & 0xc0) >> 6); + profile = iProfile; + + //get channel index + { + iChannels = (uint8)((pBuffer[2+index] & 0x01) << 2); + iChannels |= (uint8)((pBuffer[3+index] & 0xc0) >> 6); + channels = iChannels; + } + // check the crc_check field ibCRC_Check = ((pBuffer[1 + index] & 0x01) ? false : true); @@ -1528,6 +1539,8 @@ class AutoPtrArrayContainer //------------------------------------------------------------------------------ OSCL_EXPORT_REF CAACFileParser::CAACFileParser(void) : iAACDuration(0), + iAACProfile(0), + iAACChannels(0), iAACSampleFrequency(0), iAACBitRate(0), iAACHeaderLen(0), @@ -1653,7 +1666,7 @@ OSCL_EXPORT_REF bool CAACFileParser::InitAACFile(CAACFileParams& aParams, ParserErrorCode errCode = AAC_SUCCESS; PV_AAC_FF_NEW(NULL, AACBitstreamObject, (&iAACFile, errCode), ipBSO); - if (ipBSO->getFileInfo(iAACFileSize, iAACFormat, iSampleFreqTableIndex, iAACBitRate, iAACHeaderLen, aParams.iClip)) + if (ipBSO->getFileInfo(iAACFileSize, iAACFormat, iSampleFreqTableIndex, iAACBitRate, iAACHeaderLen, iAACChannels, iAACProfile, aParams.iClip)) { return false; } @@ -1840,6 +1853,8 @@ OSCL_EXPORT_REF bool CAACFileParser::RetrieveFileInfo(TPVAacFileInfo& aInfo) aInfo.iBitrate = iAACBitRate; aInfo.iFormat = iAACFormat; aInfo.iFileSize = iAACFileSize; + aInfo.iChannels = iAACChannels; + aInfo.iProfile = iAACProfile; PVMF_AACPARSER_LOGDIAGNOSTICS((0, "CAACFileParser::RetrieveFileInfo- duration = %d, bitrate = %d, filesize = %d", iAACDuration, iAACBitRate, iAACFileSize)); return true; @@ -2546,7 +2561,7 @@ OSCL_EXPORT_REF ParserErrorCode CAACFileParser::getAACHeaderLen(CAACFileParams& { formatTemp = EAACRaw; } - if (ipBSOTemp->getFileInfo(iAACFileSizeTemp, formatTemp, sampleFreqTableValueTemp, bitRateValueTemp, tempHeaderLenValue, aParams.iClip)) + if (ipBSOTemp->getFileInfo(iAACFileSizeTemp, formatTemp, sampleFreqTableValueTemp, bitRateValueTemp, tempHeaderLenValue, iAACChannels, iAACProfile, aParams.iClip)) { iAACFileTemp.Close(); PV_AAC_FF_DELETE(NULL, AACBitstreamObject, ipBSOTemp); diff --git a/fileformats/rawgsmamr/parser/include/amrfileparser.h b/fileformats/rawgsmamr/parser/include/amrfileparser.h index b6ac05b79..c318c3072 100644 --- a/fileformats/rawgsmamr/parser/include/amrfileparser.h +++ b/fileformats/rawgsmamr/parser/include/amrfileparser.h @@ -1,5 +1,5 @@ /* ------------------------------------------------------------------ - * Copyright (C) 1998-2009 PacketVideo + * Copyright (C) 1998-2010 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -143,6 +143,7 @@ typedef struct int32 iDuration; int32 iFileSize; int32 iAmrFormat; + int8 iChannel; } TPVAmrFileInfo; //---------------------------------------------------------------------------- @@ -236,7 +237,7 @@ class bitstreamObject * @param frame_type Frame type * @returns Result of operation: EVERYTHING_OK, READ_FAILED, etc. */ - int32 getFileInfo(int32& fileSize, int32& format, int32& frame_type); + int32 getFileInfo(int32& fileSize, int32& format, int32& frame_type, int8& channel); /** * @brief Retrieves one frame data plus frame type, used in getNextBundledAccessUnits(). @@ -288,6 +289,7 @@ class bitstreamObject iPos = bitstreamObject::MAIN_BUFF_SIZE + bitstreamObject::SECOND_BUFF_SIZE; iAmrFormat = iFrame_type = 0; iInitFilePos = 0; + iAmrChannel = 0; if (ipAMRFile) { @@ -330,6 +332,7 @@ class bitstreamObject int32 iAmrFormat; // 0 : WMF ; 1 : IF2 ; >=2 : IETF(AMR, AMR_WB, AMR_MC, AMR_WB_MC) uint32 iInitFilePos; // For IETF bitstream, iInitFilePos = IETF header size int32 iFrame_type; // frame type got from the very first frame + int8 iAmrChannel; uint8 *iBuffer; PVFile* ipAMRFile; // bitstream file @@ -450,6 +453,7 @@ class CAMRFileParser int32 iAMRFormat; int32 iAMRFileSize; int32 iTotalNumFramesRead; + int8 iAMRChannel; bool iEndOfFileReached; bitstreamObject *ipBSO; Oscl_Vector<int32, alloc_type> iRPTable; // table containing sync indexes for repositioning diff --git a/fileformats/rawgsmamr/parser/src/amrfileparser.cpp b/fileformats/rawgsmamr/parser/src/amrfileparser.cpp index 4395a823b..9a1480ded 100644 --- a/fileformats/rawgsmamr/parser/src/amrfileparser.cpp +++ b/fileformats/rawgsmamr/parser/src/amrfileparser.cpp @@ -289,6 +289,7 @@ int32 bitstreamObject::getNextFrame(uint8* frameBuffer, uint8& frame_type, bool { oscl_memcpy(frameBuffer, &pBuffer[1], frame_size - 1); // NO frame header } + } iPos += frame_size; iBytesProcessed += frame_size; @@ -319,6 +320,7 @@ int32 bitstreamObject::parseIETFHeader() { // single channel AMR file iAmrFormat = EAMRIETF_SingleNB; + iAmrChannel = 1; iInitFilePos = 6; } @@ -333,6 +335,7 @@ int32 bitstreamObject::parseIETFHeader() { // multi-channel AMR file iAmrFormat = EAMRIETF_MultiNB; + iAmrChannel = pBuffer[15] & 0x0f; iInitFilePos = 12; } else if (iActual_size >= 8 && @@ -345,6 +348,7 @@ int32 bitstreamObject::parseIETFHeader() { // single channel AMR-WB file iAmrFormat = EAMRIETF_SingleWB; + iAmrChannel = 1; iInitFilePos = 9; } else if (iActual_size >= 14 && @@ -358,6 +362,7 @@ int32 bitstreamObject::parseIETFHeader() { // multi-channel AMR-WB file iAmrFormat = EAMRIETF_MultiWB; + iAmrChannel = pBuffer[18] & 0x0f; iInitFilePos = 15; } } @@ -380,7 +385,7 @@ int32 bitstreamObject::parseIETFHeader() } //! get clip information: file size, format(IETF or IF2) and frame_type(bitrate) -int32 bitstreamObject::getFileInfo(int32& fileSize, int32& format, int32& frame_type) +int32 bitstreamObject::getFileInfo(int32& fileSize, int32& format, int32& frame_type, int8& channel) { fileSize = format = 0; int32 ret_value = bitstreamObject::EVERYTHING_OK; @@ -396,6 +401,7 @@ int32 bitstreamObject::getFileInfo(int32& fileSize, int32& format, int32& frame_ fileSize = iFileSize; format = iAmrFormat; frame_type = iFrame_type; + channel = iAmrChannel; return ret_value; } @@ -458,6 +464,7 @@ OSCL_EXPORT_REF CAMRFileParser::CAMRFileParser(void) iEndOfFileReached = false; iRandomAccessTimeInterval = 0; iCountToClaculateRDATimeInterval = 0; + iAMRChannel = 0; iLogger = PVLogger::GetLoggerObject("pvamr_parser"); iDiagnosticLogger = PVLogger::GetLoggerObject("playerdiagnostics.pvamr_parser"); @@ -560,7 +567,7 @@ OSCL_EXPORT_REF bool CAMRFileParser::InitAMRFile(OSCL_wString& aClip, bool aInit // get file info int32 frameTypeIndex = 0; - if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex)) + if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex, iAMRChannel)) { PVMF_AMRPARSER_LOGERROR((0, "CAMRFileParser::InitAMRFile- getFileInfo failed ")); return false; @@ -730,6 +737,7 @@ OSCL_EXPORT_REF bool CAMRFileParser::RetrieveFileInfo(TPVAmrFileInfo& aInfo) aInfo.iDuration = iAMRDuration; aInfo.iFileSize = iAMRFileSize; aInfo.iAmrFormat = iAMRFormat; + aInfo.iChannel = iAMRChannel; PVMF_AMRPARSER_LOGDIAGNOSTICS((0, "CAMRFileParser::RetrieveFileInfo- duration = %d, bitrate = %d, filesize = %d", iAMRDuration, iAMRBitRate, iAMRFileSize)); return true; @@ -923,7 +931,7 @@ OSCL_EXPORT_REF int32 CAMRFileParser::ResetPlayback(int32 aStartTime) if (iAMRFileSize <= 0) { int32 frameTypeIndex; - if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex)) + if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex, iAMRChannel)) { PVMF_AMRPARSER_LOGERROR((0, "CAMRFileParser::Reset Playback Failed")); return bitstreamObject::MISC_ERROR; @@ -1017,7 +1025,7 @@ OSCL_EXPORT_REF uint32 CAMRFileParser::SeekPointFromTimestamp(uint32 aStartTime) if (iAMRFileSize <= 0) { int32 frameTypeIndex; - if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex)) + if (ipBSO->getFileInfo(iAMRFileSize, iAMRFormat, frameTypeIndex, iAMRChannel)) { return 0; } diff --git a/nodes/pvaacffparsernode/include/pvmf_aacffparser_defs.h b/nodes/pvaacffparsernode/include/pvmf_aacffparser_defs.h index d258cafef..56ab8e876 100644 --- a/nodes/pvaacffparsernode/include/pvmf_aacffparser_defs.h +++ b/nodes/pvaacffparsernode/include/pvmf_aacffparser_defs.h @@ -70,6 +70,8 @@ static const char PVAACMETADATA_FORMATID3V11[] = "format=id3v1.1"; static const char PVAACMETADATA_TIMESCALE1000[] = ";timescale=1000"; static const char PVAACMETADATA_INDEX0[] = "index=0"; static const char PVAACMETADATA_RANDOM_ACCESS_DENIED_KEY[] = "random-access-denied"; +static const char PVAACMETADATA_CHANNELS_KEY[] = "channels"; +static const char PVAACMETADATA_PROFILE_KEY[] = "profile"; static const char PVAACMETADATA_UNKNOWN[] = "unknown"; #define PVMF_AAC_PARSER_NODE_MAX_AUDIO_DATA_MEM_POOL_SIZE 64*1024 diff --git a/nodes/pvaacffparsernode/src/pvmf_aacffparser_node.cpp b/nodes/pvaacffparsernode/src/pvmf_aacffparser_node.cpp index 0f902fb66..9ec16e257 100644 --- a/nodes/pvaacffparsernode/src/pvmf_aacffparser_node.cpp +++ b/nodes/pvaacffparsernode/src/pvmf_aacffparser_node.cpp @@ -215,6 +215,20 @@ uint32 PVMFAACFFParserNode::GetNumMetadataValues(PVMFMetadataList& aKeyList) // Increment the counter for the number of values found so far ++numvalentries; } + else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_PROFILE_KEY) && + iAACFileInfo.iProfile > 0) + { + // Profile + // Increment the counter for the number of values found so far + ++numvalentries; + } + else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_CHANNELS_KEY) && + iAACFileInfo.iChannels > 0) + { + // Channels + // Increment the counter for the number of values found so far + ++numvalentries; + } else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_RANDOM_ACCESS_DENIED_KEY)) { // random-acess-denied @@ -807,6 +821,11 @@ PVMFStatus PVMFAACFFParserNode::ParseAACFile() leavecode = 0; OSCL_TRY(leavecode, iAvailableMetadataKeys.push_back(PVAACMETADATA_RANDOM_ACCESS_DENIED_KEY)); + leavecode = 0; + OSCL_TRY(leavecode, iAvailableMetadataKeys.push_back(PVAACMETADATA_CHANNELS_KEY)); + + leavecode = 0; + OSCL_TRY(leavecode, iAvailableMetadataKeys.push_back(PVAACMETADATA_PROFILE_KEY)); if (iAACFileInfo.iBitrate > 0) { @@ -1793,6 +1812,76 @@ PVMFStatus PVMFAACFFParserNode::DoGetMetadataValues() } } + else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_CHANNELS_KEY)) + { + // Channels + // Increment the counter for the number of values found so far + ++numvalentries; + + // Create a value entry if past the starting index + if (numvalentries > starting_index) + { + uint32 channels = (uint32)iAACFileInfo.iChannels; + PVMFStatus retval = PVMFSuccess; + if (channels > 0) + { + retval = PVMFCreateKVPUtils::CreateKVPForUInt32Value( + KeyVal, + PVAACMETADATA_CHANNELS_KEY, + channels, + NULL); + } + else + { + retval = PVMFCreateKVPUtils::CreateKVPForCharStringValue( + KeyVal, + PVAACMETADATA_CHANNELS_KEY, + PVAACMETADATA_UNKNOWN); + } + + if (retval != PVMFSuccess && retval != PVMFErrArgument) + { + break; + } + + } + + } + else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_PROFILE_KEY)) + { + // Profile + // Increment the counter for the number of values found so far + ++numvalentries; + + // Create a value entry if past the starting index + if (numvalentries > starting_index) + { + uint32 profile = (uint32)iAACFileInfo.iProfile; + PVMFStatus retval = PVMFSuccess; + if (profile > 0) + { + retval = PVMFCreateKVPUtils::CreateKVPForUInt32Value( + KeyVal, + PVAACMETADATA_PROFILE_KEY, + profile, + NULL); + } + else + { + retval = PVMFCreateKVPUtils::CreateKVPForCharStringValue( + KeyVal, + PVAACMETADATA_PROFILE_KEY, + PVAACMETADATA_UNKNOWN); + } + + if (retval != PVMFSuccess && retval != PVMFErrArgument) + { + break; + } + + } + + } else if (!oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAACMETADATA_RANDOM_ACCESS_DENIED_KEY)) { /* diff --git a/nodes/pvamrffparsernode/src/pvmf_amrffparser_node.cpp b/nodes/pvamrffparsernode/src/pvmf_amrffparser_node.cpp index f0661b021..f49e733ac 100644 --- a/nodes/pvamrffparsernode/src/pvmf_amrffparser_node.cpp +++ b/nodes/pvamrffparsernode/src/pvmf_amrffparser_node.cpp @@ -33,6 +33,7 @@ static const char PVAMRMETADATA_NUMTRACKS_KEY[] = "num-tracks"; static const char PVAMRMETADATA_TRACKINFO_BITRATE_KEY[] = "track-info/bit-rate"; static const char PVAMRMETADATA_TRACKINFO_SELECTED_KEY[] = "track-info/selected"; static const char PVAMRMETADATA_TRACKINFO_AUDIO_FORMAT_KEY[] = "track-info/audio/format"; +static const char PVAMRMETADATA_CHANNEL_KEY[] = "channel"; static const char PVAMRMETADATA_CLIP_TYPE_KEY[] = "clip-type"; static const char PVAMRMETADATA_LOCAL_CLIP_TYPE_KEY[] = "local"; static const char PVAMRMETADATA_RANDOM_ACCESS_DENIED_KEY[] = "random-access-denied"; @@ -347,6 +348,29 @@ PVMFStatus PVMFAMRFFParserNode::DoGetNodeMetadataValues() } } + + else if ((oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAMRMETADATA_CHANNEL_KEY) == 0) && iAMRFileInfo.iChannel > 0) + { + // Channel + // Increment the counter for the number of values found so far + ++numvalentries; + int32 retval = 0; + // Create a value entry if past the starting index + if (numvalentries > starting_index) + { + char indexparam[16]; + oscl_snprintf(indexparam, 16, ";%s" , PVAMRMETADATA_INDEX0); + indexparam[15] = '\0'; + uint32 channel = iAMRFileInfo.iChannel; + retval = PVMFCreateKVPUtils::CreateKVPForUInt32Value(KeyVal, PVAMRMETADATA_CHANNEL_KEY, channel); + } + if (retval != PVMFSuccess && retval != PVMFErrArgument) + { + break; + } + } + + else if ((oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAMRMETADATA_TRACKINFO_SELECTED_KEY) == 0)) { // Increment the counter for the number of values found so far @@ -1546,6 +1570,12 @@ uint32 PVMFAMRFFParserNode::GetNumMetadataValues(PVMFMetadataList& aKeyList) // Format ++numvalentries; } + else if ((oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAMRMETADATA_CHANNEL_KEY) == 0) && + iAMRFileInfo.iChannel > 0) + { + // Number of Channels + ++numvalentries; + } else if (oscl_strcmp((*keylistptr)[lcv].get_cstr(), PVAMRMETADATA_RANDOM_ACCESS_DENIED_KEY) == 0) { /* @@ -1838,6 +1868,11 @@ PVMFStatus PVMFAMRFFParserNode::InitMetaData() if (iAMRFileInfo.iFileSize > 0) { // Populate the metadata key vector based on info available + if (iAMRFileInfo.iChannel > 0) + { + PushToAvailableMetadataKeysList(PVAMRMETADATA_CHANNEL_KEY); + + } PushToAvailableMetadataKeysList(PVAMRMETADATA_NUMTRACKS_KEY); if (iAMRFileInfo.iDuration > 0) { |