summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp16
-rw-r--r--noncore/multimedia/opieplayer2/lib.h2
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
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
@@ -130,6 +130,3 @@ void Lib::initialize()
printf( "!0\n" );
- resize ( m_wid-> size ( ) );
- ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
-
-// m_wid->repaint();
+ setWidget( m_wid );
}
@@ -296,2 +293,10 @@ void Lib::ensureInitialized()
+void Lib::setWidget( XineVideoWidget *widget )
+{
+ m_wid = widget;
+ resize ( m_wid-> size ( ) );
+ ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
+ m_wid->repaint();
+}
+
void Lib::receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType )
@@ -383,2 +388,5 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
}
+
+ assert( m_wid );
+
m_wid-> setVideoFrame ( frame, width, height, bytes );
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
@@ -181,2 +181,4 @@ namespace XINE {
+ void setWidget( XineVideoWidget *widget );
+
signals:
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
@@ -17,2 +17,3 @@
#include "volumecontrol.h"
+#include "lib.h"
@@ -372,3 +373,4 @@ void MediaPlayer::recreateAudioAndVideoWidgets() const
- m_xineControl = new XineControl( m_videoUI->vidWidget(), mediaPlayerState );
+ XINE::Lib *xine = new XINE::Lib( XINE::Lib::InitializeImmediately );
+ m_xineControl = new XineControl( xine, m_videoUI->vidWidget(), mediaPlayerState );
}
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
@@ -59,2 +59,4 @@ XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
+ xine->setWidget( xineWidget );
+
init();