430 |
430 |
431 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration); |
431 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration); |
432 } |
432 } |
433 break; |
433 break; |
434 } |
434 } |
|
435 case EMetaDataSampleRate: |
|
436 { |
|
437 const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); |
|
438 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType); |
|
439 |
|
440 // Verify if WMA, get the sample rate |
|
441 if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) |
|
442 { |
|
443 MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA"); |
|
444 |
|
445 // Perform the sample rate conversion |
|
446 TLex lexer( *value ); |
|
447 TInt32 sampleRate ( 0 ); |
|
448 lexer.Val( sampleRate ); |
|
449 |
|
450 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate, |
|
451 sampleRate ); |
|
452 |
|
453 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- sample rate = %i", sampleRate); |
|
454 } |
|
455 break; |
|
456 } |
|
457 case EMetaDataBitRate: |
|
458 { |
|
459 const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); |
|
460 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL, mimeType = %S", &mimeType); |
|
461 |
|
462 // Verify if WMA, get the duration |
|
463 if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) |
|
464 { |
|
465 MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA"); |
|
466 |
|
467 // Perform the duration conversion |
|
468 TLex lexer( *value ); |
|
469 TInt32 bitRate ( 0 ); |
|
470 lexer.Val( bitRate ); |
|
471 |
|
472 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate, |
|
473 bitRate ); |
|
474 |
|
475 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate); |
|
476 } |
|
477 break; |
|
478 } |
435 case EMetaDataOriginalArtist: // fall through |
479 case EMetaDataOriginalArtist: // fall through |
436 case EMetaDataVendor: // fall through |
480 case EMetaDataVendor: // fall through |
437 case EMetaDataRating: // fall through |
481 case EMetaDataRating: // fall through |
438 case EMetaDataUniqueFileIdentifier: // fall through |
482 case EMetaDataUniqueFileIdentifier: // fall through |
439 case EMetaDataDate: // fall through |
483 case EMetaDataDate: // fall through |