diff -r b034b1c214c2 -r e42293e811d8 mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp --- a/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Thu Jul 15 19:11:42 2010 +0300 +++ b/mmappcomponents/harvester/metadataextractor/src/mpxmetadataextractor.cpp Thu Aug 19 10:24:28 2010 +0300 @@ -12,7 +12,7 @@ * Contributors: * * Description: Extracts metadata from a file -* Version : %version: da1mmcf#38.1.4.2.6.1.14 % << Don't touch! Updated by Synergy at check-out. +* Version : %version: da1mmcf#38.1.4.2.6.1.15 % << Don't touch! Updated by Synergy at check-out. * */ @@ -432,6 +432,50 @@ } break; } + case EMetaDataSampleRate: + { + const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); + MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType); + + // Verify if WMA, get the sample rate + if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) + { + MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA"); + + // Perform the sample rate conversion + TLex lexer( *value ); + TInt32 sampleRate ( 0 ); + lexer.Val( sampleRate ); + + iMedia->SetTObjectValueL( KMPXMediaAudioSamplerate, + sampleRate ); + + MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- sample rate = %i", sampleRate); + } + break; + } + case EMetaDataBitRate: + { + const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); + MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType); + + // Verify if WMA, get the duration + if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) + { + MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA"); + + // Perform the duration conversion + TLex lexer( *value ); + TInt32 bitRate ( 0 ); + lexer.Val( bitRate ); + + iMedia->SetTObjectValueL( KMPXMediaAudioBitrate, + bitRate ); + + MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate); + } + break; + } case EMetaDataOriginalArtist: // fall through case EMetaDataVendor: // fall through case EMetaDataRating: // fall through