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
@@ -129,8 +129,5 @@ void Lib::initialize()
if (m_wid != 0 ) {
printf( "!0\n" );
- resize ( m_wid-> size ( ) );
- ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
-
-// m_wid->repaint();
+ setWidget( m_wid );
}
@@ -295,4 +292,12 @@ 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 )
{
@@ -382,4 +387,7 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
return;
}
+
+ 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
@@ -180,4 +180,6 @@ namespace XINE {
void ensureInitialized();
+ 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
@@ -16,4 +16,5 @@
#include "videowidget.h"
#include "volumecontrol.h"
+#include "lib.h"
#include "mediaplayerstate.h"
@@ -371,5 +372,6 @@ void MediaPlayer::recreateAudioAndVideoWidgets() const
connect( m_videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
- 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
@@ -58,4 +58,6 @@ XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
xine->ensureInitialized();
+ xine->setWidget( xineWidget );
+
init();
}