108 AddDisplayWindowL( aScreenDevice, aWin, &aWin ); |
108 AddDisplayWindowL( aScreenDevice, aWin, &aWin ); |
109 #endif |
109 #endif |
110 } |
110 } |
111 |
111 |
112 // ------------------------------------------------------------------------------------------------- |
112 // ------------------------------------------------------------------------------------------------- |
113 // CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() |
|
114 // ------------------------------------------------------------------------------------------------- |
|
115 // |
|
116 void CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() |
|
117 { |
|
118 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL()")); |
|
119 |
|
120 CMPXCommand* cmd = CMPXCommand::NewL(); |
|
121 CleanupStack::PushL( cmd ); |
|
122 |
|
123 cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue ); |
|
124 cmd->SetTObjectValueL<TBool>( KMPXCommandPlaybackGeneralNoBuffer, ETrue ); |
|
125 cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback ); |
|
126 cmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, |
|
127 EPbCmdSurfaceRemoved ); |
|
128 |
|
129 iPlaybackUtility->CommandL( *cmd ); |
|
130 |
|
131 CleanupStack::PopAndDestroy( cmd ); |
|
132 } |
|
133 |
|
134 // ------------------------------------------------------------------------------------------------- |
|
135 // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
113 // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
136 // ------------------------------------------------------------------------------------------------- |
114 // ------------------------------------------------------------------------------------------------- |
137 // |
115 // |
138 void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow( TBool aSignalPlaybackPlugin ) |
116 void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
139 { |
117 { |
140 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()"), |
118 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()")); |
141 _L("aSignalPlaybackPlugin = %d"), aSignalPlaybackPlugin ); |
|
142 |
119 |
143 #ifdef SYMBIAN_BUILD_GCE |
120 #ifdef SYMBIAN_BUILD_GCE |
144 if ( iVideoDisplay ) |
121 if ( iVideoDisplay ) |
145 { |
122 { |
146 // |
123 // |
147 // Surface is being removed, signal the container so it can reset the background |
124 // Surface is being removed, signal the container so it can reset the background |
148 // |
125 // |
149 if ( iContainer ) |
126 if ( iContainer ) |
150 { |
127 { |
151 iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ); |
128 MPX_TRAPD( err, iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ) ); |
152 } |
129 } |
153 |
130 |
154 delete iVideoDisplay; |
131 delete iVideoDisplay; |
155 iVideoDisplay = NULL; |
132 iVideoDisplay = NULL; |
156 } |
133 } |
157 #endif |
134 #endif |
158 |
135 |
159 if ( ! iSurfaceId.IsNull() ) |
136 iSurfaceId = TSurfaceId::CreateNullId(); |
160 { |
137 } |
161 if ( aSignalPlaybackPlugin ) |
138 |
162 { |
139 // ------------------------------------------------------------------------------------------------- |
163 // |
140 // CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() |
164 // Signal to the Playback Plugin that the surface has been removed |
|
165 // |
|
166 TRAP_IGNORE( SignalSurfaceRemovedL() ); |
|
167 } |
|
168 |
|
169 iSurfaceId = TSurfaceId::CreateNullId(); |
|
170 } |
|
171 } |
|
172 |
|
173 // ------------------------------------------------------------------------------------------------- |
|
174 // CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL() |
|
175 // ------------------------------------------------------------------------------------------------- |
141 // ------------------------------------------------------------------------------------------------- |
176 // |
142 // |
177 void |
143 void |
178 CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL( CMPXMessage* aMessage ) |
144 CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL( CMPXMessage* aMessage ) |
179 { |
145 { |
180 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL()")); |
146 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL()")); |
181 |
147 |
182 TMPXVideoDisplayCommand message = |
148 TMPXVideoDisplayCommand message = |
183 ( *(aMessage->Value<TMPXVideoDisplayCommand>(KMPXMediaVideoDisplayCommand)) ); |
149 ( *(aMessage->Value<TMPXVideoDisplayCommand>(KMPXMediaVideoDisplayCommand)) ); |
184 |
150 |
185 switch ( message ) |
151 switch ( message ) |
201 { |
167 { |
202 MPX_DEBUG(_L(" message = EPbMsgVideoSurfaceRemoved")); |
168 MPX_DEBUG(_L(" message = EPbMsgVideoSurfaceRemoved")); |
203 SurfaceRemoved(); |
169 SurfaceRemoved(); |
204 break; |
170 break; |
205 } |
171 } |
206 case EPbMsgVideoRemoveDisplayWindow: |
|
207 { |
|
208 MPX_DEBUG(_L(" message = EPbMsgVideoRemoveDisplayWindow")); |
|
209 RemoveDisplayWindow( EFalse ); |
|
210 break; |
|
211 } |
|
212 #endif |
172 #endif |
213 } |
173 } |
214 |
|
215 // |
|
216 // Signal Sync Message handling is complete |
|
217 // |
|
218 iPlaybackUtility->CommandL( EPbCmdSyncMsgComplete ); |
|
219 } |
174 } |
220 |
175 |
221 // ------------------------------------------------------------------------------------------------- |
176 // ------------------------------------------------------------------------------------------------- |
222 // CMPXVideoPlaybackDisplayHandler::SetAspectRatioL() |
177 // CMPXVideoPlaybackDisplayHandler::SetAspectRatioL() |
223 // ------------------------------------------------------------------------------------------------- |
178 // ------------------------------------------------------------------------------------------------- |