summaryrefslogtreecommitdiff
path: root/noncore/multimedia
Unidiff
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h6
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 6ccf206..a52319b 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -410,52 +410,52 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
410 return; 410 return;
411 case AudioVolumeDown: 411 case AudioVolumeDown:
412 emit lessClicked(); 412 emit lessClicked();
413 return; 413 return;
414 case AudioForward: 414 case AudioForward:
415 emit forwardClicked(); 415 emit forwardClicked();
416 return; 416 return;
417 case AudioBack: 417 case AudioBack:
418 emit backClicked(); 418 emit backClicked();
419 return; 419 return;
420 } 420 }
421 } else if ( !isOnButton && audioButtons[i].isHeld ) { 421 } else if ( !isOnButton && audioButtons[i].isHeld ) {
422 audioButtons[i].isHeld = FALSE; 422 audioButtons[i].isHeld = FALSE;
423 toggleButton(i); 423 toggleButton(i);
424 } 424 }
425 } else { 425 } else {
426 if ( audioButtons[i].isHeld ) { 426 if ( audioButtons[i].isHeld ) {
427 audioButtons[i].isHeld = FALSE; 427 audioButtons[i].isHeld = FALSE;
428 if ( !audioButtons[i].isToggle ) { 428 if ( !audioButtons[i].isToggle ) {
429 setToggleButton( i, FALSE ); 429 setToggleButton( i, FALSE );
430 } 430 }
431 qDebug("mouseEvent %d", i); 431 qDebug("mouseEvent %d", i);
432 switch (i) { 432 switch (i) {
433 case AudioPlay: 433 case AudioPlay:
434 if( mediaPlayerState->isPaused ) { 434 if( mediaPlayerState->paused() ) {
435 mediaPlayerState->setPaused( FALSE ); 435 mediaPlayerState->setPaused( FALSE );
436 return; 436 return;
437 } else if( !mediaPlayerState->isPaused ) { 437 } else if( !mediaPlayerState->paused() ) {
438 mediaPlayerState->setPaused( TRUE ); 438 mediaPlayerState->setPaused( TRUE );
439 return; 439 return;
440 } 440 }
441 case AudioStop: mediaPlayerState->setPlaying(FALSE); return; 441 case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
442 case AudioNext: if( playList->whichList() ==0 ) mediaPlayerState->setNext(); return; 442 case AudioNext: if( playList->whichList() ==0 ) mediaPlayerState->setNext(); return;
443 case AudioPrevious: if( playList->whichList() ==0 ) mediaPlayerState->setPrev(); return; 443 case AudioPrevious: if( playList->whichList() ==0 ) mediaPlayerState->setPrev(); return;
444 case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return; 444 case AudioLoop: mediaPlayerState->setLooping(audioButtons[i].isDown); return;
445 case AudioVolumeUp: emit moreReleased(); return; 445 case AudioVolumeUp: emit moreReleased(); return;
446 case AudioVolumeDown: emit lessReleased(); return; 446 case AudioVolumeDown: emit lessReleased(); return;
447 case AudioPlayList: mediaPlayerState->setList(); return; 447 case AudioPlayList: mediaPlayerState->setList(); return;
448 case AudioForward: emit forwardReleased(); return; 448 case AudioForward: emit forwardReleased(); return;
449 case AudioBack: emit backReleased(); return; 449 case AudioBack: emit backReleased(); return;
450 } 450 }
451 } 451 }
452 } 452 }
453 } 453 }
454} 454}
455 455
456 456
457void AudioWidget::mousePressEvent( QMouseEvent *event ) { 457void AudioWidget::mousePressEvent( QMouseEvent *event ) {
458 mouseMoveEvent( event ); 458 mouseMoveEvent( event );
459} 459}
460 460
461 461
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 8c4e09e..154e3b0 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -29,51 +29,48 @@
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34// this file is based on work by trolltech 34// this file is based on work by trolltech
35 35
36#ifndef MEDIA_PLAYER_STATE_H 36#ifndef MEDIA_PLAYER_STATE_H
37#define MEDIA_PLAYER_STATE_H 37#define MEDIA_PLAYER_STATE_H
38 38
39 39
40#include <qobject.h> 40#include <qobject.h>
41 41
42 42
43class MediaPlayerDecoder; 43class MediaPlayerDecoder;
44class Config; 44class Config;
45 45
46 46
47class MediaPlayerState : public QObject { 47class MediaPlayerState : public QObject {
48Q_OBJECT 48Q_OBJECT
49public: 49public:
50 MediaPlayerState( QObject *parent, const char *name ); 50 MediaPlayerState( QObject *parent, const char *name );
51 ~MediaPlayerState(); 51 ~MediaPlayerState();
52 52
53 bool isPaused;
54 bool isPlaying;
55 bool isStoped;
56 bool streaming(); 53 bool streaming();
57 bool seekable(); 54 bool seekable();
58 bool fullscreen(); 55 bool fullscreen();
59 bool scaled(); 56 bool scaled();
60 bool looping(); 57 bool looping();
61 bool shuffled(); 58 bool shuffled();
62 bool playlist(); 59 bool playlist();
63 bool paused(); 60 bool paused();
64 bool playing(); 61 bool playing();
65 bool stop(); 62 bool stop();
66 long position(); 63 long position();
67 long length(); 64 long length();
68 char view(); 65 char view();
69 66
70public slots: 67public slots:
71 void setIsStreaming( bool b ); 68 void setIsStreaming( bool b );
72 void setIsSeekable( bool b ); 69 void setIsSeekable( bool b );
73 void setFullscreen( bool b ); 70 void setFullscreen( bool b );
74 void setScaled( bool b ); 71 void setScaled( bool b );
75 void setLooping( bool b ); 72 void setLooping( bool b );
76 void setShuffled( bool b ); 73 void setShuffled( bool b );
77 void setPlaylist( bool b ); 74 void setPlaylist( bool b );
78 void setPaused( bool b ); 75 void setPaused( bool b );
79 void setPlaying( bool b ); 76 void setPlaying( bool b );
@@ -109,35 +106,38 @@ signals:
109 void shuffledToggled( bool ); 106 void shuffledToggled( bool );
110 void playlistToggled( bool ); 107 void playlistToggled( bool );
111 void pausedToggled( bool ); 108 void pausedToggled( bool );
112 void playingToggled( bool ); 109 void playingToggled( bool );
113 void stopToggled( bool ); 110 void stopToggled( bool );
114 void positionChanged( long ); // When the slider is moved 111 void positionChanged( long ); // When the slider is moved
115 void positionUpdated( long ); // When the media file progresses 112 void positionUpdated( long ); // When the media file progresses
116 void lengthChanged( long ); 113 void lengthChanged( long );
117 void viewChanged( char ); 114 void viewChanged( char );
118 void isSeekableToggled( bool ); 115 void isSeekableToggled( bool );
119 void blankToggled( bool ); 116 void blankToggled( bool );
120 void videoGammaChanged( int ); 117 void videoGammaChanged( int );
121 void prev(); 118 void prev();
122 void next(); 119 void next();
123 120
124private: 121private:
125 bool isStreaming; 122 bool isStreaming;
126 bool isSeekable; 123 bool isSeekable;
127 bool isFullscreen; 124 bool isFullscreen;
128 bool isScaled; 125 bool isScaled;
129 bool isBlanked; 126 bool isBlanked;
130 bool isLooping; 127 bool isLooping;
131 bool isShuffled; 128 bool isShuffled;
132 bool usePlaylist; 129 bool usePlaylist;
130 bool isPaused;
131 bool isPlaying;
132 bool isStoped;
133 long curPosition; 133 long curPosition;
134 long curLength; 134 long curLength;
135 char curView; 135 char curView;
136 int videoGamma; 136 int videoGamma;
137 void readConfig( Config& cfg ); 137 void readConfig( Config& cfg );
138 138
139}; 139};
140 140
141 141
142#endif // MEDIA_PLAYER_STATE_H 142#endif // MEDIA_PLAYER_STATE_H
143 143
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index c643273..3a757f0 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -306,53 +306,53 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
306 306
307 switch (i) { 307 switch (i) {
308 case VideoVolUp: 308 case VideoVolUp:
309 emit moreClicked(); 309 emit moreClicked();
310 return; 310 return;
311 case VideoVolDown: 311 case VideoVolDown:
312 emit lessClicked(); 312 emit lessClicked();
313 return; 313 return;
314 } 314 }
315 } else if ( !isOnButton && videoButtons[i].isHeld ) { 315 } else if ( !isOnButton && videoButtons[i].isHeld ) {
316 videoButtons[i].isHeld = FALSE; 316 videoButtons[i].isHeld = FALSE;
317 toggleButton(i); 317 toggleButton(i);
318 } 318 }
319 } else { 319 } else {
320 320
321 if ( videoButtons[i].isHeld ) { 321 if ( videoButtons[i].isHeld ) {
322 videoButtons[i].isHeld = FALSE; 322 videoButtons[i].isHeld = FALSE;
323 if ( !videoButtons[i].isToggle ) { 323 if ( !videoButtons[i].isToggle ) {
324 setToggleButton( i, FALSE ); 324 setToggleButton( i, FALSE );
325 } 325 }
326 326
327 switch(i) { 327 switch(i) {
328 328
329 case VideoPlay: { 329 case VideoPlay: {
330 if( mediaPlayerState->isPaused ) { 330 if( mediaPlayerState->paused() ) {
331 setToggleButton( i, FALSE ); 331 setToggleButton( i, FALSE );
332 mediaPlayerState->setPaused( FALSE ); 332 mediaPlayerState->setPaused( FALSE );
333 return; 333 return;
334 } else if( !mediaPlayerState->isPaused ) { 334 } else if( !mediaPlayerState->paused() ) {
335 setToggleButton( i, TRUE ); 335 setToggleButton( i, TRUE );
336 mediaPlayerState->setPaused( TRUE ); 336 mediaPlayerState->setPaused( TRUE );
337 return; 337 return;
338 } else { 338 } else {
339 return; 339 return;
340 } 340 }
341 } 341 }
342 342
343 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return; 343 case VideoStop: mediaPlayerState->setPlaying( FALSE ); return;
344 case VideoNext: if(playList->whichList() ==0) mediaPlayerState->setNext(); return; 344 case VideoNext: if(playList->whichList() ==0) mediaPlayerState->setNext(); return;
345 case VideoPrevious: if(playList->whichList() ==0) mediaPlayerState->setPrev(); return; 345 case VideoPrevious: if(playList->whichList() ==0) mediaPlayerState->setPrev(); return;
346 case VideoVolUp: emit moreReleased(); return; 346 case VideoVolUp: emit moreReleased(); return;
347 case VideoVolDown: emit lessReleased(); return; 347 case VideoVolDown: emit lessReleased(); return;
348 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; 348 case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return;
349 } 349 }
350 } 350 }
351 } 351 }
352 } 352 }
353} 353}
354 354
355void VideoWidget::mousePressEvent( QMouseEvent *event ) { 355void VideoWidget::mousePressEvent( QMouseEvent *event ) {
356 mouseMoveEvent( event ); 356 mouseMoveEvent( event );
357} 357}
358 358
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index c46994a..f6289d7 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -159,49 +159,49 @@ long XineControl::currentTime() {
159 // todo: jede sekunde überprüfen 159 // todo: jede sekunde überprüfen
160 m_currentTime = libXine->currentTime(); 160 m_currentTime = libXine->currentTime();
161 return m_currentTime; 161 return m_currentTime;
162 QTimer::singleShot( 1000, this, SLOT( currentTime() ) ); 162 QTimer::singleShot( 1000, this, SLOT( currentTime() ) );
163} 163}
164 164
165/** 165/**
166 * Set the length of the media file 166 * Set the length of the media file
167 */ 167 */
168void XineControl::length() { 168void XineControl::length() {
169 m_length = libXine->length(); 169 m_length = libXine->length();
170 mediaPlayerState->setLength( m_length ); 170 mediaPlayerState->setLength( m_length );
171} 171}
172 172
173 173
174/** 174/**
175 * Reports the position the xine backend is at right now 175 * Reports the position the xine backend is at right now
176 * @return long the postion in seconds 176 * @return long the postion in seconds
177 */ 177 */
178long XineControl::position() { 178long XineControl::position() {
179 m_position = ( currentTime() ); 179 m_position = ( currentTime() );
180 mediaPlayerState->updatePosition( m_position ); 180 mediaPlayerState->updatePosition( m_position );
181 long emitPos = (long)m_position; 181 long emitPos = (long)m_position;
182 emit positionChanged( emitPos ); 182 emit positionChanged( emitPos );
183 if( mediaPlayerState->isPlaying ) { 183 if( mediaPlayerState->playing() ) {
184 // needs to be stopped the media is stopped 184 // needs to be stopped the media is stopped
185 QTimer::singleShot( 1000, this, SLOT( position() ) ); 185 QTimer::singleShot( 1000, this, SLOT( position() ) );
186 } 186 }
187 // qDebug("POSITION : %d", m_position); 187 // qDebug("POSITION : %d", m_position);
188 return m_position; 188 return m_position;
189} 189}
190 190
191/** 191/**
192 * Set videoplayback to fullscreen 192 * Set videoplayback to fullscreen
193 * @param isSet 193 * @param isSet
194 */ 194 */
195void XineControl::setFullscreen( bool isSet ) { 195void XineControl::setFullscreen( bool isSet ) {
196 libXine->showVideoFullScreen( isSet ); 196 libXine->showVideoFullScreen( isSet );
197} 197}
198 198
199 199
200QString XineControl::getMetaInfo() { 200QString XineControl::getMetaInfo() {
201 201
202 QString returnString; 202 QString returnString;
203 203
204 if ( !libXine->metaInfo( 0 ).isEmpty() ) { 204 if ( !libXine->metaInfo( 0 ).isEmpty() ) {
205 returnString += tr( " Title: " + libXine->metaInfo( 0 ) ); 205 returnString += tr( " Title: " + libXine->metaInfo( 0 ) );
206 } 206 }
207 207