Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index 4b8dc81..34b85b9 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h | |||
@@ -46,25 +46,26 @@ | |||
46 | class XineVideoWidget; | 46 | class XineVideoWidget; |
47 | 47 | ||
48 | namespace XINE { | 48 | namespace XINE { |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Lib wrapps the simple interface | 51 | * Lib wrapps the simple interface |
52 | * of libxine for easy every day use | 52 | * of libxine for easy every day use |
53 | * This will become a full C++ Wrapper | 53 | * This will become a full C++ Wrapper |
54 | * It supports playing, pausing, info, | 54 | * It supports playing, pausing, info, |
55 | * stooping, seeking. | 55 | * stooping, seeking. |
56 | */ | 56 | */ |
57 | class Frame; | 57 | class Frame; |
58 | class Lib : public ThreadUtil::Channel { | 58 | class Lib : public ThreadUtil::Channel, private ThreadUtil::Thread |
59 | { | ||
59 | Q_OBJECT | 60 | Q_OBJECT |
60 | public: | 61 | public: |
61 | Lib(XineVideoWidget* = 0); | 62 | Lib(XineVideoWidget* = 0); |
62 | ~Lib(); | 63 | ~Lib(); |
63 | static int majorVersion(); | 64 | static int majorVersion(); |
64 | static int minorVersion(); | 65 | static int minorVersion(); |
65 | static int subVersion(); | 66 | static int subVersion(); |
66 | 67 | ||
67 | 68 | ||
68 | void resize ( const QSize &s ); | 69 | void resize ( const QSize &s ); |
69 | 70 | ||
70 | int play( const QString& fileName, | 71 | int play( const QString& fileName, |
@@ -168,32 +169,47 @@ namespace XINE { | |||
168 | * Returns the error code | 169 | * Returns the error code |
169 | * XINE_ERROR_NONE 0 | 170 | * XINE_ERROR_NONE 0 |
170 | * XINE_ERROR_NO_INPUT_PLUGIN 1 | 171 | * XINE_ERROR_NO_INPUT_PLUGIN 1 |
171 | * XINE_ERROR_NO_DEMUXER_PLUGIN 2 | 172 | * XINE_ERROR_NO_DEMUXER_PLUGIN 2 |
172 | * XINE_ERROR_DEMUXER_FAILED 3 | 173 | * XINE_ERROR_DEMUXER_FAILED 3 |
173 | */ | 174 | */ |
174 | int error() const; | 175 | int error() const; |
175 | 176 | ||
176 | signals: | 177 | signals: |
177 | 178 | ||
178 | void stopped(); | 179 | void stopped(); |
179 | 180 | ||
181 | void initialized(); | ||
182 | |||
180 | protected: | 183 | protected: |
181 | virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ); | 184 | virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ); |
182 | 185 | ||
186 | virtual void run(); | ||
187 | |||
183 | private: | 188 | private: |
184 | void initialize(); | 189 | void initialize(); |
185 | 190 | ||
186 | void assertInitialized() const; | 191 | void assertInitialized() const; |
187 | 192 | ||
193 | enum { XineMessageType = 1, InitializationMessageType }; | ||
194 | |||
195 | struct XineMessage : public ThreadUtil::ChannelMessage | ||
196 | { | ||
197 | XineMessage( int _xineEvent ) : ThreadUtil::ChannelMessage( XineMessageType ), | ||
198 | xineEvent( _xineEvent ) | ||
199 | {} | ||
200 | |||
201 | int xineEvent; | ||
202 | }; | ||
203 | |||
188 | mutable ThreadUtil::Mutex m_initGuard; | 204 | mutable ThreadUtil::Mutex m_initGuard; |
189 | bool m_initialized : 1; | 205 | bool m_initialized : 1; |
190 | 206 | ||
191 | int m_bytes_per_pixel; | 207 | int m_bytes_per_pixel; |
192 | bool m_video:1; | 208 | bool m_video:1; |
193 | XineVideoWidget *m_wid; | 209 | XineVideoWidget *m_wid; |
194 | xine_t *m_xine; | 210 | xine_t *m_xine; |
195 | xine_stream_t *m_stream; | 211 | xine_stream_t *m_stream; |
196 | xine_cfg_entry_t *m_config; | 212 | xine_cfg_entry_t *m_config; |
197 | xine_vo_driver_t *m_videoOutput; | 213 | xine_vo_driver_t *m_videoOutput; |
198 | xine_ao_driver_t* m_audioOutput; | 214 | xine_ao_driver_t* m_audioOutput; |
199 | xine_event_queue_t *m_queue; | 215 | xine_event_queue_t *m_queue; |