99 AddDisplayWindowL( aScreenDevice, aWin, &aWin ); |
101 AddDisplayWindowL( aScreenDevice, aWin, &aWin ); |
100 #endif |
102 #endif |
101 } |
103 } |
102 |
104 |
103 // ------------------------------------------------------------------------------------------------- |
105 // ------------------------------------------------------------------------------------------------- |
|
106 // CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() |
|
107 // ------------------------------------------------------------------------------------------------- |
|
108 // |
|
109 void CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() |
|
110 { |
|
111 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL()")); |
|
112 |
|
113 CMPXCommand* cmd = CMPXCommand::NewL(); |
|
114 CleanupStack::PushL( cmd ); |
|
115 |
|
116 cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue ); |
|
117 cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback ); |
|
118 cmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, |
|
119 EPbCmdSurfaceRemoved ); |
|
120 |
|
121 iPlaybackUtility->CommandL( *cmd ); |
|
122 |
|
123 CleanupStack::PopAndDestroy( cmd ); |
|
124 } |
|
125 |
|
126 // ------------------------------------------------------------------------------------------------- |
104 // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
127 // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
105 // ------------------------------------------------------------------------------------------------- |
128 // ------------------------------------------------------------------------------------------------- |
106 // |
129 // |
107 void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
130 void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
108 { |
131 { |
113 { |
136 { |
114 delete iVideoDisplay; |
137 delete iVideoDisplay; |
115 iVideoDisplay = NULL; |
138 iVideoDisplay = NULL; |
116 } |
139 } |
117 #endif |
140 #endif |
|
141 |
|
142 if ( ! iSurfaceId.IsNull() ) |
|
143 { |
|
144 // |
|
145 // Signal to the Playback Plugin that the surface has been removed |
|
146 // |
|
147 TRAP_IGNORE( SignalSurfaceRemovedL() ); |
|
148 |
|
149 iSurfaceId = TSurfaceId::CreateNullId(); |
|
150 } |
118 } |
151 } |
119 |
152 |
120 // ------------------------------------------------------------------------------------------------- |
153 // ------------------------------------------------------------------------------------------------- |
121 // CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() |
154 // CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() |
122 // ------------------------------------------------------------------------------------------------- |
155 // ------------------------------------------------------------------------------------------------- |
419 void CMPXVideoPlaybackDisplayHandler::SurfaceCreatedL( CMPXMessage* aMessage ) |
464 void CMPXVideoPlaybackDisplayHandler::SurfaceCreatedL( CMPXMessage* aMessage ) |
420 { |
465 { |
421 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::SurfaceCreatedL()")); |
466 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::SurfaceCreatedL()")); |
422 |
467 |
423 TSurfaceId oldSurfaceId = iSurfaceId; |
468 TSurfaceId oldSurfaceId = iSurfaceId; |
424 |
469 |
425 // |
470 // |
426 // Extract the surface parameters from the message |
471 // Extract the surface parameters from the message |
427 // |
472 // |
428 iSurfaceId = aMessage->ValueTObjectL<TSurfaceId>( KMPXMediaVideoDisplayTSurfaceId ); |
473 iSurfaceId = aMessage->ValueTObjectL<TSurfaceId>( KMPXMediaVideoDisplayTSurfaceId ); |
429 iCropRect = aMessage->ValueTObjectL<TRect>( KMPXMediaVideoDisplayCropRect ); |
474 iCropRect = aMessage->ValueTObjectL<TRect>( KMPXMediaVideoDisplayCropRect ); |