37 // |
37 // |
38 QVideoPlayerEngine::QVideoPlayerEngine( bool isService ) |
38 QVideoPlayerEngine::QVideoPlayerEngine( bool isService ) |
39 : mIsService( isService ) |
39 : mIsService( isService ) |
40 , mEmbedded( false ) |
40 , mEmbedded( false ) |
41 , mDelayedLoadDone( false ) |
41 , mDelayedLoadDone( false ) |
|
42 , mIsPlayService( false ) |
42 , mCurrentViewPlugin( 0 ) |
43 , mCurrentViewPlugin( 0 ) |
43 , mPlaybackViewPlugin( 0 ) |
44 , mPlaybackViewPlugin( 0 ) |
44 , mCollectionViewPlugin( 0 ) |
45 , mCollectionViewPlugin( 0 ) |
45 , mFileDetailsViewPlugin( 0 ) |
46 , mFileDetailsViewPlugin( 0 ) |
46 , mPlaybackWrapper( 0 ) |
47 , mPlaybackWrapper( 0 ) |
118 connect( mVideoServices, SIGNAL(activated(int)), this, SLOT(handleCommand(int))); |
119 connect( mVideoServices, SIGNAL(activated(int)), this, SLOT(handleCommand(int))); |
119 } |
120 } |
120 |
121 |
121 QList<XQPluginInfo> impls; |
122 QList<XQPluginInfo> impls; |
122 XQPluginLoader::listImplementations("org.nokia.mmdt.MpxViewPlugin/1.0", impls); |
123 XQPluginLoader::listImplementations("org.nokia.mmdt.MpxViewPlugin/1.0", impls); |
123 |
124 |
124 // |
125 if ( isPlayServiceInvoked() ) |
125 // Pre-load collection plugin and create collection view |
|
126 // |
|
127 loadPluginAndCreateView( MpxHbVideoCommon::CollectionView ); |
|
128 |
|
129 // |
|
130 // if app is opened via serviceFW create remaining views |
|
131 // otherwise activate default view i.e. the collection view. |
|
132 // |
|
133 if ( mIsService ) |
|
134 { |
126 { |
135 createPlayAndDetailsViews(); |
127 createPlayAndDetailsViews(); |
136 } |
128 } |
137 else |
129 else |
138 { |
130 { |
139 activateView( MpxHbVideoCommon::CollectionView ); |
131 loadPluginAndCreateView( MpxHbVideoCommon::CollectionView ); |
140 } |
132 |
141 |
133 if((mIsService && !(XQServiceUtil::interfaceName().contains("IVideoBrowse"))) || !mIsService) |
|
134 { |
|
135 //Browse service will activate view once the category to be opened is informed from highway |
|
136 activateView( MpxHbVideoCommon::CollectionView ); |
|
137 } |
|
138 } |
|
139 |
142 } |
140 } |
143 |
141 |
144 // ------------------------------------------------------------------------------------------------- |
142 // ------------------------------------------------------------------------------------------------- |
145 // handleCommand() |
143 // handleCommand() |
146 // ------------------------------------------------------------------------------------------------- |
144 // ------------------------------------------------------------------------------------------------- |
222 if ( ! mPlaybackViewPlugin ) |
220 if ( ! mPlaybackViewPlugin ) |
223 { |
221 { |
224 loadPluginAndCreateView( MpxHbVideoCommon::PlaybackView ); |
222 loadPluginAndCreateView( MpxHbVideoCommon::PlaybackView ); |
225 } |
223 } |
226 |
224 |
227 if ( ! mFileDetailsViewPlugin ) |
225 // details view need not be created for playback via serviceFW |
|
226 if ( ! mIsPlayService && |
|
227 ! mFileDetailsViewPlugin ) |
228 { |
228 { |
229 loadPluginAndCreateView( MpxHbVideoCommon::VideoDetailsView ); |
229 loadPluginAndCreateView( MpxHbVideoCommon::VideoDetailsView ); |
230 } |
230 } |
231 } |
231 } |
232 |
232 |
490 // |
490 // |
491 mCurrentViewPlugin->activateView(); |
491 mCurrentViewPlugin->activateView(); |
492 } |
492 } |
493 } |
493 } |
494 |
494 |
|
495 // ------------------------------------------------------------------------------------------------- |
|
496 // isPlayServiceInvoked() |
|
497 // ------------------------------------------------------------------------------------------------- |
|
498 // |
|
499 bool QVideoPlayerEngine::isPlayServiceInvoked() |
|
500 { |
|
501 MPX_ENTER_EXIT(_L("QVideoPlayerEngine::isPlayServiceInvoked()")); |
|
502 |
|
503 bool result = false; |
|
504 |
|
505 if ( mIsService ) |
|
506 { |
|
507 QString intface = XQServiceUtil::interfaceName(); |
|
508 |
|
509 if ( intface.contains("IVideoView") || |
|
510 intface.contains("IFileView") ) |
|
511 { |
|
512 result = true; |
|
513 mIsPlayService = true; |
|
514 } |
|
515 } |
|
516 |
|
517 return result; |
|
518 } |
495 |
519 |
496 // End of file |
520 // End of file |