summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.h
authorsimon <simon>2002-12-02 10:25:36 (UTC)
committer simon <simon>2002-12-02 10:25:36 (UTC)
commit4447c70039ba1a3104bf229628699f33b8608973 (patch) (side-by-side diff)
tree9810b07492a20f1ec9332da8c353469c8c120e2e /noncore/multimedia/opieplayer2/lib.h
parent2f11390d99fba4eefa330322e11280802fb6dc26 (diff)
downloadopie-4447c70039ba1a3104bf229628699f33b8608973.zip
opie-4447c70039ba1a3104bf229628699f33b8608973.tar.gz
opie-4447c70039ba1a3104bf229628699f33b8608973.tar.bz2
- put a thread pipe between the xine callback handler and the receiver
on qt side, to avoid problems like repaints from within a non-gui thread
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
@@ -38,25 +38,27 @@
#include <qstring.h>
#include <qobject.h>
#include <xine.h>
//#include "xine.h"
+#include "threadutil.h"
+
class XineVideoWidget;
namespace XINE {
/**
* Lib wrapps the simple interface
* of libxine for easy every day use
* This will become a full C++ Wrapper
* It supports playing, pausing, info,
* stooping, seeking.
*/
class Frame;
- class Lib : public QObject {
+ class Lib : public ThreadUtil::Channel {
Q_OBJECT
public:
Lib(XineVideoWidget* = 0);
~Lib();
QCString version();
int majorVersion()/*const*/;
@@ -173,12 +175,15 @@ namespace XINE {
int error() /*const*/;
signals:
void stopped();
+ protected:
+ virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType );
+
private:
int m_bytes_per_pixel;
int m_length, m_pos, m_time;
int m_major_version, m_minor_version, m_sub_version;
bool m_video:1;
XineVideoWidget *m_wid;
@@ -187,12 +192,13 @@ namespace XINE {
xine_cfg_entry_t *m_config;
xine_vo_driver_t *m_videoOutput;
xine_ao_driver_t* m_audioOutput;
xine_event_queue_t *m_queue;
void handleXineEvent( const xine_event_t* t );
+ void handleXineEvent( int type );
void drawFrame( uint8_t* frame, int width, int height, int bytes );
// C -> C++ bridge for the event system
static void xine_event_handler( void* user_data, const xine_event_t* t);
static void xine_display_frame( void* user_data, uint8_t* frame ,
int width, int height, int bytes );
};