equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: Implementation of VideoServiceView |
14 * Description: Implementation of VideoServiceView |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 // Version : %version: 4 % |
18 // Version : %version: 5 % |
19 |
19 |
20 #include "videoservices.h" |
20 #include "videoservices.h" |
21 #include "videoserviceview.h" |
21 #include "videoserviceview.h" |
22 #include "videoplayerengine.h" |
22 #include "videoplayerengine.h" |
23 #include "mpxvideo_debug.h" |
23 #include "mpxvideo_debug.h" |
25 // ------------------------------------------------------------------------------------------------- |
25 // ------------------------------------------------------------------------------------------------- |
26 // VideoServiceView() |
26 // VideoServiceView() |
27 // ------------------------------------------------------------------------------------------------- |
27 // ------------------------------------------------------------------------------------------------- |
28 // |
28 // |
29 VideoServiceView::VideoServiceView( VideoServices* parent, |
29 VideoServiceView::VideoServiceView( VideoServices* parent, |
30 QVideoPlayerEngine* engine, |
30 VideoPlayerEngine* engine, |
31 QLatin1String service ) |
31 QLatin1String service ) |
32 : XQServiceProvider( service, parent ) |
32 : XQServiceProvider( service, parent ) |
33 , mEngine( engine ) |
33 , mEngine( engine ) |
34 , mServiceApp( parent ) |
34 , mServiceApp( parent ) |
35 { |
35 { |
48 |
48 |
49 // ------------------------------------------------------------------------------------------------- |
49 // ------------------------------------------------------------------------------------------------- |
50 // setEngine() |
50 // setEngine() |
51 // ------------------------------------------------------------------------------------------------- |
51 // ------------------------------------------------------------------------------------------------- |
52 // |
52 // |
53 void VideoServiceView::setEngine( QVideoPlayerEngine* engine ) |
53 void VideoServiceView::setEngine( VideoPlayerEngine* engine ) |
54 { |
54 { |
55 MPX_ENTER_EXIT(_L("VideoServiceView::setEngine()")); |
55 MPX_ENTER_EXIT(_L("VideoServiceView::setEngine()")); |
56 mEngine = engine; |
56 mEngine = engine; |
57 } |
57 } |
58 |
58 |
59 // ------------------------------------------------------------------------------------------------- |
59 // ------------------------------------------------------------------------------------------------- |
60 // view( QString ) |
60 // view( QString ) |
61 // ------------------------------------------------------------------------------------------------- |
61 // ------------------------------------------------------------------------------------------------- |
63 bool VideoServiceView::view( QString file ) |
63 bool VideoServiceView::view( QString file ) |
64 { |
64 { |
65 MPX_ENTER_EXIT(_L("VideoServiceView::view( QString ) "), |
65 MPX_ENTER_EXIT(_L("VideoServiceView::view( QString ) "), |
66 _L("file = %s"), file.data() ); |
66 _L("file = %s"), file.data() ); |
67 |
67 |
68 if(mEngine) |
68 if ( mEngine ) |
69 { |
69 { |
70 mServiceApp->setCurrentService(VideoServices::EView); |
70 mServiceApp->setCurrentService( VideoServices::EView ); |
71 mEngine->playMedia( file ); |
71 mEngine->playMedia( file ); |
72 } |
72 } |
73 |
73 |
74 return true; |
74 return true; |
75 } |
75 } |
83 MPX_ENTER_EXIT(_L("VideoServiceView::view( XQSharableFile )")); |
83 MPX_ENTER_EXIT(_L("VideoServiceView::view( XQSharableFile )")); |
84 |
84 |
85 RFile rFile; |
85 RFile rFile; |
86 bool handleOK = file.getHandle( rFile ); |
86 bool handleOK = file.getHandle( rFile ); |
87 |
87 |
88 mServiceApp->setCurrentService(VideoServices::EView); |
88 mServiceApp->setCurrentService( VideoServices::EView ); |
89 |
89 |
90 if ( mEngine) |
90 if ( mEngine) |
91 { |
91 { |
92 if ( handleOK ) |
92 if ( handleOK ) |
93 { |
93 { |
97 { |
97 { |
98 mEngine->playMedia( file.fileName() ); |
98 mEngine->playMedia( file.fileName() ); |
99 } |
99 } |
100 } |
100 } |
101 |
101 |
102 return true; |
102 return true; |
103 } |
103 } |
104 |
104 |
105 |
105 |
106 |
106 |
107 |
107 |