summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp16
1 files changed, 12 insertions, 4 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 );