133 CMPXMetadataExtractor::~CMPXMetadataExtractor() |
143 CMPXMetadataExtractor::~CMPXMetadataExtractor() |
134 { |
144 { |
135 delete iMetadataUtility; |
145 delete iMetadataUtility; |
136 delete iFileInfoUtil; |
146 delete iFileInfoUtil; |
137 delete iDrmMediaUtility; |
147 delete iDrmMediaUtility; |
|
148 delete iTaskTimer; |
|
149 iFile.Close(); |
138 #ifdef RD_MPX_TNM_INTEGRATION |
150 #ifdef RD_MPX_TNM_INTEGRATION |
139 delete iTNManager; |
151 delete iTNManager; |
140 if (iTNSyncWait && iTNSyncWait->IsStarted() ) |
152 if (iTNSyncWait && iTNSyncWait->IsStarted() ) |
141 { |
153 { |
142 iTNSyncWait->AsyncStop(); |
154 iTNSyncWait->AsyncStop(); |
143 } |
155 } |
144 delete iTNSyncWait; |
156 delete iTNSyncWait; |
145 delete iTimer; |
157 delete iTimer; |
|
158 iArrayTNRequestId.Close(); |
|
159 iArrayTasks.Close(); |
146 #endif //RD_MPX_TNM_INTEGRATION |
160 #endif //RD_MPX_TNM_INTEGRATION |
147 |
161 } |
148 MPX_DEBUG2("CMPXMetadataExtractor: TNM Block Count: %d ", iTNMBlockCount ); |
162 |
149 } |
163 // --------------------------------------------------------------------------- |
150 |
164 // Constructs a media properties object : synchronous function |
151 // --------------------------------------------------------------------------- |
|
152 // Constructs a media properties object |
|
153 // --------------------------------------------------------------------------- |
165 // --------------------------------------------------------------------------- |
154 // |
166 // |
155 EXPORT_C void CMPXMetadataExtractor::CreateMediaL( const TDesC& aFile, |
167 EXPORT_C void CMPXMetadataExtractor::CreateMediaL( const TDesC& aFile, |
156 CMPXMedia*& aNewProperty, |
168 CMPXMedia*& aNewProperty, |
157 TBool aMetadataOnly ) |
169 TBool aMetadataOnly ) |
158 { |
170 { |
159 // make a copy of aFile |
171 MPX_FUNC("CMPXMetadataExtractor::CreateMediaL()"); |
160 HBufC* fileName = HBufC::NewL(KMaxFileName); |
172 // check if we are still processing a request. |
161 CleanupStack::PushL( fileName ); |
173 if ( iArrayTasks.Count() ) |
162 fileName->Des().Append( aFile ); |
174 { |
163 MPX_DEBUG2("CMPXMetadataExtractor::CreateMediaL %S <---", fileName ); |
175 MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaL Request ongoing. Abort!" ); |
164 |
176 User::Leave( KErrAbort ); |
165 RArray<TInt> contentIDs; |
177 } |
166 contentIDs.AppendL( KMPXMediaIdGeneral ); |
178 |
167 contentIDs.AppendL( KMPXMediaIdAudio ); |
179 iCancelled = EFalse; |
168 contentIDs.AppendL( KMPXMediaIdMusic ); |
180 iFileOpenError = KErrNone; |
169 contentIDs.AppendL( KMPXMediaIdDrm ); |
181 iObs = NULL; |
170 contentIDs.AppendL( KMPXMediaIdMTP ); |
|
171 aNewProperty = NULL; |
182 aNewProperty = NULL; |
172 CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() ); |
183 iFileName = aFile; |
173 CleanupStack::PushL( media ); |
184 iMetadataOnly = aMetadataOnly; |
174 contentIDs.Close(); |
185 |
175 |
186 // populate the task array |
176 // CMPXMedia default types |
187 AddTasksL(); |
177 |
188 |
178 media->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, |
189 // execute all tasks in the array |
179 EMPXItem ); |
190 while ( iArrayTasks.Count() ) |
180 media->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory, |
191 { |
181 EMPXSong ); |
192 // execute task at index 0 |
182 |
193 TRAPD( error, ExecuteTaskL() ); |
183 TParsePtrC parse( *fileName ); |
194 if ( error || iCancelled ) |
184 |
195 { |
185 // Title, default is file name |
196 // cleanup |
186 media->SetTextValueL( KMPXMediaGeneralTitle, |
197 if ( iMedia != NULL ) |
187 parse.Name() ); |
198 { |
188 |
199 delete iMedia; |
189 // Default album track |
200 iMedia = NULL; |
190 media->SetTextValueL( KMPXMediaMusicAlbumTrack, |
201 } |
191 KNullDesC ); |
202 iArrayTasks.Reset(); |
192 |
203 if ( error ) |
193 // Set the Mime Type and collection UID |
204 { |
194 // |
205 CleanUp(); |
195 if( !aMetadataOnly ) |
206 User::LeaveIfError( error ); |
196 { |
207 } |
197 TInt index(KErrNotFound); |
208 break; |
198 TInt count( iSupportedTypes.Count() ); |
209 } |
199 for (TInt i=0; i <count; ++i) |
|
200 { |
|
201 TInt index2(KErrNotFound); |
|
202 const CDesCArray& exts = iSupportedTypes[i]->Extensions(); |
|
203 const TDesC& ext = parse.Ext(); |
|
204 if (!exts.FindIsq(ext, index2)) |
|
205 { // found |
|
206 index = i; |
|
207 break; |
|
208 } |
|
209 } |
|
210 if( KErrNotFound != index ) |
|
211 { |
|
212 MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL apparc <---" ); |
|
213 TInt mimeIndex = SupportedContainerTypeL( *fileName, index ); |
|
214 User::LeaveIfError( mimeIndex ); |
|
215 MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL apparc --->" ); |
|
216 |
|
217 media->SetTextValueL( KMPXMediaGeneralMimeType, |
|
218 iSupportedTypes[index]->Mimetypes()[mimeIndex] ); |
|
219 |
|
220 media->SetTObjectValueL( KMPXMediaGeneralCollectionId, |
|
221 iSupportedTypes[index]->Uid() ); |
|
222 } |
|
223 else |
|
224 { |
|
225 User::Leave(KErrNotSupported); |
|
226 } |
|
227 } |
|
228 else // other case use apparc to fetch and set mimetype |
|
229 { |
|
230 TDataType dataType; |
|
231 TUid dummyUid(KNullUid); |
|
232 iAppArc.AppForDocument(*fileName, dummyUid, dataType); |
|
233 media->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() ); |
|
234 } |
|
235 |
210 |
236 // Use file handle here |
211 iArrayTasks.Remove( 0 ); |
237 // |
212 } |
238 RFile file; |
213 |
239 TInt err = file.Open( iFs, *fileName, EFileRead | EFileShareReadersOrWriters ); |
214 aNewProperty = iMedia; |
240 CleanupClosePushL(file); |
215 CleanUp(); |
241 |
|
242 // Metadata related |
|
243 // |
|
244 if( err == KErrNone ) |
|
245 { |
|
246 const TDesC& mimeType = media->ValueText( KMPXMediaGeneralMimeType ); |
|
247 HBufC8* mimeType8 = HBufC8::NewLC( mimeType.Length() ); |
|
248 mimeType8->Des().Append( mimeType ); |
|
249 TRAPD( metadataerror, iMetadataUtility->OpenFileL( file, *mimeType8 ) ); |
|
250 CleanupStack::PopAndDestroy( mimeType8 ); |
|
251 |
|
252 // No problem |
|
253 if( KErrNone == metadataerror ) |
|
254 { |
|
255 // Add TRAPD to capture exception KErrNoMemory. |
|
256 //If album art size is too large, trap this exception and SetDefaultL. |
|
257 //Fix EYLU-7ESE5L |
|
258 TRAPD( err, SetMediaPropertiesL( *media, *fileName ) ); |
|
259 if ( KErrNoMemory == err ) |
|
260 { |
|
261 SetDefaultL( *media ); |
|
262 } |
|
263 } |
|
264 else // Error, Set defaults |
|
265 { |
|
266 SetDefaultL( *media ); |
|
267 } |
|
268 |
|
269 // Reset the utility |
|
270 iMetadataUtility->ResetL(); |
|
271 } |
|
272 else // Error, Set defaults |
|
273 { |
|
274 SetDefaultL( *media ); |
|
275 } |
|
276 |
|
277 // Common properties that we can extract |
|
278 // |
|
279 SetExtMediaPropertiesL( *media, *fileName, aMetadataOnly, file, err ); |
|
280 CleanupStack::PopAndDestroy(&file); |
|
281 |
|
282 // Set the pointers now that the object is ready |
|
283 // |
|
284 CleanupStack::Pop( media ); |
|
285 aNewProperty = media; |
|
286 |
|
287 CleanupStack::PopAndDestroy( fileName ); |
|
288 MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaPropertiesL --->"); |
|
289 } |
216 } |
290 |
217 |
291 // --------------------------------------------------------------------------- |
218 // --------------------------------------------------------------------------- |
292 // Sets all of the default media properties |
219 // Sets all of the default media properties |
293 // --------------------------------------------------------------------------- |
220 // --------------------------------------------------------------------------- |
294 // |
221 // |
295 void CMPXMetadataExtractor::SetDefaultL( CMPXMedia& aMediaProp ) |
222 void CMPXMetadataExtractor::SetDefaultL( CMPXMedia& aMediaProp ) |
296 { |
223 { |
|
224 MPX_FUNC("CMPXMetadataExtractor::SetDefaultL()"); |
297 // Comment |
225 // Comment |
298 aMediaProp.SetTextValueL( KMPXMediaGeneralComment, |
226 aMediaProp.SetTextValueL( KMPXMediaGeneralComment, |
299 KNullDesC ); |
227 KNullDesC ); |
300 // Artist |
228 // Artist |
301 aMediaProp.SetTextValueL( KMPXMediaMusicArtist, |
229 aMediaProp.SetTextValueL( KMPXMediaMusicArtist, |
438 valptr.Trim(); |
373 valptr.Trim(); |
439 TInt vallen = value->Length(); |
374 TInt vallen = value->Length(); |
440 if (vallen>0) |
375 if (vallen>0) |
441 { |
376 { |
442 FindAndReplaceForbiddenChars(valptr, vallen); |
377 FindAndReplaceForbiddenChars(valptr, vallen); |
443 aMedia.SetTextValueL(KMPXMediaMusicComposer, *value); |
378 iMedia->SetTextValueL(KMPXMediaMusicComposer, *value); |
444 } |
379 } |
445 break; |
380 break; |
446 } |
381 } |
447 case EMetaDataUrl: |
382 case EMetaDataUrl: |
448 case EMetaDataUserUrl: // fall through |
383 case EMetaDataUserUrl: // fall through |
449 { |
384 { |
450 aMedia.SetTextValueL( KMPXMediaMusicURL, |
385 iMedia->SetTextValueL( KMPXMediaMusicURL, |
451 *value ); |
386 *value ); |
452 break; |
387 break; |
453 } |
388 } |
454 case EMetaDataJpeg: |
389 case EMetaDataJpeg: |
455 { |
390 { |
456 #ifdef RD_MPX_TNM_INTEGRATION |
391 // Album art handled in AddMediaAlbumArtL() |
457 MPX_PERF_START(CMPXMetadataExtractor_SetMediaPropertiesL_JPEG_TNM); |
392 break; |
458 TPtrC8 ptr8 = metaCont.Field8( EMetaDataJpeg ); |
393 } |
459 HBufC8* value8; |
394 case EMetaDataCopyright: |
460 TRAPD( err, value8 = ptr8.AllocL() ); |
395 { |
461 if ( KErrNone != err ) |
396 iMedia->SetTextValueL( KMPXMediaGeneralCopyright, |
|
397 *value ); |
|
398 break; |
|
399 } |
|
400 case EMetaDataDuration: |
|
401 { |
|
402 const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); |
|
403 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, mimeType = %S", &mimeType); |
|
404 |
|
405 // Verify if WMA, get the duration |
|
406 if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) |
462 { |
407 { |
463 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL - error jpeg = %i", err); |
408 MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL- WMA"); |
464 User::Leave( err ); |
409 |
465 } |
410 // Perform the duration conversion |
466 CleanupStack::PushL( value8 ); |
411 TLex lexer( *value ); |
467 AddMediaAlbumArtL( aMedia, aFile, *value8 ); |
412 TInt32 duration ( 0 ); |
468 CleanupStack::Pop(value8); |
413 lexer.Val( duration ); // [second] |
469 MPX_PERF_END(CMPXMetadataExtractor_SetMediaPropertiesL_JPEG_TNM); |
414 duration *= 1000; // [msec] |
470 #else //RD_MPX_TNM_INTEGRATION |
415 |
471 aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, |
416 iMedia->SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration, |
472 aFile ); |
417 duration ); |
473 #endif //RD_MPX_TNM_INTEGRATION |
418 |
474 break; |
419 MPX_DEBUG2("CMPXMetadataExtractor::SetMediaPropertiesL- duration = %i", duration); |
475 } |
420 } |
476 case EMetaDataCopyright: |
|
477 { |
|
478 aMedia.SetTextValueL( KMPXMediaGeneralCopyright, |
|
479 *value ); |
|
480 break; |
421 break; |
481 } |
422 } |
482 case EMetaDataOriginalArtist: // fall through |
423 case EMetaDataOriginalArtist: // fall through |
483 case EMetaDataVendor: // fall through |
424 case EMetaDataVendor: // fall through |
484 case EMetaDataRating: // fall through |
425 case EMetaDataRating: // fall through |
485 case EMetaDataUniqueFileIdentifier: // fall through |
426 case EMetaDataUniqueFileIdentifier: // fall through |
486 case EMetaDataDuration: // fall through |
|
487 case EMetaDataDate: // fall through |
427 case EMetaDataDate: // fall through |
488 { |
428 { |
489 // not used |
429 // not used |
490 break; |
430 break; |
491 } |
431 } |
498 if (fieldType != EMetaDataJpeg) |
438 if (fieldType != EMetaDataJpeg) |
499 { |
439 { |
500 CleanupStack::PopAndDestroy( value ); |
440 CleanupStack::PopAndDestroy( value ); |
501 } |
441 } |
502 } |
442 } |
503 |
|
504 MPX_DEBUG1("CMPXMetadataExtractor::SetMediaPropertiesL --->" ); |
|
505 } |
443 } |
506 |
444 |
507 // --------------------------------------------------------------------------- |
445 // --------------------------------------------------------------------------- |
508 // Sets extra media properties not returned by metadata utilities |
446 // Sets extra media properties not returned by metadata utilities |
509 // --------------------------------------------------------------------------- |
447 // --------------------------------------------------------------------------- |
510 // |
448 // |
511 void CMPXMetadataExtractor::SetExtMediaPropertiesL( CMPXMedia& aProp, |
449 void CMPXMetadataExtractor::SetExtMediaPropertiesL() |
512 const TDesC& aFile, |
450 { |
513 TBool aMetadataOnly, |
451 MPX_FUNC("CMPXMetadataExtractor::SetExtMediaPropertiesL()"); |
514 RFile& aFileHandle, |
|
515 TInt aFileErr ) |
|
516 { |
|
517 MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL <---"); |
|
518 |
452 |
519 // DB Flags to set |
453 // DB Flags to set |
520 // |
454 // |
521 TUint dbFlags(KMPXMediaGeneralFlagsSetOrUnsetBit); |
455 TUint dbFlags(KMPXMediaGeneralFlagsSetOrUnsetBit); |
522 |
456 |
523 // File Path |
457 // File Path |
524 // |
458 // |
525 TParsePtrC parse( aFile ); |
459 TParsePtrC parse( iFileName ); |
526 aProp.SetTextValueL( KMPXMediaGeneralUri, |
460 iMedia->SetTextValueL( KMPXMediaGeneralUri, iFileName ); |
527 aFile ); |
461 iMedia->SetTextValueL( KMPXMediaGeneralDrive, parse.Drive() ); |
528 aProp.SetTextValueL( KMPXMediaGeneralDrive, |
|
529 parse.Drive() ); |
|
530 |
462 |
531 // DRM Rights |
463 // DRM Rights |
532 // |
464 // |
533 CMPXMedia* drm = NULL; |
465 CMPXMedia* drm = NULL; |
534 TRAPD( drmError, iDrmMediaUtility->InitL( aFile ); |
466 TRAPD( drmError, iDrmMediaUtility->InitL( iFileName ); |
535 drm = CMPXMedia::NewL( *iDrmMediaUtility->GetMediaL( KMPXMediaDrmProtected.iAttributeId | |
467 drm = CMPXMedia::NewL( *iDrmMediaUtility->GetMediaL( KMPXMediaDrmProtected.iAttributeId | |
536 KMPXMediaDrmRightsStatus.iAttributeId ) ); |
468 KMPXMediaDrmRightsStatus.iAttributeId ) ); |
537 ); |
469 ); |
538 |
470 |
539 TBool prot(EFalse); |
471 TBool prot(EFalse); |
540 if( drm ) |
472 if( drm ) |
541 { |
473 { |
573 else |
505 else |
574 { |
506 { |
575 User::LeaveIfError( drmError ); |
507 User::LeaveIfError( drmError ); |
576 } |
508 } |
577 |
509 |
578 aProp.SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot ); |
510 iMedia->SetTObjectValueL<TBool>( KMPXMediaDrmProtected, prot ); |
579 aProp.SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot ); |
511 iMedia->SetTObjectValueL<TUint16>( KMPXMediaMTPDrmStatus, (TUint16)prot ); |
580 |
512 |
581 iDrmMediaUtility->Close(); |
513 iDrmMediaUtility->Close(); |
582 |
514 |
583 // File Size |
515 // |
|
516 // File Size --- The following needs MMF support |
584 // |
517 // |
585 TInt size( 0 ); |
518 TInt size( 0 ); |
586 if( aFileErr == KErrNone ) |
519 if( iFileOpenError == KErrNone ) |
587 { |
520 { |
588 aFileHandle.Size( size ); |
521 const TDesC& mimeType = iMedia->ValueText( KMPXMediaGeneralMimeType ); |
589 aProp.SetTObjectValueL<TInt>( KMPXMediaGeneralSize, |
522 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, mimeType = %S", &mimeType); |
590 size ); |
523 |
591 |
524 // Verify if WMA, skip getting info from MMF |
592 // Duration, bitrate, samplerate, etc |
525 if( mimeType.Compare(KWmaMimeType) == 0 || mimeType.Compare(KWmaCafMimeType) == 0 ) |
593 // |
526 { |
594 if( !aMetadataOnly ) |
527 // No need to get MMF support |
595 { |
528 MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, skip MMF "); |
596 TRAPD(err2, iFileInfoUtil->OpenFileL( |
529 } |
597 aFileHandle, |
530 else |
598 aProp.ValueText(KMPXMediaGeneralMimeType))); |
531 { |
599 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, file info util error %i", err2); |
532 MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL, get MMF controller"); |
600 if( KErrNone == err2 ) |
533 iFile.Size( size ); |
601 { |
534 iMedia->SetTObjectValueL<TInt>( KMPXMediaGeneralSize, size ); |
602 aProp.SetTObjectValueL<TUint>( KMPXMediaAudioBitrate, |
535 |
603 iFileInfoUtil->BitRate() ); |
536 // Duration, bitrate, samplerate, etc |
604 aProp.SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate, |
537 // |
605 iFileInfoUtil->SampleRate() ); |
538 if( !iMetadataOnly ) |
606 TInt64 duration = (TInt64) iFileInfoUtil->Duration().Int64() / 1000; // ms |
539 { |
607 aProp.SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration, |
540 TRAPD(err2, iFileInfoUtil->OpenFileL( |
608 duration ); |
541 iFile, |
609 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- duration %i", duration); |
542 iMedia->ValueText(KMPXMediaGeneralMimeType))); |
610 } |
543 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL, file info util error %i", err2); |
611 } |
544 if( KErrNone == err2 ) |
612 } |
545 { |
613 else if( aFileErr == KErrNotFound || aFileErr == KErrPathNotFound ) |
546 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioBitrate, |
|
547 iFileInfoUtil->BitRate() ); |
|
548 iMedia->SetTObjectValueL<TUint>( KMPXMediaAudioSamplerate, |
|
549 iFileInfoUtil->SampleRate() ); |
|
550 TInt64 duration = (TInt64) iFileInfoUtil->Duration().Int64() / 1000; // ms |
|
551 iMedia->SetTObjectValueL<TInt32>( KMPXMediaGeneralDuration, |
|
552 duration ); |
|
553 |
|
554 MPX_DEBUG2("CMPXMetadataExtractor::SetExtMediaPropertiesL -- duration %i", duration); |
|
555 } |
|
556 |
|
557 iFileInfoUtil->Reset(); |
|
558 } |
|
559 } |
|
560 } |
|
561 else if( iFileOpenError == KErrNotFound || iFileOpenError == KErrPathNotFound ) |
614 { |
562 { |
615 dbFlags |= KMPXMediaGeneralFlagsIsInvalid; |
563 dbFlags |= KMPXMediaGeneralFlagsIsInvalid; |
616 } |
564 } |
617 // Finally set the db flag |
565 // Finally set the db flag |
618 // |
566 // |
619 aProp.SetTObjectValueL( KMPXMediaGeneralFlags, |
567 iMedia->SetTObjectValueL( KMPXMediaGeneralFlags, |
620 dbFlags ); |
568 dbFlags ); |
621 |
|
622 iFileInfoUtil->Reset(); |
|
623 |
|
624 MPX_DEBUG1("CMPXMetadataExtractor::SetExtMediaPropertiesL --->"); |
|
625 } |
569 } |
626 |
570 |
627 // --------------------------------------------------------------------------- |
571 // --------------------------------------------------------------------------- |
628 // Check to see if this file is a supported container |
572 // Check to see if this file is a supported container |
629 // --------------------------------------------------------------------------- |
573 // --------------------------------------------------------------------------- |
630 // |
574 // |
631 TInt CMPXMetadataExtractor::SupportedContainerTypeL( const TDesC& aFile, |
575 TInt CMPXMetadataExtractor::SupportedContainerTypeL( const TDesC& aFile, |
632 TInt aIndex ) |
576 TInt aIndex ) |
633 { |
577 { |
|
578 MPX_FUNC("CMPXMetadataExtractor::SupportedContainerTypeL()"); |
634 TInt index(KErrNotFound); |
579 TInt index(KErrNotFound); |
635 |
580 |
636 TDataType dataType; |
581 TDataType dataType; |
637 TUid dummyUid(KNullUid); |
582 TUid dummyUid(KNullUid); |
638 iAppArc.AppForDocument(aFile, dummyUid, dataType); |
583 iAppArc.AppForDocument(aFile, dummyUid, dataType); |
740 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
695 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
741 TParsePtrC parse( path ); |
696 TParsePtrC parse( path ); |
742 TPtrC ext( parse.Ext() ); |
697 TPtrC ext( parse.Ext() ); |
743 if (ext.CompareF(KNonEmbeddedArtExt)== 0) |
698 if (ext.CompareF(KNonEmbeddedArtExt)== 0) |
744 { |
699 { |
745 #ifdef RD_MPX_TNM_INTEGRATION |
700 #ifdef RD_MPX_TNM_INTEGRATION |
746 |
701 |
747 //check if can send TN request, If thumbnail creation is ongoing, wait til it is done |
702 //check if can send TN request, If thumbnail creation is ongoing, wait til it is done |
748 CheckBeforeSendRequest(); |
703 CheckBeforeSendRequest(); |
749 |
704 |
750 CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( |
705 CThumbnailObjectSource* source( NULL ); |
751 path, KImageFileType ); |
706 if (aMedia->IsSupported(KMPXMediaMTPSampleData)) |
752 |
707 { |
753 |
708 TBuf<20> mimeType(KImageFileType); |
754 |
709 TInt sampleData = aMedia->ValueTObjectL<TInt>(KMPXMediaMTPSampleData); |
755 iTNManager->CreateThumbnails( *source ); |
710 HBufC8* value8 = ((HBufC8*)sampleData)->Des().AllocLC(); // make a local copy of sampleData |
756 |
711 source = CThumbnailObjectSource::NewLC( |
757 iOutstandingThumbnailRequest++; |
712 value8, mimeType, path ); // give up ownership of value8 |
758 CleanupStack::PopAndDestroy( source ); |
713 |
759 |
714 MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from buffer"); |
760 #endif |
715 TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source ); |
|
716 iArrayTNRequestId.Append( tnId ); |
|
717 CleanupStack::PopAndDestroy( source ); |
|
718 CleanupStack::Pop( value8 ); |
|
719 } |
|
720 else |
|
721 { |
|
722 source = CThumbnailObjectSource::NewLC( |
|
723 path, KImageFileType ); |
|
724 |
|
725 MPX_DEBUG1("CMPXMetadataExtractor::ExtractAlbumArtL source created from path"); |
|
726 TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source ); |
|
727 iArrayTNRequestId.Append( tnId ); |
|
728 CleanupStack::PopAndDestroy( source ); |
|
729 } |
|
730 #endif // RD_MPX_TNM_INTEGRATION |
761 } |
731 } |
762 else |
732 else |
763 { |
733 { |
764 #endif |
734 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
765 // create wanted fields array |
735 // create wanted fields array |
766 RArray<TMetaDataFieldId> wantedFields; |
736 RArray<TMetaDataFieldId> wantedFields; |
767 CleanupClosePushL( wantedFields ); |
737 CleanupClosePushL( wantedFields ); |
768 wantedFields.Append(EMetaDataJpeg); |
738 wantedFields.Append(EMetaDataJpeg); |
769 |
739 |
783 } |
753 } |
784 CleanupStack::PopAndDestroy( &wantedFields ); |
754 CleanupStack::PopAndDestroy( &wantedFields ); |
785 |
755 |
786 if ( !err ) |
756 if ( !err ) |
787 { |
757 { |
788 TRAP( err, GetMediaAlbumArtL( *aMedia, path )); |
758 //check if can send TN request, If thumbnail creation is ongoing, wait til it is done |
|
759 CheckBeforeSendRequest(); |
|
760 TRAP( err, AddMediaAlbumArtL( *aMedia, path )); |
789 } |
761 } |
790 |
762 |
791 // Reset the utility |
763 // Reset the utility |
792 iMetadataUtility->ResetL(); |
764 iMetadataUtility->ResetL(); |
793 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
765 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
794 } |
766 } |
795 #endif |
767 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
796 return err; |
768 return err; |
797 } |
769 } |
798 |
770 |
799 // ---------------------------------------------------------------------------- |
771 // ---------------------------------------------------------------------------- |
800 // Set album art. |
772 // Add album art to media object. |
801 // ---------------------------------------------------------------------------- |
773 // ---------------------------------------------------------------------------- |
802 TInt CMPXMetadataExtractor::GetMediaAlbumArtL( CMPXMedia& aMedia, |
774 void CMPXMetadataExtractor::AddMediaAlbumArtL( CMPXMedia& aMedia, |
803 const TDesC& aFile ) |
775 const TDesC& aFile ) |
804 { |
776 { |
805 MPX_FUNC("CMPXMetadataExtractor::GetMediaAlbumArtL()"); |
777 MPX_FUNC("CMPXMetadataExtractor::AddMediaAlbumArtL()"); |
806 TInt err = KErrNone; |
778 |
807 // get metadata container. |
779 // get metadata container. |
808 const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL(); |
780 const CMetaDataFieldContainer& metaCont = iMetadataUtility->MetaDataFieldsL(); |
809 |
|
810 TPtrC8 data8 = metaCont.Field8( EMetaDataJpeg ); |
781 TPtrC8 data8 = metaCont.Field8( EMetaDataJpeg ); |
811 |
782 |
812 if ( data8.Length() ) |
783 if ( data8.Length() ) |
813 { |
784 { |
814 MPX_DEBUG1("CMPXMetadataExtractor::GetMediaAlbumArtL(): Album art exist."); |
785 MPX_DEBUG1("CMPXMetadataExtractor::GetMediaAlbumArtL(): Album art exist."); |
815 |
|
816 #ifdef RD_MPX_TNM_INTEGRATION |
786 #ifdef RD_MPX_TNM_INTEGRATION |
817 HBufC8* value8; |
787 HBufC8* value8 = NULL; |
818 TRAPD( err, value8 = data8.AllocL() ); |
788 TRAPD( err, value8 = data8.AllocL() ); |
819 if ( KErrNone != err ) |
789 if ( KErrNone != err ) |
820 { |
790 { |
821 MPX_DEBUG2("CMPXMetadataExtractor::GetMediaAlbumArtL - error jpeg = %i", err); |
791 MPX_DEBUG2("CMPXMetadataExtractor::GetMediaAlbumArtL - error jpeg = %i", err); |
822 User::Leave( err ); |
792 return; |
823 } |
793 } |
824 CleanupStack::PushL( value8 ); |
794 CleanupStack::PushL( value8 ); |
825 AddMediaAlbumArtL( aMedia, aFile, *value8 ); |
795 |
826 CleanupStack::Pop(value8); |
796 TBuf<256> mimeType; |
827 #else // RD_MPX_TNM_INTEGRATION |
797 mimeType.Copy( KImageFileType ); |
|
798 CThumbnailObjectSource* source = CThumbnailObjectSource::NewL( |
|
799 value8, mimeType, aFile ); |
|
800 TThumbnailRequestId tnId = iTNManager->CreateThumbnails( *source ); |
|
801 iArrayTNRequestId.Append( tnId ); // add thumbnail id to array |
|
802 CleanupStack::Pop( value8 ); |
|
803 aMedia.SetTextValueL( KMPXMediaMusicOriginalAlbumArtFileName, aFile ); |
|
804 #endif // RD_MPX_TNM_INTEGRATION |
828 aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile ); |
805 aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile ); |
829 #endif // RD_MPX_TNM_INTEGRATION |
806 } |
830 } |
807 } |
831 else |
808 |
832 { |
809 // ---------------------------------------------------------------------------- |
833 err = KErrNotFound; |
810 // Check if can send request to TNM or not. |
834 } |
811 // ---------------------------------------------------------------------------- |
835 |
|
836 return err; |
|
837 } |
|
838 |
|
839 // ---------------------------------------------------------------------------- |
|
840 // Add album art to media object. |
|
841 // ---------------------------------------------------------------------------- |
|
842 void CMPXMetadataExtractor::AddMediaAlbumArtL( CMPXMedia& aMedia, |
|
843 const TDesC& aFile, |
|
844 TDesC8& aValue ) |
|
845 { |
|
846 MPX_FUNC("CMPXMetadataExtractor::AddMediaAlbumArtL()"); |
|
847 #ifdef RD_MPX_TNM_INTEGRATION |
|
848 |
|
849 //check if can send TN request, If thumbnail creation is ongoing, wait til it is done |
|
850 CheckBeforeSendRequest(); |
|
851 |
|
852 aMedia.SetTextValueL( KMPXMediaMusicAlbumArtFileName, aFile ); |
|
853 |
|
854 TBuf<256> mimeType; |
|
855 mimeType.Copy( KImageFileType ); |
|
856 CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( |
|
857 &aValue, mimeType, aFile ); |
|
858 iTNManager->CreateThumbnails( *source ); |
|
859 CleanupStack::PopAndDestroy( source ); |
|
860 aMedia.SetTextValueL( KMPXMediaMusicOriginalAlbumArtFileName, aFile ); |
|
861 iOutstandingThumbnailRequest++; |
|
862 |
|
863 #endif // RD_MPX_TNM_INTEGRATION |
|
864 } |
|
865 |
|
866 void CMPXMetadataExtractor::CheckBeforeSendRequest() |
812 void CMPXMetadataExtractor::CheckBeforeSendRequest() |
867 { |
813 { |
868 MPX_FUNC("CMPXMetadataExtractor::CheckBeforeSendRequest()"); |
814 MPX_FUNC("CMPXMetadataExtractor::CheckBeforeSendRequest()"); |
869 #ifdef RD_MPX_TNM_INTEGRATION |
815 #ifdef RD_MPX_TNM_INTEGRATION |
|
816 MPX_DEBUG2("CMPXMetadataExtractor::CheckBeforeSendRequest(): Outstanding Thumbnail Request = %d", |
|
817 iArrayTNRequestId.Count()); |
870 // If thumbnail creation is ongoing, wait til it is done |
818 // If thumbnail creation is ongoing, wait til it is done |
871 if ( iOutstandingThumbnailRequest > KMPXMaxThumbnailRequest ) |
819 if ( iArrayTNRequestId.Count() >= KMPXMaxThumbnailRequest ) |
872 { |
820 { |
873 MPX_DEBUG1("CMPXMetadataExtractor::CheckBeforeSendRequest(): Thumbnail creation ongoing!"); |
821 MPX_DEBUG1("CMPXMetadataExtractor::CheckBeforeSendRequest(): Thumbnail creation ongoing!"); |
874 iTNMBlockCount++; |
|
875 // Cancel timer. |
822 // Cancel timer. |
876 CancelTimeoutTimer(); |
823 CancelTimeoutTimer(); |
877 // Start timer in case there is no callback from ThumbNail Manager. |
824 // Start timer in case there is no callback from ThumbNail Manager. |
878 iTimer->Start( |
825 iTimer->Start( |
879 KMPXTimeoutTimer, |
826 KMPXTimeoutTimer, |
886 iTNSyncWait->Start(); |
833 iTNSyncWait->Start(); |
887 } |
834 } |
888 } |
835 } |
889 #endif // RD_MPX_TNM_INTEGRATION |
836 #endif // RD_MPX_TNM_INTEGRATION |
890 } |
837 } |
|
838 |
|
839 // ---------------------------------------------------------------------------- |
|
840 // Cancel request. This will empty the task array and stop the wait loop. This |
|
841 // will cause the CreateMediaL() to finish more quickly. |
|
842 // ---------------------------------------------------------------------------- |
|
843 EXPORT_C void CMPXMetadataExtractor::CancelRequest() |
|
844 { |
|
845 MPX_FUNC("CMPXMetadataExtractor::CancelRequest()"); |
|
846 iCancelled = ETrue; |
|
847 // Cancel all tasks |
|
848 iArrayTasks.Reset(); |
|
849 // Cancel all thumbnail request |
|
850 CancelAllThumbnailRequests(); |
|
851 StopWaitLoop(); |
|
852 } |
|
853 |
|
854 // ---------------------------------------------------------------------------- |
|
855 // Cancel all outstanding thumbnail requests. |
|
856 // ---------------------------------------------------------------------------- |
|
857 void CMPXMetadataExtractor::CancelAllThumbnailRequests() |
|
858 { |
|
859 MPX_FUNC("CMPXMetadataExtractor::CancelAllThumbnailRequests()"); |
|
860 #ifdef RD_MPX_TNM_INTEGRATION |
|
861 // TODO: remove comments when TNM make CancelRequest asynchronous. |
|
862 /*TInt count = iArrayTNRequestId.Count(); |
|
863 for ( TInt i=0; i<count; i++ ) |
|
864 { |
|
865 iTNManager->CancelRequest( iArrayTNRequestId[i] ); |
|
866 } |
|
867 */ |
|
868 iArrayTNRequestId.Reset(); |
|
869 #endif // RD_MPX_TNM_INTEGRATION |
|
870 } |
|
871 |
|
872 // ---------------------------------------------------------------------------- |
|
873 // Create media and set default data and mimetype. |
|
874 // ---------------------------------------------------------------------------- |
|
875 void CMPXMetadataExtractor::DoCreateMediaL() |
|
876 { |
|
877 MPX_FUNC("CMPXMetadataExtractor::DoCreateMediaL()"); |
|
878 RArray<TInt> contentIDs; |
|
879 contentIDs.AppendL( KMPXMediaIdGeneral ); |
|
880 contentIDs.AppendL( KMPXMediaIdAudio ); |
|
881 contentIDs.AppendL( KMPXMediaIdMusic ); |
|
882 contentIDs.AppendL( KMPXMediaIdDrm ); |
|
883 contentIDs.AppendL( KMPXMediaIdMTP ); |
|
884 iMedia = CMPXMedia::NewL( contentIDs.Array() ); |
|
885 contentIDs.Close(); |
|
886 |
|
887 // CMPXMedia default types |
|
888 iMedia->SetTObjectValueL<TMPXGeneralType>( KMPXMediaGeneralType, |
|
889 EMPXItem ); |
|
890 iMedia->SetTObjectValueL<TMPXGeneralCategory>( KMPXMediaGeneralCategory, |
|
891 EMPXSong ); |
|
892 |
|
893 TParsePtrC parse( iFileName ); |
|
894 // Title, default is file name |
|
895 iMedia->SetTextValueL( KMPXMediaGeneralTitle, |
|
896 parse.Name() ); |
|
897 // Default album track |
|
898 iMedia->SetTextValueL( KMPXMediaMusicAlbumTrack, |
|
899 KNullDesC ); |
|
900 |
|
901 // Set the Mime Type and collection UID |
|
902 // |
|
903 if( !iMetadataOnly ) |
|
904 { |
|
905 TInt index(KErrNotFound); |
|
906 TInt count( iSupportedTypes.Count() ); |
|
907 for (TInt i=0; i <count; ++i) |
|
908 { |
|
909 TInt index2(KErrNotFound); |
|
910 const CDesCArray& exts = iSupportedTypes[i]->Extensions(); |
|
911 const TDesC& ext = parse.Ext(); |
|
912 if (!exts.FindIsq(ext, index2)) |
|
913 { // found |
|
914 index = i; |
|
915 break; |
|
916 } |
|
917 } |
|
918 if( KErrNotFound != index ) |
|
919 { |
|
920 MPX_DEBUG1("CMPXMetadataExtractor::DoCreateMediaL apparc <---" ); |
|
921 TInt mimeIndex = SupportedContainerTypeL( iFileName, index ); |
|
922 User::LeaveIfError( mimeIndex ); |
|
923 MPX_DEBUG1("CMPXMetadataExtractor::DoCreateMediaL apparc --->" ); |
|
924 |
|
925 iMedia->SetTextValueL( KMPXMediaGeneralMimeType, |
|
926 iSupportedTypes[index]->Mimetypes()[mimeIndex] ); |
|
927 |
|
928 iMedia->SetTObjectValueL( KMPXMediaGeneralCollectionId, |
|
929 iSupportedTypes[index]->Uid() ); |
|
930 } |
|
931 else |
|
932 { |
|
933 User::Leave(KErrNotSupported); |
|
934 } |
|
935 } |
|
936 else // other case use apparc to fetch and set mimetype |
|
937 { |
|
938 TDataType dataType; |
|
939 TUid dummyUid(KNullUid); |
|
940 iAppArc.AppForDocument(iFileName, dummyUid, dataType); |
|
941 iMedia->SetTextValueL( KMPXMediaGeneralMimeType,dataType.Des() ); |
|
942 } |
|
943 |
|
944 // Initially set default tags. |
|
945 SetDefaultL( *iMedia ); |
|
946 } |
|
947 |
|
948 // ---------------------------------------------------------------------------- |
|
949 // Execute task at index 0. |
|
950 // ---------------------------------------------------------------------------- |
|
951 void CMPXMetadataExtractor::ExecuteTaskL() |
|
952 { |
|
953 MPX_FUNC("CMPXMetadataExtractor::ExecuteTasksL()"); |
|
954 |
|
955 if ( iArrayTasks.Count() ) |
|
956 { |
|
957 switch ( iArrayTasks[0] ) |
|
958 { |
|
959 case ETaskCreateMedia: |
|
960 DoCreateMediaL(); |
|
961 break; |
|
962 case ETaskAddMetadata: |
|
963 SetMediaPropertiesL(); |
|
964 break; |
|
965 case ETaskAddExtMetadata: |
|
966 SetExtMediaPropertiesL(); |
|
967 break; |
|
968 case ETaskAddAlbumArt: |
|
969 AddMediaAlbumArtL( *iMedia, iFileName ); |
|
970 break; |
|
971 case ETaskCheckBeforeSend: |
|
972 CheckBeforeSendRequest(); |
|
973 break; |
|
974 default: |
|
975 MPX_ASSERT(0); // Should never get here |
|
976 } |
|
977 } |
|
978 } |
|
979 |
|
980 // --------------------------------------------------------------------------- |
|
981 // Constructs a media properties object : asynchronous funcion |
|
982 // --------------------------------------------------------------------------- |
|
983 // |
|
984 EXPORT_C void CMPXMetadataExtractor::CreateMediaAsyncL( const TDesC& aFile, |
|
985 MMPXMetadataExtractorObserver* aObs, |
|
986 TBool aMetadataOnly ) |
|
987 { |
|
988 MPX_FUNC("CMPXMetadataExtractor::CreateMediaAsyncL()"); |
|
989 // check if we are still processing a request. |
|
990 if ( iArrayTasks.Count() ) |
|
991 { |
|
992 MPX_DEBUG1("CMPXMetadataExtractor::CreateMediaAsyncL Request ongoing. Abort!" ); |
|
993 User::Leave( KErrAbort ); |
|
994 } |
|
995 |
|
996 iCancelled = EFalse; |
|
997 iFileOpenError = KErrNone; |
|
998 iFileName = aFile; |
|
999 iObs = aObs; |
|
1000 iMetadataOnly = aMetadataOnly; |
|
1001 |
|
1002 // populate the task array |
|
1003 AddTasksL(); |
|
1004 |
|
1005 // Start task timer to execute task |
|
1006 if ( iArrayTasks.Count() ) |
|
1007 { |
|
1008 if ( iTaskTimer->IsActive() ) |
|
1009 { |
|
1010 iTaskTimer->Cancel(); |
|
1011 } |
|
1012 iTaskTimer->Start( 0, 0, TCallBack(TaskTimerCallback, this )); |
|
1013 } |
|
1014 } |
|
1015 |
|
1016 // --------------------------------------------------------------------------- |
|
1017 // Opens the file |
|
1018 // --------------------------------------------------------------------------- |
|
1019 // |
|
1020 TInt CMPXMetadataExtractor::OpenFile() |
|
1021 { |
|
1022 MPX_FUNC("CMPXMetadataExtractor::OpenFile()"); |
|
1023 |
|
1024 // Open the file |
|
1025 iFile.Close(); |
|
1026 TInt error = iFile.Open( iFs, iFileName, EFileRead | EFileShareReadersOrWriters ); |
|
1027 MPX_DEBUG2("CMPXMetadataExtractor::OpenFile open error = %d", error ); |
|
1028 return error; |
|
1029 } |
|
1030 |
|
1031 // --------------------------------------------------------------------------- |
|
1032 // Populat task array |
|
1033 // --------------------------------------------------------------------------- |
|
1034 // |
|
1035 void CMPXMetadataExtractor::AddTasksL() |
|
1036 { |
|
1037 MPX_FUNC("CMPXMetadataExtractor::AddTasks()"); |
|
1038 iFileOpenError = OpenFile(); |
|
1039 |
|
1040 // Do not change the order of the task below. |
|
1041 iArrayTasks.Reset(); |
|
1042 if ( iFileOpenError == KErrNone ) |
|
1043 { |
|
1044 iArrayTasks.AppendL(ETaskCreateMedia); |
|
1045 iArrayTasks.AppendL(ETaskAddMetadata); |
|
1046 iArrayTasks.AppendL(ETaskCheckBeforeSend); |
|
1047 iArrayTasks.AppendL(ETaskAddAlbumArt); |
|
1048 iArrayTasks.AppendL(ETaskAddExtMetadata); |
|
1049 } |
|
1050 else |
|
1051 { |
|
1052 iArrayTasks.AppendL(ETaskCreateMedia); |
|
1053 iArrayTasks.AppendL(ETaskAddExtMetadata); |
|
1054 } |
|
1055 } |
|
1056 |
|
1057 // ---------------------------------------------------------------------------- |
|
1058 // Callback for timer. |
|
1059 // ---------------------------------------------------------------------------- |
|
1060 TInt CMPXMetadataExtractor::TaskTimerCallback(TAny* aPtr) |
|
1061 { |
|
1062 MPX_FUNC("CMPXMetadataExtractor::TaskTimerCallback()"); |
|
1063 |
|
1064 CMPXMetadataExtractor* ptr = |
|
1065 static_cast<CMPXMetadataExtractor*>(aPtr); |
|
1066 |
|
1067 ptr->HandleTaskTimerExpired(); |
|
1068 return KErrNone; |
|
1069 } |
|
1070 |
|
1071 // ---------------------------------------------------------------------------- |
|
1072 // Handle task timer expired |
|
1073 // ---------------------------------------------------------------------------- |
|
1074 void CMPXMetadataExtractor::HandleTaskTimerExpired() |
|
1075 { |
|
1076 MPX_FUNC("CMPXMetadataExtractor::HandleTaskTimerExpired()"); |
|
1077 |
|
1078 iTaskTimer->Cancel(); |
|
1079 // execute task at index 0 |
|
1080 TRAPD( error, ExecuteTaskL() ); |
|
1081 if ( error || iCancelled ) |
|
1082 { |
|
1083 // cleanup |
|
1084 if ( iMedia != NULL ) |
|
1085 { |
|
1086 delete iMedia; |
|
1087 iMedia = NULL; |
|
1088 } |
|
1089 iArrayTasks.Reset(); |
|
1090 } |
|
1091 |
|
1092 // Remove task at index 0. |
|
1093 if ( iArrayTasks.Count() ) |
|
1094 { |
|
1095 iArrayTasks.Remove( 0 ); |
|
1096 } |
|
1097 |
|
1098 // check if we have any more task to run |
|
1099 if ( iArrayTasks.Count() ) |
|
1100 { |
|
1101 // start task timer |
|
1102 iTaskTimer->Start( 0, 0, TCallBack(TaskTimerCallback, this )); |
|
1103 } |
|
1104 else |
|
1105 { |
|
1106 // done |
|
1107 if ( iObs && !iCancelled ) |
|
1108 { |
|
1109 iObs->HandleCreateMediaComplete( iMedia, error ); |
|
1110 } |
|
1111 |
|
1112 CleanUp(); |
|
1113 } |
|
1114 } |
|
1115 |
|
1116 // ---------------------------------------------------------------------------- |
|
1117 // Callback for timer. |
|
1118 // ---------------------------------------------------------------------------- |
|
1119 void CMPXMetadataExtractor::CleanUp() |
|
1120 { |
|
1121 MPX_FUNC("CMPXMetadataExtractor::CleanUp()"); |
|
1122 // Reset the utility |
|
1123 TRAP_IGNORE( iMetadataUtility->ResetL() ); |
|
1124 iFile.Close(); |
|
1125 } |
|
1126 |