-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 2 |
4 files changed, 19 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 84194b7..299239b 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -128,10 +128,7 @@ void Lib::initialize() | |||
128 | 128 | ||
129 | if (m_wid != 0 ) { | 129 | if (m_wid != 0 ) { |
130 | printf( "!0\n" ); | 130 | printf( "!0\n" ); |
131 | resize ( m_wid-> size ( ) ); | 131 | setWidget( m_wid ); |
132 | ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); | ||
133 | |||
134 | // m_wid->repaint(); | ||
135 | } | 132 | } |
136 | 133 | ||
137 | m_queue = xine_event_new_queue (m_stream); | 134 | m_queue = xine_event_new_queue (m_stream); |
@@ -294,6 +291,14 @@ void Lib::ensureInitialized() | |||
294 | qDebug( "initialization thread finished!" ); | 291 | qDebug( "initialization thread finished!" ); |
295 | } | 292 | } |
296 | 293 | ||
294 | void Lib::setWidget( XineVideoWidget *widget ) | ||
295 | { | ||
296 | m_wid = widget; | ||
297 | resize ( m_wid-> size ( ) ); | ||
298 | ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); | ||
299 | m_wid->repaint(); | ||
300 | } | ||
301 | |||
297 | void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ) | 302 | void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ) |
298 | { | 303 | { |
299 | assert( sendType == ThreadUtil::Channel::OneWay ); | 304 | assert( sendType == ThreadUtil::Channel::OneWay ); |
@@ -381,5 +386,8 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) { | |||
381 | qWarning("not showing video now"); | 386 | qWarning("not showing video now"); |
382 | return; | 387 | return; |
383 | } | 388 | } |
389 | |||
390 | assert( m_wid ); | ||
391 | |||
384 | m_wid-> setVideoFrame ( frame, width, height, bytes ); | 392 | m_wid-> setVideoFrame ( frame, width, height, bytes ); |
385 | } | 393 | } |
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index 6b67f67..181735c 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h | |||
@@ -179,6 +179,8 @@ namespace XINE { | |||
179 | 179 | ||
180 | void ensureInitialized(); | 180 | void ensureInitialized(); |
181 | 181 | ||
182 | void setWidget( XineVideoWidget *widget ); | ||
183 | |||
182 | signals: | 184 | signals: |
183 | 185 | ||
184 | void stopped(); | 186 | void stopped(); |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 963e783..d6fbb53 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "audiowidget.h" | 15 | #include "audiowidget.h" |
16 | #include "videowidget.h" | 16 | #include "videowidget.h" |
17 | #include "volumecontrol.h" | 17 | #include "volumecontrol.h" |
18 | #include "lib.h" | ||
18 | 19 | ||
19 | #include "mediaplayerstate.h" | 20 | #include "mediaplayerstate.h" |
20 | 21 | ||
@@ -370,7 +371,8 @@ void MediaPlayer::recreateAudioAndVideoWidgets() const | |||
370 | connect( m_videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | 371 | connect( m_videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); |
371 | connect( m_videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | 372 | connect( m_videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); |
372 | 373 | ||
373 | m_xineControl = new XineControl( m_videoUI->vidWidget(), mediaPlayerState ); | 374 | XINE::Lib *xine = new XINE::Lib( XINE::Lib::InitializeImmediately ); |
375 | m_xineControl = new XineControl( xine, m_videoUI->vidWidget(), mediaPlayerState ); | ||
374 | } | 376 | } |
375 | 377 | ||
376 | AudioWidget *MediaPlayer::audioUI() const | 378 | AudioWidget *MediaPlayer::audioUI() const |
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 7c54499..1c489e3 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -57,6 +57,8 @@ XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, | |||
57 | { | 57 | { |
58 | xine->ensureInitialized(); | 58 | xine->ensureInitialized(); |
59 | 59 | ||
60 | xine->setWidget( xineWidget ); | ||
61 | |||
60 | init(); | 62 | init(); |
61 | } | 63 | } |
62 | 64 | ||