summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/xinecontrol.cpp
Side-by-side diff
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
@@ -38,16 +38,16 @@
#include <qpe/qpeapplication.h>
#include "xinecontrol.h"
#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 )
{
libXine = new XINE::Lib( xineWidget );
- connect ( videoContainerWidget, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) );
connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) );
connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
@@ -55,7 +55,7 @@ XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWi
connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );
connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
- connect( libXine, SIGNAL( initialized() ), this, SIGNAL( initialized() ) );
+ connect( libXine, SIGNAL( initialized() ), this, SLOT( xineInitialized() ) );
disabledSuspendScreenSaver = FALSE;
}
@@ -126,6 +126,14 @@ void XineControl::setGamma( int value ) {
libXine->setGamma( 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 ) {
if ( !isSet ) {
libXine->stop();