summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-09 20:11:31 (UTC)
committer harlekin <harlekin>2002-08-09 20:11:31 (UTC)
commit46eb53b1fd042d2591933a7d89a0e65b79140f16 (patch) (side-by-side diff)
treec5304881a9597b98f05adb04216b8042ca0d78b6
parentd8e5c405aa6bf33b8b1d59443926876e8f056e5b (diff)
downloadopie-46eb53b1fd042d2591933a7d89a0e65b79140f16.zip
opie-46eb53b1fd042d2591933a7d89a0e65b79140f16.tar.gz
opie-46eb53b1fd042d2591933a7d89a0e65b79140f16.tar.bz2
autoadvance to next media when current is finished (playlist)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp9
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.h4
2 files changed, 9 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index eba837e..8b9413f 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -46,12 +46,13 @@ XineControl::XineControl( QObject *parent, const char *name )
connect ( videoUI, 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 ) ) );
connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
+ connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
}
XineControl::~XineControl() {
delete libXine;
}
@@ -72,22 +73,26 @@ void XineControl::play( const QString& fileName ) {
} else {
libXine->setShowVideo( true );
}
// determine if slider is shown
// mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) );
- mediaPlayerState->setIsStreaming( libXine->isSeekable() );
+ mediaPlayerState->setIsStreaming( !libXine->isSeekable() );
// which gui (video / audio)
mediaPlayerState->setView( whichGui );
length();
position();
}
+void XineControl::nextMedia() {
+ mediaPlayerState->setNext();
+}
+
void XineControl::stop( bool isSet ) {
if ( !isSet) {
- libXine->stop();
+ libXine->stop( );
mediaPlayerState->setList();
//mediaPlayerState->setPlaying( false );
} else {
// play again
}
}
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h
index c7aefd4..712e298 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.h
+++ b/noncore/multimedia/opieplayer2/xinecontrol.h
@@ -52,14 +52,14 @@ public slots:
void setFullscreen( bool );
long currentTime();
void seekTo( long );
// get length of media file and set it
void length();
long position();
-
- void videoResized ( const QSize &s );
+ void nextMedia();
+ void videoResized ( const QSize &s );
private:
XINE::Lib *libXine;
MediaDetect mdetect;
long m_currentTime;
long m_position;