summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
authorsimon <simon>2002-12-13 23:15:53 (UTC)
committer simon <simon>2002-12-13 23:15:53 (UTC)
commit1830ae3069a3ca35df678ce6d1700bf31d968a5c (patch) (side-by-side diff)
tree45b5b64e3370f491c701e0f9e6128edccc6c0496 /noncore/multimedia/opieplayer2/lib.cpp
parent5e7ea7ebd8175993f951731e371b4e3609df654b (diff)
downloadopie-1830ae3069a3ca35df678ce6d1700bf31d968a5c.zip
opie-1830ae3069a3ca35df678ce6d1700bf31d968a5c.tar.gz
opie-1830ae3069a3ca35df678ce6d1700bf31d968a5c.tar.bz2
- allow delayed assignment of the widget on the XINE::Lib object
- make use of that API in XineControl and MediaPlayer
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore 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
@@ -128,10 +128,7 @@ 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 );
}
m_queue = xine_event_new_queue (m_stream);
@@ -294,6 +291,14 @@ void Lib::ensureInitialized()
qDebug( "initialization thread finished!" );
}
+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 )
{
assert( sendType == ThreadUtil::Channel::OneWay );
@@ -381,5 +386,8 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
qWarning("not showing video now");
return;
}
+
+ assert( m_wid );
+
m_wid-> setVideoFrame ( frame, width, height, bytes );
}