Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index cef46a1..84194b7 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -99,7 +99,8 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
99 | 99 | ||
100 | void Lib::run() | 100 | void Lib::run() |
101 | { | 101 | { |
102 | assert( false ); | 102 | initialize(); |
103 | m_initialized = true; | ||
103 | } | 104 | } |
104 | 105 | ||
105 | void Lib::initialize() | 106 | void Lib::initialize() |
@@ -283,6 +284,16 @@ int Lib::error() const { | |||
283 | return xine_get_error( m_stream ); | 284 | return xine_get_error( m_stream ); |
284 | }; | 285 | }; |
285 | 286 | ||
287 | void Lib::ensureInitialized() | ||
288 | { | ||
289 | if ( m_initialized ) | ||
290 | return; | ||
291 | |||
292 | qDebug( "waiting for initialization thread to finish" ); | ||
293 | wait(); | ||
294 | qDebug( "initialization thread finished!" ); | ||
295 | } | ||
296 | |||
286 | void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ) | 297 | void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ) |
287 | { | 298 | { |
288 | assert( sendType == ThreadUtil::Channel::OneWay ); | 299 | assert( sendType == ThreadUtil::Channel::OneWay ); |