249 aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtFileName, |
249 aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtFileName, |
250 KNullDesC ); |
250 KNullDesC ); |
251 // URL |
251 // URL |
252 aMediaProp.SetTextValueL( KMPXMediaMusicURL, |
252 aMediaProp.SetTextValueL( KMPXMediaMusicURL, |
253 KNullDesC ); |
253 KNullDesC ); |
|
254 // AlbumArtist |
|
255 aMediaProp.SetTextValueL( KMPXMediaMusicAlbumArtist, |
|
256 KNullDesC ); |
|
257 |
254 } |
258 } |
255 |
259 |
256 // --------------------------------------------------------------------------- |
260 // --------------------------------------------------------------------------- |
257 // Sets media object attributes from metadata utilities |
261 // Sets media object attributes from metadata utilities |
258 // --------------------------------------------------------------------------- |
262 // --------------------------------------------------------------------------- |
468 |
472 |
469 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate, |
473 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate, |
470 bitRate ); |
474 bitRate ); |
471 |
475 |
472 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate); |
476 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", bitRate); |
|
477 } |
|
478 break; |
|
479 } |
|
480 case EMetaDataAlbumArtist: |
|
481 { |
|
482 TPtr valptr = value->Des(); |
|
483 valptr.Trim(); |
|
484 TInt vallen = value->Length(); |
|
485 if (vallen>0) |
|
486 { |
|
487 FindAndReplaceForbiddenChars(valptr, vallen); |
|
488 iMedia->SetTextValueL(KMPXMediaMusicAlbumArtist, *value); |
473 } |
489 } |
474 break; |
490 break; |
475 } |
491 } |
476 case EMetaDataOriginalArtist: // fall through |
492 case EMetaDataOriginalArtist: // fall through |
477 case EMetaDataVendor: // fall through |
493 case EMetaDataVendor: // fall through |
921 } |
937 } |
922 else // other case use apparc to fetch and set mimetype |
938 else // other case use apparc to fetch and set mimetype |
923 { |
939 { |
924 TDataType dataType; |
940 TDataType dataType; |
925 TUid dummyUid(KNullUid); |
941 TUid dummyUid(KNullUid); |
926 iAppArc.AppForDocument(iFileName, dummyUid, dataType); |
942 // File handle based mime type recogniton required , because AppArc does |
|
943 // not have All Files capa required for files in private folders |
|
944 TDataRecognitionResult result; |
|
945 RFs fs; |
|
946 RFile rFile; |
|
947 User::LeaveIfError(fs.Connect()); |
|
948 CleanupClosePushL(fs); |
|
949 User::LeaveIfError(fs.ShareProtected()); |
|
950 User::LeaveIfError(rFile.Open(fs, iFileName, EFileShareReadersOrWriters)); |
|
951 CleanupClosePushL(rFile); |
|
952 User::LeaveIfError(iAppArc.RecognizeData(rFile, result)); |
|
953 CleanupStack::PopAndDestroy(&rFile); |
|
954 CleanupStack::PopAndDestroy(&fs); |
|
955 dataType = result.iDataType; |
927 iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() ); |
956 iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() ); |
928 } |
957 } |
929 |
958 |
930 // Initially set default tags. |
959 // Initially set default tags. |
931 SetDefaultL( *iMedia ); |
960 SetDefaultL( *iMedia ); |