equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: Implementation of VideoPlayerEngine |
14 * Description: Implementation of VideoPlayerEngine |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: da1mmcf#38 % |
18 // Version : %version: 40 % |
19 |
19 |
20 |
20 |
21 #include <QApplication> |
21 #include <QApplication> |
22 |
22 |
23 #include <hbinstance.h> |
23 #include <hbinstance.h> |
160 if ( typeGotten == MpxHbVideoCommon::PlaybackView ) |
160 if ( typeGotten == MpxHbVideoCommon::PlaybackView ) |
161 { |
161 { |
162 createPlaybackView(); |
162 createPlaybackView(); |
163 viewType = MpxHbVideoCommon::MpxHbVideoViewType(typeGotten); |
163 viewType = MpxHbVideoCommon::MpxHbVideoViewType(typeGotten); |
164 QVariant data = VideoActivityState::instance().getActivityData( KEY_LAST_PLAYED_CLIP ); |
164 QVariant data = VideoActivityState::instance().getActivityData( KEY_LAST_PLAYED_CLIP ); |
165 playMedia( data.toString() ); |
165 int error = mPlaybackWrapper->replayMedia( data.toString() ); |
|
166 |
|
167 // if replay fails, then activate collection view instead |
|
168 if ( error != KErrNone ) |
|
169 { |
|
170 loadPluginAndCreateView( MpxHbVideoCommon::CollectionView ); |
|
171 activateView( MpxHbVideoCommon::CollectionView ); |
|
172 } |
166 } |
173 } |
167 else |
174 else |
168 { |
175 { |
169 loadPluginAndCreateView( viewType ); |
176 loadPluginAndCreateView( viewType ); |
170 activateView( viewType ); |
177 activateView( viewType ); |
220 default: |
227 default: |
221 { |
228 { |
222 break; |
229 break; |
223 } |
230 } |
224 } |
231 } |
|
232 } |
|
233 |
|
234 // ------------------------------------------------------------------------------------------------- |
|
235 // viewReadySlot() |
|
236 // ------------------------------------------------------------------------------------------------- |
|
237 // |
|
238 void VideoPlayerEngine::viewReadySlot() |
|
239 { |
|
240 MPX_ENTER_EXIT(_L("VideoPlayerEngine::viewReady()")); |
|
241 emit applicationReady(); |
|
242 // since we need to emit applicationReady only once at startup, |
|
243 // disconnect the viewReady -signal from this object |
|
244 disconnect(hbInstance->allMainWindows().value(0), SIGNAL(viewReady()), |
|
245 this, SLOT(viewReadySlot())); |
225 } |
246 } |
226 |
247 |
227 // ------------------------------------------------------------------------------------------------- |
248 // ------------------------------------------------------------------------------------------------- |
228 // doDelayedLoad() |
249 // doDelayedLoad() |
229 // ------------------------------------------------------------------------------------------------- |
250 // ------------------------------------------------------------------------------------------------- |