9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: ?Description |
14 * Description: Implementation of VideoServices Stub |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <videoplayerengine.h> |
18 // Version : %version: % |
19 #include <videoservices.h> |
19 |
20 #include <videoserviceurifetch.h> |
20 #include "videoplayerengine.h" |
21 #include <videoserviceplay.h> |
21 #include "videoservices.h" |
|
22 #include "videoserviceurifetch.h" |
|
23 #include "videoserviceplay.h" |
|
24 #include "videoserviceview.h" |
|
25 #include "mpxvideo_debug.h" |
22 |
26 |
23 |
27 |
24 VideoServices *VideoServices::mInstance = 0; |
28 VideoServices *VideoServices::mInstance = 0; |
25 int VideoServices::mReferenceCount = 0; |
29 int VideoServices::mReferenceCount = 0; |
26 |
30 |
28 // VideoServices::instance() |
32 // VideoServices::instance() |
29 // ----------------------------------------------------------------------------- |
33 // ----------------------------------------------------------------------------- |
30 // |
34 // |
31 VideoServices* VideoServices::instance(QVideoPlayerEngine* engine) |
35 VideoServices* VideoServices::instance(QVideoPlayerEngine* engine) |
32 { |
36 { |
33 if(!mInstance) |
37 MPX_ENTER_EXIT(_L("VideoServices::instance()")); |
|
38 |
|
39 if ( ! mInstance ) |
34 { |
40 { |
35 mInstance = new VideoServices(engine); |
41 mInstance = new VideoServices( engine ); |
36 } |
42 } |
37 mInstance->mReferenceCount++; |
43 mInstance->mReferenceCount++; |
38 return mInstance; |
44 return mInstance; |
39 } |
45 } |
40 |
46 |
57 |
65 |
58 // ---------------------------------------------------------------------------- |
66 // ---------------------------------------------------------------------------- |
59 // VideoServices() |
67 // VideoServices() |
60 // ---------------------------------------------------------------------------- |
68 // ---------------------------------------------------------------------------- |
61 // |
69 // |
62 VideoServices::VideoServices(QVideoPlayerEngine* engine) : |
70 VideoServices::VideoServices(QVideoPlayerEngine* engine) |
63 mCurrentService(VideoServices::ENoService) |
71 : mCurrentService(VideoServices::ENoService) |
64 { |
72 { |
|
73 MPX_ENTER_EXIT(_L("VideoServices::VideoServices()")); |
|
74 |
65 mServiceUriFetch = new VideoServiceUriFetch(this); |
75 mServiceUriFetch = new VideoServiceUriFetch(this); |
66 mServicePlay = new VideoServicePlay(this, engine); |
76 mServicePlay = new VideoServicePlay(this, engine); |
|
77 mServiceView = new VideoServiceView(this, engine); |
67 } |
78 } |
68 |
79 |
69 // ---------------------------------------------------------------------------- |
80 // ---------------------------------------------------------------------------- |
70 // ~VideoServices() |
81 // ~VideoServices() |
71 // ---------------------------------------------------------------------------- |
82 // ---------------------------------------------------------------------------- |
72 // |
83 // |
73 VideoServices::~VideoServices() |
84 VideoServices::~VideoServices() |
74 { |
85 { |
|
86 MPX_ENTER_EXIT(_L("VideoServices::~VideoServices()")); |
|
87 |
75 delete mServiceUriFetch; |
88 delete mServiceUriFetch; |
76 delete mServicePlay; |
89 delete mServicePlay; |
|
90 delete mServiceView; |
77 } |
91 } |
78 |
92 |
79 |
93 |
80 // ---------------------------------------------------------------------------- |
94 // ---------------------------------------------------------------------------- |
81 // currentService() |
95 // currentService() |
82 // ---------------------------------------------------------------------------- |
96 // ---------------------------------------------------------------------------- |
83 // |
97 // |
84 VideoServices::TVideoService VideoServices::currentService() |
98 VideoServices::TVideoService VideoServices::currentService() |
85 { |
99 { |
|
100 MPX_DEBUG(_L("VideoServices::currentService() ret %d"), mCurrentService); |
86 return mCurrentService; |
101 return mCurrentService; |
87 } |
102 } |
88 |
103 |
89 |
104 |
90 // ---------------------------------------------------------------------------- |
105 // ---------------------------------------------------------------------------- |
91 // setCurrentService() |
106 // setCurrentService() |
92 // ---------------------------------------------------------------------------- |
107 // ---------------------------------------------------------------------------- |
93 // |
108 // |
94 void VideoServices::setCurrentService(VideoServices::TVideoService service) |
109 void VideoServices::setCurrentService( VideoServices::TVideoService service ) |
95 { |
110 { |
|
111 MPX_DEBUG(_L("VideoServices::setCurrentService(%d)"), service); |
96 mCurrentService = service; |
112 mCurrentService = service; |
97 } |
113 } |
98 |
114 |