-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.h | 6 |
3 files changed, 20 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 299239b..8896cfe 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -96,3 +96,3 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
96 | else | 96 | else |
97 | assert( false ); | 97 | start(); |
98 | } | 98 | } |
@@ -101,4 +101,6 @@ void Lib::run() | |||
101 | { | 101 | { |
102 | qDebug( "Lib::run() started" ); | ||
102 | initialize(); | 103 | initialize(); |
103 | m_initialized = true; | 104 | m_initialized = true; |
105 | qDebug( "Lib::run() finished" ); | ||
104 | } | 106 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index d6fbb53..0ec6fad 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -37,2 +37,3 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla | |||
37 | m_xineControl = 0; | 37 | m_xineControl = 0; |
38 | xine = new XINE::Lib( XINE::Lib::InitializeInThread ); | ||
38 | 39 | ||
@@ -67,2 +68,7 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla | |||
67 | MediaPlayer::~MediaPlayer() { | 68 | MediaPlayer::~MediaPlayer() { |
69 | // this shold never happen, but one never knows... | ||
70 | if ( xine ) { | ||
71 | xine->ensureInitialized(); | ||
72 | delete xine; | ||
73 | } | ||
68 | delete m_xineControl; | 74 | delete m_xineControl; |
@@ -373,4 +379,8 @@ void MediaPlayer::recreateAudioAndVideoWidgets() const | |||
373 | 379 | ||
374 | XINE::Lib *xine = new XINE::Lib( XINE::Lib::InitializeImmediately ); | 380 | if ( !xine ) |
381 | xine = new XINE::Lib( XINE::Lib::InitializeImmediately ); | ||
382 | |||
375 | m_xineControl = new XineControl( xine, m_videoUI->vidWidget(), mediaPlayerState ); | 383 | m_xineControl = new XineControl( xine, m_videoUI->vidWidget(), mediaPlayerState ); |
384 | |||
385 | xine = 0; | ||
376 | } | 386 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.h b/noncore/multimedia/opieplayer2/mediaplayer.h index 351c884..cbe4d86 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.h +++ b/noncore/multimedia/opieplayer2/mediaplayer.h | |||
@@ -50,2 +50,7 @@ class VideoWidget; | |||
50 | 50 | ||
51 | namespace XINE | ||
52 | { | ||
53 | class Lib; | ||
54 | }; | ||
55 | |||
51 | class MediaPlayer : public QObject { | 56 | class MediaPlayer : public QObject { |
@@ -92,2 +97,3 @@ private: | |||
92 | mutable VideoWidget *m_videoUI; | 97 | mutable VideoWidget *m_videoUI; |
98 | mutable XINE::Lib *xine; | ||
93 | 99 | ||