summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
authorsimon <simon>2002-12-02 10:25:36 (UTC)
committer simon <simon>2002-12-02 10:25:36 (UTC)
commit4447c70039ba1a3104bf229628699f33b8608973 (patch) (unidiff)
tree9810b07492a20f1ec9332da8c353469c8c120e2e /noncore/multimedia/opieplayer2/lib.cpp
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.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 19b64e8..1ac9809 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -44,2 +44,4 @@
44 44
45#include <assert.h>
46
45#include "xinevideowidget.h" 47#include "xinevideowidget.h"
@@ -221,4 +223,15 @@ int Lib::error() {
221 223
224void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType )
225{
226 assert( sendType == ThreadUtil::Channel::OneWay );
227 handleXineEvent( msg->type() );
228 delete msg;
229}
230
222void Lib::handleXineEvent( const xine_event_t* t ) { 231void Lib::handleXineEvent( const xine_event_t* t ) {
223 if ( t->type == XINE_EVENT_UI_PLAYBACK_FINISHED ) { 232 send( new ThreadUtil::ChannelMessage( t->type ), OneWay );
233}
234
235void Lib::handleXineEvent( int type ) {
236 if ( type == XINE_EVENT_UI_PLAYBACK_FINISHED ) {
224 emit stopped(); 237 emit stopped();