Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 15 |
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 | |||
@@ -39,12 +39,14 @@ | |||
39 | 39 | ||
40 | #include <qfile.h> | 40 | #include <qfile.h> |
41 | 41 | ||
42 | #include <qgfx_qws.h> | 42 | #include <qgfx_qws.h> |
43 | #include <qdirectpainter_qws.h> | 43 | #include <qdirectpainter_qws.h> |
44 | 44 | ||
45 | #include <assert.h> | ||
46 | |||
45 | #include "xinevideowidget.h" | 47 | #include "xinevideowidget.h" |
46 | #include "frame.h" | 48 | #include "frame.h" |
47 | #include "lib.h" | 49 | #include "lib.h" |
48 | 50 | ||
49 | typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, | 51 | typedef void (*display_xine_frame_t) (void *user_data, uint8_t* frame, |
50 | int width, int height,int bytes ); | 52 | int width, int height,int bytes ); |
@@ -216,14 +218,25 @@ QString Lib::metaInfo( int number) { | |||
216 | } | 218 | } |
217 | 219 | ||
218 | int Lib::error() { | 220 | int Lib::error() { |
219 | return xine_get_error( m_stream ); | 221 | return xine_get_error( m_stream ); |
220 | }; | 222 | }; |
221 | 223 | ||
224 | void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ) | ||
225 | { | ||
226 | assert( sendType == ThreadUtil::Channel::OneWay ); | ||
227 | handleXineEvent( msg->type() ); | ||
228 | delete msg; | ||
229 | } | ||
230 | |||
222 | void Lib::handleXineEvent( const xine_event_t* t ) { | 231 | void 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 | |||
235 | void Lib::handleXineEvent( int type ) { | ||
236 | if ( type == XINE_EVENT_UI_PLAYBACK_FINISHED ) { | ||
224 | emit stopped(); | 237 | emit stopped(); |
225 | } | 238 | } |
226 | } | 239 | } |
227 | 240 | ||
228 | 241 | ||
229 | void Lib::setShowVideo( bool video ) { | 242 | void Lib::setShowVideo( bool video ) { |