summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
authorsimon <simon>2002-12-11 11:40:20 (UTC)
committer simon <simon>2002-12-11 11:40:20 (UTC)
commit03ac4af4d6014bbd46b12d5fe89ee2cc73941080 (patch) (side-by-side diff)
treef88296c20f73e7e46d03daff3000ef34acd31bb0 /noncore/multimedia/opieplayer2/xinecontrol.cpp
parent9431b69a1efab055c28c77e780df012b0a476a57 (diff)
downloadopie-03ac4af4d6014bbd46b12d5fe89ee2cc73941080.zip
opie-03ac4af4d6014bbd46b12d5fe89ee2cc73941080.tar.gz
opie-03ac4af4d6014bbd46b12d5fe89ee2cc73941080.tar.bz2
- slight simplification of XineControl constructor
- fixed a race between the video resizing and the xine initialization
Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 14e71d9..e791c3b 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -40,7 +40,8 @@
#include "mediaplayerstate.h"
+#include "xinevideowidget.h"
-XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWidget,
+XineControl::XineControl( XineVideoWidget *xineWidget,
MediaPlayerState &_mediaPlayerState,
QObject *parent, const char *name )
- : QObject( parent, name ), mediaPlayerState( _mediaPlayerState )
+ : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
{
@@ -49,3 +50,2 @@ XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWi
- connect ( videoContainerWidget, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) );
connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
@@ -57,3 +57,3 @@ XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWi
connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
- connect( libXine, SIGNAL( initialized() ), this, SIGNAL( initialized() ) );
+ connect( libXine, SIGNAL( initialized() ), this, SLOT( xineInitialized() ) );
@@ -128,2 +128,10 @@ void XineControl::setGamma( int value ) {
+void XineControl::xineInitialized()
+{
+ connect( xineVideoWidget, SIGNAL( videoResized( const QSize & ) ), this, SLOT( videoResized ( const QSize & ) ) );
+ libXine->resize( xineVideoWidget->videoSize() );
+
+ emit initialized();
+}
+
void XineControl::stop( bool isSet ) {