summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.h
authorsimon <simon>2002-12-11 00:29:22 (UTC)
committer simon <simon>2002-12-11 00:29:22 (UTC)
commit7d5782ef4fd19498a141ed68c23145dcc6128146 (patch) (unidiff)
tree8cdbd360962b3fa161823fa88b43e9584b23a464 /noncore/multimedia/opieplayer2/lib.h
parent6c71f5ccd9506234a317d9ff3d119613c457e769 (diff)
downloadopie-7d5782ef4fd19498a141ed68c23145dcc6128146.zip
opie-7d5782ef4fd19498a141ed68c23145dcc6128146.tar.gz
opie-7d5782ef4fd19498a141ed68c23145dcc6128146.tar.bz2
- initialized xine in a background thread. much time is still spend in
skin loading though.
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.h18
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
@@ -52,13 +52,14 @@ namespace XINE {
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();
@@ -174,20 +175,35 @@ namespace XINE {
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;