equal
deleted
inserted
replaced
14 * Description: Implementation of Video base playback view |
14 * Description: Implementation of Video base playback view |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // Version : %version: 66 % |
19 // Version : %version: 68 % |
20 |
20 |
21 |
21 |
22 // Include Files |
22 // Include Files |
23 |
23 |
24 #include <aknViewAppUi.h> |
24 #include <aknViewAppUi.h> |
182 // CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL() |
182 // CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL() |
183 // ------------------------------------------------------------------------------------------------- |
183 // ------------------------------------------------------------------------------------------------- |
184 // |
184 // |
185 void CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL( TMPXPlaybackCommand aCmd ) |
185 void CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL( TMPXPlaybackCommand aCmd ) |
186 { |
186 { |
187 MPX_DEBUG(_L("CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL(%d)"), aCmd ); |
187 MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::CreateGeneralPlaybackCommandL()"), |
|
188 _L("aCmd = %d"), aCmd ); |
188 |
189 |
189 CMPXCommand* cmd = CMPXCommand::NewL(); |
190 CMPXCommand* cmd = CMPXCommand::NewL(); |
190 CleanupStack::PushL( cmd ); |
191 CleanupStack::PushL( cmd ); |
191 |
192 |
192 cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue ); |
193 cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue ); |
361 break; |
362 break; |
362 } |
363 } |
363 case KMpxVideoPlaybackPdlReloading: |
364 case KMpxVideoPlaybackPdlReloading: |
364 { |
365 { |
365 iPdlReloading = ETrue; |
366 iPdlReloading = ETrue; |
|
367 iMediaRequested = EFalse; |
366 break; |
368 break; |
367 } |
369 } |
368 case EMPXPbvCmdRealOneBitmapTimeout: |
370 case EMPXPbvCmdRealOneBitmapTimeout: |
369 { |
371 { |
370 HandleRealOneBitmapTimeoutL(); |
372 HandleRealOneBitmapTimeoutL(); |
449 |
451 |
450 // |
452 // |
451 // Create Video Playback Display Handler |
453 // Create Video Playback Display Handler |
452 // |
454 // |
453 iDisplayHandler = CMPXVideoPlaybackDisplayHandler::NewL( iPlaybackUtility, iContainer ); |
455 iDisplayHandler = CMPXVideoPlaybackDisplayHandler::NewL( iPlaybackUtility, iContainer ); |
454 |
|
455 // |
|
456 // Delay the adding of the display window while the Real One Bitmap is being shown |
|
457 // |
|
458 if ( ! iContainer->IsRealOneBitmapTimerActive() ) |
|
459 { |
|
460 // |
|
461 // Setup the display window |
|
462 // |
|
463 iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()), |
|
464 iContainer->GetWindow() ); |
|
465 } |
|
466 } |
456 } |
467 |
457 |
468 // |
458 // |
469 // Deactivate the CBA set the LSK & RSK to empty |
459 // Deactivate the CBA set the LSK & RSK to empty |
470 // |
460 // |
771 { |
761 { |
772 HandleVideoPlaybackMessage( aMessage ); |
762 HandleVideoPlaybackMessage( aMessage ); |
773 } |
763 } |
774 else if ( KMPXMediaIdVideoDisplaySyncMessage == id ) |
764 else if ( KMPXMediaIdVideoDisplaySyncMessage == id ) |
775 { |
765 { |
776 iDisplayHandler->HandleVideoDisplaySyncMessageL( aMessage ); |
766 if ( iDisplayHandler ) |
|
767 { |
|
768 iDisplayHandler->HandleVideoDisplaySyncMessageL( aMessage ); |
|
769 } |
777 } |
770 } |
778 } |
771 } |
779 |
772 |
780 // ------------------------------------------------------------------------------------------------- |
773 // ------------------------------------------------------------------------------------------------- |
781 // CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL() |
774 // CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL() |
786 TInt event( *aMessage->Value<TInt>( KMPXMessageGeneralEvent ) ); |
779 TInt event( *aMessage->Value<TInt>( KMPXMessageGeneralEvent ) ); |
787 TInt type( *aMessage->Value<TInt>( KMPXMessageGeneralType ) ); |
780 TInt type( *aMessage->Value<TInt>( KMPXMessageGeneralType ) ); |
788 TInt data( *aMessage->Value<TInt>( KMPXMessageGeneralData ) ); |
781 TInt data( *aMessage->Value<TInt>( KMPXMessageGeneralData ) ); |
789 |
782 |
790 MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL()"), |
783 MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL()"), |
791 _L("event = %d type = %d value = %d"), event, type, data ); |
784 _L("event = %d type = %d value = %d"), event, type, data ); |
792 |
785 |
793 switch ( event ) |
786 switch ( event ) |
794 { |
787 { |
795 case TMPXPlaybackMessage::EStateChanged: |
788 case TMPXPlaybackMessage::EStateChanged: |
796 { |
789 { |
999 { |
992 { |
1000 iMediaRequested = EFalse; |
993 iMediaRequested = EFalse; |
1001 |
994 |
1002 iContainer->HandleCommandL( EMPXPbvCmdResetControls ); |
995 iContainer->HandleCommandL( EMPXPbvCmdResetControls ); |
1003 |
996 |
1004 // |
|
1005 // Delay the adding of the display window while the Real One Bitmap |
|
1006 // is being shown |
|
1007 // |
|
1008 if ( ! iContainer->IsRealOneBitmapTimerActive() && iDisplayHandler ) |
|
1009 { |
|
1010 // |
|
1011 // Setup the display window since it was destroyed to free the surface |
|
1012 // |
|
1013 iDisplayHandler->CreateDisplayWindowL( |
|
1014 *(CCoeEnv::Static()->ScreenDevice()), |
|
1015 iContainer->GetWindow() ); |
|
1016 } |
|
1017 |
|
1018 if ( iFileDetails ) |
997 if ( iFileDetails ) |
1019 { |
998 { |
1020 if ( iFileDetailsDialog ) |
999 if ( iFileDetailsDialog ) |
1021 { |
1000 { |
1022 iFileDetailsDialog->Close(); |
1001 iFileDetailsDialog->Close(); |
1293 // |
1272 // |
1294 iContainer->AddFileDetailsL( iFileDetails ); |
1273 iContainer->AddFileDetailsL( iFileDetails ); |
1295 |
1274 |
1296 if ( iFileDetails->iVideoEnabled ) |
1275 if ( iFileDetails->iVideoEnabled ) |
1297 { |
1276 { |
1298 TRect displayRect = iContainer->Rect(); |
1277 // |
1299 |
1278 // Calculate the aspect ratio and setup the display hanlder with the display window |
1300 TReal displayAspectRatio = (TReal32)displayRect.Width() / (TReal32)displayRect.Height(); |
1279 // Aspect ratio should be calculated 1st so the auto scale will be set when |
1301 |
1280 // the display window is created. |
1302 TInt newAspectRatio = iDisplayHandler->SetDefaultAspectRatioL( iFileDetails, |
1281 // |
1303 displayAspectRatio ); |
1282 TInt newAspectRatio = iDisplayHandler->SetDefaultAspectRatioL( iFileDetails ); |
|
1283 |
|
1284 iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()), |
|
1285 iContainer->GetWindow() ); |
1304 |
1286 |
1305 iContainer->HandleEventL( EMPXControlCmdSetAspectRatio, newAspectRatio ); |
1287 iContainer->HandleEventL( EMPXControlCmdSetAspectRatio, newAspectRatio ); |
1306 } |
1288 } |
1307 |
1289 |
1308 // |
1290 // |
2207 // |
2189 // |
2208 if ( iFileDetails && iFileDetails->iVideoEnabled ) |
2190 if ( iFileDetails && iFileDetails->iVideoEnabled ) |
2209 { |
2191 { |
2210 if ( iDisplayHandler ) |
2192 if ( iDisplayHandler ) |
2211 { |
2193 { |
2212 // |
2194 iDisplayHandler->DoHandleRealOneBitmapTimeoutL(); |
2213 // Setup the display window |
|
2214 // |
|
2215 iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()), |
|
2216 iContainer->GetWindow() ); |
|
2217 } |
2195 } |
2218 } |
2196 } |
2219 else |
2197 else |
2220 { |
2198 { |
2221 iContainer->DrawNow(); |
2199 iContainer->DrawNow(); |