Diffstat (limited to 'noncore/multimedia/opieplayer2/xinecontrol.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 16 |
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 @@ | |||
38 | #include <qpe/qpeapplication.h> | 38 | #include <qpe/qpeapplication.h> |
39 | #include "xinecontrol.h" | 39 | #include "xinecontrol.h" |
40 | #include "mediaplayerstate.h" | 40 | #include "mediaplayerstate.h" |
41 | #include "xinevideowidget.h" | ||
41 | 42 | ||
42 | XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWidget, | 43 | XineControl::XineControl( XineVideoWidget *xineWidget, |
43 | MediaPlayerState &_mediaPlayerState, | 44 | MediaPlayerState &_mediaPlayerState, |
44 | QObject *parent, const char *name ) | 45 | QObject *parent, const char *name ) |
45 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ) | 46 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) |
46 | { | 47 | { |
47 | 48 | ||
48 | libXine = new XINE::Lib( xineWidget ); | 49 | libXine = new XINE::Lib( xineWidget ); |
49 | 50 | ||
50 | connect ( videoContainerWidget, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) ); | ||
51 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); | 51 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); |
52 | connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) ); | 52 | connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) ); |
53 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 53 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); |
@@ -55,7 +55,7 @@ XineControl::XineControl( QWidget *videoContainerWidget, XineVideoWidget *xineWi | |||
55 | connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); | 55 | connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); |
56 | connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); | 56 | connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); |
57 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); | 57 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); |
58 | connect( libXine, SIGNAL( initialized() ), this, SIGNAL( initialized() ) ); | 58 | connect( libXine, SIGNAL( initialized() ), this, SLOT( xineInitialized() ) ); |
59 | 59 | ||
60 | disabledSuspendScreenSaver = FALSE; | 60 | disabledSuspendScreenSaver = FALSE; |
61 | } | 61 | } |
@@ -126,6 +126,14 @@ void XineControl::setGamma( int value ) { | |||
126 | libXine->setGamma( value ); | 126 | libXine->setGamma( value ); |
127 | } | 127 | } |
128 | 128 | ||
129 | void XineControl::xineInitialized() | ||
130 | { | ||
131 | connect( xineVideoWidget, SIGNAL( videoResized( const QSize & ) ), this, SLOT( videoResized ( const QSize & ) ) ); | ||
132 | libXine->resize( xineVideoWidget->videoSize() ); | ||
133 | |||
134 | emit initialized(); | ||
135 | } | ||
136 | |||
129 | void XineControl::stop( bool isSet ) { | 137 | void XineControl::stop( bool isSet ) { |
130 | if ( !isSet ) { | 138 | if ( !isSet ) { |
131 | libXine->stop(); | 139 | libXine->stop(); |