summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.h
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index 38938a1..75b9f12 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -32,37 +32,39 @@
32*/ 32*/
33 33
34#ifndef ZECKEXINELIB_H 34#ifndef ZECKEXINELIB_H
35#define ZECKEXINELIB_H 35#define ZECKEXINELIB_H
36 36
37#include <qcstring.h> 37#include <qcstring.h>
38#include <qstring.h> 38#include <qstring.h>
39#include <qobject.h> 39#include <qobject.h>
40 40
41#include <xine.h> 41#include <xine.h>
42//#include "xine.h" 42//#include "xine.h"
43 43
44#include "threadutil.h"
45
44class XineVideoWidget; 46class XineVideoWidget;
45 47
46namespace XINE { 48namespace XINE {
47 49
48 /** 50 /**
49 * Lib wrapps the simple interface 51 * Lib wrapps the simple interface
50 * of libxine for easy every day use 52 * of libxine for easy every day use
51 * This will become a full C++ Wrapper 53 * This will become a full C++ Wrapper
52 * It supports playing, pausing, info, 54 * It supports playing, pausing, info,
53 * stooping, seeking. 55 * stooping, seeking.
54 */ 56 */
55 class Frame; 57 class Frame;
56 class Lib : public QObject { 58 class Lib : public ThreadUtil::Channel {
57 Q_OBJECT 59 Q_OBJECT
58 public: 60 public:
59 Lib(XineVideoWidget* = 0); 61 Lib(XineVideoWidget* = 0);
60 ~Lib(); 62 ~Lib();
61 QCString version(); 63 QCString version();
62 int majorVersion()/*const*/; 64 int majorVersion()/*const*/;
63 int minorVersion()/*const*/; 65 int minorVersion()/*const*/;
64 int subVersion()/*const*/; 66 int subVersion()/*const*/;
65 67
66 68
67 void resize ( const QSize &s ); 69 void resize ( const QSize &s );
68 70
@@ -167,36 +169,40 @@ namespace XINE {
167 * Returns the error code 169 * Returns the error code
168 * XINE_ERROR_NONE 0 170 * XINE_ERROR_NONE 0
169 * XINE_ERROR_NO_INPUT_PLUGIN 1 171 * XINE_ERROR_NO_INPUT_PLUGIN 1
170 * XINE_ERROR_NO_DEMUXER_PLUGIN 2 172 * XINE_ERROR_NO_DEMUXER_PLUGIN 2
171 * XINE_ERROR_DEMUXER_FAILED 3 173 * XINE_ERROR_DEMUXER_FAILED 3
172 */ 174 */
173 int error() /*const*/; 175 int error() /*const*/;
174 176
175 signals: 177 signals:
176 178
177 void stopped(); 179 void stopped();
178 180
181 protected:
182 virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType );
183
179 private: 184 private:
180 int m_bytes_per_pixel; 185 int m_bytes_per_pixel;
181 int m_length, m_pos, m_time; 186 int m_length, m_pos, m_time;
182 int m_major_version, m_minor_version, m_sub_version; 187 int m_major_version, m_minor_version, m_sub_version;
183 bool m_video:1; 188 bool m_video:1;
184 XineVideoWidget *m_wid; 189 XineVideoWidget *m_wid;
185 xine_t *m_xine; 190 xine_t *m_xine;
186 xine_stream_t *m_stream; 191 xine_stream_t *m_stream;
187 xine_cfg_entry_t *m_config; 192 xine_cfg_entry_t *m_config;
188 xine_vo_driver_t *m_videoOutput; 193 xine_vo_driver_t *m_videoOutput;
189 xine_ao_driver_t* m_audioOutput; 194 xine_ao_driver_t* m_audioOutput;
190 xine_event_queue_t *m_queue; 195 xine_event_queue_t *m_queue;
191 196
192 void handleXineEvent( const xine_event_t* t ); 197 void handleXineEvent( const xine_event_t* t );
198 void handleXineEvent( int type );
193 void drawFrame( uint8_t* frame, int width, int height, int bytes ); 199 void drawFrame( uint8_t* frame, int width, int height, int bytes );
194 // C -> C++ bridge for the event system 200 // C -> C++ bridge for the event system
195 static void xine_event_handler( void* user_data, const xine_event_t* t); 201 static void xine_event_handler( void* user_data, const xine_event_t* t);
196 static void xine_display_frame( void* user_data, uint8_t* frame , 202 static void xine_display_frame( void* user_data, uint8_t* frame ,
197 int width, int height, int bytes ); 203 int width, int height, int bytes );
198 }; 204 };
199}; 205};
200 206
201 207
202#endif 208#endif