-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 ) { | |||
166 | return xine_play( m_stream, startPos, start_time); | 166 | return xine_play( m_stream, startPos, start_time); |
167 | } | 167 | } |
168 | 168 | ||
169 | void Lib::stop() { | 169 | void Lib::stop() { |
170 | qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); | 170 | qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); |
171 | xine_stop( m_stream ); | 171 | xine_stop( m_stream ); |
172 | } | 172 | } |
173 | 173 | ||
174 | void Lib::pause() { | 174 | void Lib::pause( bool toggle ) { |
175 | xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); | 175 | xine_set_param( m_stream, XINE_PARAM_SPEED, toggle ? XINE_SPEED_PAUSE : XINE_SPEED_NORMAL ); |
176 | } | 176 | } |
177 | 177 | ||
178 | int Lib::speed() const { | 178 | int Lib::speed() const { |
179 | return xine_get_param ( m_stream, XINE_PARAM_SPEED ); | 179 | return xine_get_param ( m_stream, XINE_PARAM_SPEED ); |
180 | } | 180 | } |
181 | 181 | ||
182 | void Lib::setSpeed( int speed ) { | 182 | void Lib::setSpeed( int speed ) { |
183 | xine_set_param ( m_stream, XINE_PARAM_SPEED, speed ); | 183 | 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 { | |||
66 | 66 | ||
67 | 67 | ||
68 | void resize ( const QSize &s ); | 68 | void resize ( const QSize &s ); |
69 | 69 | ||
70 | int play( const QString& fileName, | 70 | int play( const QString& fileName, |
71 | int startPos = 0, | 71 | int startPos = 0, |
72 | int start_time = 0 ); | 72 | int start_time = 0 ); |
73 | void stop(); | 73 | void stop(); |
74 | void pause(); | 74 | void pause( bool toggle ); |
75 | 75 | ||
76 | int speed() const; | 76 | int speed() const; |
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Set the speed of the stream, if codec supports it | 79 | * Set the speed of the stream, if codec supports it |
80 | * XINE_SPEED_PAUSE 0 | 80 | * XINE_SPEED_PAUSE 0 |
81 | * XINE_SPEED_SLOW_4 1 | 81 | * XINE_SPEED_SLOW_4 1 |
82 | * XINE_SPEED_SLOW_2 2 | 82 | * 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 ) { | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * Pause playback | 143 | * Pause playback |
144 | * @isSet | 144 | * @isSet |
145 | */ | 145 | */ |
146 | void XineControl::pause( bool isSet) { | 146 | void XineControl::pause( bool isSet) { |
147 | if ( isSet ) { | 147 | libXine->pause( isSet ); |
148 | libXine->pause(); | ||
149 | } else { | ||
150 | libXine->play( m_fileName, 0, m_currentTime ); | ||
151 | } | ||
152 | } | 148 | } |
153 | 149 | ||
154 | 150 | ||
155 | /** | 151 | /** |
156 | * get current time in playback | 152 | * get current time in playback |
157 | */ | 153 | */ |
158 | long XineControl::currentTime() { | 154 | long XineControl::currentTime() { |
159 | // todo: jede sekunde überprüfen | 155 | // todo: jede sekunde überprüfen |