-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 1b5fd51..9e818eb 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp @@ -166,18 +166,18 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) { return xine_play( m_stream, startPos, start_time); } void Lib::stop() { qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); xine_stop( m_stream ); } -void Lib::pause() { - xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); +void Lib::pause( bool toggle ) { + xine_set_param( m_stream, XINE_PARAM_SPEED, toggle ? XINE_SPEED_PAUSE : XINE_SPEED_NORMAL ); } int Lib::speed() const { return xine_get_param ( m_stream, XINE_PARAM_SPEED ); } void Lib::setSpeed( int speed ) { xine_set_param ( m_stream, XINE_PARAM_SPEED, speed ); diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index 3224cb9..37a4f9a 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h @@ -66,17 +66,17 @@ namespace XINE { void resize ( const QSize &s ); int play( const QString& fileName, int startPos = 0, int start_time = 0 ); void stop(); - void pause(); + void pause( bool toggle ); int speed() const; /** * Set the speed of the stream, if codec supports it * XINE_SPEED_PAUSE 0 * XINE_SPEED_SLOW_4 1 * XINE_SPEED_SLOW_2 2 diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 6f1cd9c..0e81fa2 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -139,21 +139,17 @@ void XineControl::stop( bool isSet ) { } } /** * Pause playback * @isSet */ void XineControl::pause( bool isSet) { - if ( isSet ) { - libXine->pause(); - } else { - libXine->play( m_fileName, 0, m_currentTime ); - } + libXine->pause( isSet ); } /** * get current time in playback */ long XineControl::currentTime() { // todo: jede sekunde überprüfen |