equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: Implementation of Video base playback view |
14 * Description: Implementation of Video base playback view |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: da1mmcf#24 % |
18 // Version : %version: da1mmcf#27 % |
19 |
19 |
20 |
20 |
21 |
21 |
22 // Include Files |
22 // Include Files |
23 |
23 |
127 // |
127 // |
128 // Delete the display handler when the view is deactivated |
128 // Delete the display handler when the view is deactivated |
129 // |
129 // |
130 if ( iDisplayHandler ) |
130 if ( iDisplayHandler ) |
131 { |
131 { |
132 iDisplayHandler->RemoveDisplayWindow(); |
|
133 delete iDisplayHandler; |
132 delete iDisplayHandler; |
134 iDisplayHandler = NULL; |
133 iDisplayHandler = NULL; |
135 } |
134 } |
136 |
135 |
137 if ( iUserInputHandler ) |
136 if ( iUserInputHandler ) |
235 } |
234 } |
236 case EMPXPbvCmdClose: |
235 case EMPXPbvCmdClose: |
237 { |
236 { |
238 MPX_DEBUG(_L("CMPXVideoViewWrapper::HandleCommandL() EMPXPbvCmdClose")); |
237 MPX_DEBUG(_L("CMPXVideoViewWrapper::HandleCommandL() EMPXPbvCmdClose")); |
239 |
238 |
240 // |
|
241 // The display window must be removed before closing the playback plugin |
|
242 // |
|
243 if ( iDisplayHandler ) |
|
244 { |
|
245 // |
|
246 // Remove the display window so the surface can be released |
|
247 // |
|
248 iDisplayHandler->RemoveDisplayWindow(); |
|
249 } |
|
250 |
|
251 CreateGeneralPlaybackCommandL( EPbCmdClose ); |
239 CreateGeneralPlaybackCommandL( EPbCmdClose ); |
252 break; |
240 break; |
253 } |
241 } |
254 case EMPXPbvCmdSeekForward: |
242 case EMPXPbvCmdSeekForward: |
255 { |
243 { |
471 } |
459 } |
472 else if ( KMPXMediaIdVideoPlayback == id ) |
460 else if ( KMPXMediaIdVideoPlayback == id ) |
473 { |
461 { |
474 HandleVideoPlaybackMessage( aMessage ); |
462 HandleVideoPlaybackMessage( aMessage ); |
475 } |
463 } |
476 else if ( KMPXMediaIdVideoDisplaySyncMessage == id ) |
464 else if ( KMPXMediaIdVideoDisplayMessage == id ) |
477 { |
465 { |
478 if ( iDisplayHandler ) |
466 if ( iDisplayHandler ) |
479 { |
467 { |
480 iDisplayHandler->HandleVideoDisplayMessageL( aMessage ); |
468 iDisplayHandler->HandleVideoDisplayMessageL( aMessage ); |
481 } |
469 } |
482 |
|
483 // |
|
484 // Signal Sync Message handling is complete |
|
485 // |
|
486 iPlaybackUtility->CommandL( EPbCmdSyncMsgComplete ); |
|
487 } |
470 } |
488 } |
471 } |
489 |
472 |
490 // ------------------------------------------------------------------------------------------------- |
473 // ------------------------------------------------------------------------------------------------- |
491 // CMPXVideoViewWrapper::HandleGeneralPlaybackMessageL() |
474 // CMPXVideoViewWrapper::HandleGeneralPlaybackMessageL() |
654 // no-op |
637 // no-op |
655 break; |
638 break; |
656 } |
639 } |
657 case EPbStateStopped: |
640 case EPbStateStopped: |
658 { |
641 { |
659 if ( iPlaylistView && iDisplayHandler ) |
|
660 { |
|
661 iDisplayHandler->RemoveDisplayWindow(); |
|
662 } |
|
663 |
|
664 if ( iFileDetails->mMultiItemPlaylist ) |
642 if ( iFileDetails->mMultiItemPlaylist ) |
665 { |
643 { |
666 iView->handleStoppedState(); |
644 iView->handleStoppedState(); |
667 } |
645 } |
668 else |
646 else |
927 { |
905 { |
928 TPtrC keywords( aMedia.ValueText( KMPXMediaVideoKeywords ) ); |
906 TPtrC keywords( aMedia.ValueText( KMPXMediaVideoKeywords ) ); |
929 const QString qKeywords( (QChar*)keywords.Ptr(), keywords.Length() ); |
907 const QString qKeywords( (QChar*)keywords.Ptr(), keywords.Length() ); |
930 iFileDetails->mKeywords = qKeywords; |
908 iFileDetails->mKeywords = qKeywords; |
931 } |
909 } |
|
910 |
|
911 // |
|
912 // Creation date/time |
|
913 // |
|
914 if ( aMedia.IsSupported( KMPXMediaVideoCreated ) ) |
|
915 { |
|
916 iFileDetails->mCreationTime = aMedia.ValueTObjectL<TInt>( KMPXMediaVideoCreated ); |
|
917 } |
|
918 |
|
919 // |
|
920 // Last Modified date/time |
|
921 // |
|
922 if ( aMedia.IsSupported( KMPXMediaVideoLastModified ) ) |
|
923 { |
|
924 iFileDetails->mModificationTime = aMedia.ValueTObjectL<TInt>( KMPXMediaVideoLastModified ); |
|
925 } |
|
926 |
932 } |
927 } |
933 |
928 |
934 // ------------------------------------------------------------------------------------------------- |
929 // ------------------------------------------------------------------------------------------------- |
935 // Handle media properties. |
930 // Handle media properties. |
936 // Notes: The client is responsible for delete the object of aProperties. |
931 // Notes: The client is responsible for delete the object of aProperties. |
1281 // - try to reduce the volume with volume level 0 |
1276 // - try to reduce the volume with volume level 0 |
1282 // - try to increase the volume with max volume level |
1277 // - try to increase the volume with max volume level |
1283 // |
1278 // |
1284 iControlsController->handleEvent( EMPXControlCmdShowVolumeControls ); |
1279 iControlsController->handleEvent( EMPXControlCmdShowVolumeControls ); |
1285 |
1280 |
1286 iPlaybackUtility->CommandL( aCmd ); |
1281 switch( aCmd ) |
|
1282 { |
|
1283 case EPbCmdDecreaseVolume: |
|
1284 { |
|
1285 CreateVideoSpecificCmdL( EPbCmdHandleDecreaseVolume ); |
|
1286 break; |
|
1287 } |
|
1288 case EPbCmdIncreaseVolume: |
|
1289 { |
|
1290 CreateVideoSpecificCmdL( EPbCmdHandleIncreaseVolume ); |
|
1291 break; |
|
1292 } |
|
1293 default: |
|
1294 { |
|
1295 iPlaybackUtility->CommandL( aCmd ); |
|
1296 break; |
|
1297 } |
|
1298 } |
1287 } |
1299 } |
1288 |
1300 |
1289 // ------------------------------------------------------------------------------------------------- |
1301 // ------------------------------------------------------------------------------------------------- |
1290 // CMPXVideoViewWrapper::HandleShortPressBackwardL() |
1302 // CMPXVideoViewWrapper::HandleShortPressBackwardL() |
1291 // ------------------------------------------------------------------------------------------------- |
1303 // ------------------------------------------------------------------------------------------------- |
1415 |
1427 |
1416 bool multiLinks( false ); |
1428 bool multiLinks( false ); |
1417 |
1429 |
1418 if ( iFileDetails ) |
1430 if ( iFileDetails ) |
1419 { |
1431 { |
1420 MPX_DEBUG(_L("CMPXVideoViewWrapper::IsMultiItemPlaylist(%d)"), |
|
1421 iFileDetails->mMultiItemPlaylist ); |
|
1422 multiLinks = iFileDetails->mMultiItemPlaylist; |
1432 multiLinks = iFileDetails->mMultiItemPlaylist; |
1423 } |
1433 } |
1424 |
1434 |
|
1435 MPX_DEBUG(_L("CMPXVideoViewWrapper::IsMultiItemPlaylist() ret %d"), multiLinks ); |
|
1436 |
1425 return multiLinks; |
1437 return multiLinks; |
1426 } |
1438 } |
1427 |
1439 |
1428 // ------------------------------------------------------------------------------------------------- |
1440 // ------------------------------------------------------------------------------------------------- |
1429 // CMPXVideoViewWrapper::UpdateVideoRect() |
1441 // CMPXVideoViewWrapper::UpdateVideoRect() |