-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 33 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 7 |
8 files changed, 46 insertions, 26 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index a6fd334..00d516c 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -189,22 +189,20 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
189 | 189 | ||
190 | resizeEvent( NULL ); | 190 | resizeEvent( NULL ); |
191 | 191 | ||
192 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 192 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
193 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 193 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
194 | 194 | ||
195 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 195 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
196 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 196 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
197 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 197 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
198 | // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); | ||
199 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 198 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
199 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | ||
200 | 200 | ||
201 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); | 201 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); |
202 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); | 202 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); |
203 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); | 203 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); |
204 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); | 204 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); |
205 | 205 | ||
206 | |||
207 | |||
208 | // Intialise state | 206 | // Intialise state |
209 | setLength( mediaPlayerState->length() ); | 207 | setLength( mediaPlayerState->length() ); |
210 | setPosition( mediaPlayerState->position() ); | 208 | setPosition( mediaPlayerState->position() ); |
@@ -308,9 +306,20 @@ void AudioWidget::setLength( long max ) { | |||
308 | 306 | ||
309 | void AudioWidget::setView( char view ) { | 307 | void AudioWidget::setView( char view ) { |
310 | 308 | ||
311 | // this isnt working for some reason | 309 | if ( view == 'a' ) { |
310 | // startTimer( 150 ); | ||
311 | showMaximized(); | ||
312 | } else { | ||
313 | killTimers(); | ||
314 | hide(); | ||
315 | } | ||
316 | // qApp->processEvents(); | ||
317 | } | ||
318 | |||
319 | |||
320 | void AudioWidget::setSeekable( bool isSeekable ) { | ||
312 | 321 | ||
313 | if ( mediaPlayerState->streaming() ) { | 322 | if ( isSeekable ) { |
314 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | 323 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); |
315 | if( !slider.isHidden()) { | 324 | if( !slider.isHidden()) { |
316 | slider.hide(); | 325 | slider.hide(); |
@@ -321,18 +330,10 @@ void AudioWidget::setView( char view ) { | |||
321 | // this stops the slider from being moved, thus | 330 | // this stops the slider from being moved, thus |
322 | // does not stop stream when it reaches the end | 331 | // does not stop stream when it reaches the end |
323 | slider.show(); | 332 | slider.show(); |
333 | qDebug( " CONNECT SET POSTION " ); | ||
324 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 334 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
325 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 335 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
326 | } | 336 | } |
327 | |||
328 | if ( view == 'a' ) { | ||
329 | // startTimer( 150 ); | ||
330 | showMaximized(); | ||
331 | } else { | ||
332 | killTimers(); | ||
333 | hide(); | ||
334 | } | ||
335 | // qApp->processEvents(); | ||
336 | } | 337 | } |
337 | 338 | ||
338 | 339 | ||
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index c544882..09dc19b 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -94,6 +94,7 @@ public slots: | |||
94 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 94 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
95 | void setPosition( long ); | 95 | void setPosition( long ); |
96 | void setLength( long ); | 96 | void setLength( long ); |
97 | void setSeekable( bool ); | ||
97 | void setView( char ); | 98 | void setView( char ); |
98 | 99 | ||
99 | signals: | 100 | signals: |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index f0a01a1..8b0f501 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -301,7 +301,7 @@ void MediaPlayer::blank( bool b ) { | |||
301 | fd=open("/dev/fb0",O_RDWR); | 301 | fd=open("/dev/fb0",O_RDWR); |
302 | #ifdef QT_QWS_EBX | 302 | #ifdef QT_QWS_EBX |
303 | fl= open( "/dev/fl", O_RDWR ); | 303 | fl= open( "/dev/fl", O_RDWR ); |
304 | #endif | 304 | #endif |
305 | if (fd != -1) { | 305 | if (fd != -1) { |
306 | if ( b ) { | 306 | if ( b ) { |
307 | qDebug("do blanking"); | 307 | qDebug("do blanking"); |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 4ec5989..0b33dfd 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -52,6 +52,7 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) | |||
52 | Config cfg( "OpiePlayer" ); | 52 | Config cfg( "OpiePlayer" ); |
53 | readConfig( cfg ); | 53 | readConfig( cfg ); |
54 | isStreaming = false; | 54 | isStreaming = false; |
55 | isSeekable = true; | ||
55 | } | 56 | } |
56 | 57 | ||
57 | 58 | ||
@@ -95,6 +96,10 @@ bool MediaPlayerState::streaming() { | |||
95 | return isStreaming; | 96 | return isStreaming; |
96 | } | 97 | } |
97 | 98 | ||
99 | bool MediaPlayerState::seekable() { | ||
100 | return isSeekable; | ||
101 | } | ||
102 | |||
98 | bool MediaPlayerState::fullscreen() { | 103 | bool MediaPlayerState::fullscreen() { |
99 | return isFullscreen; | 104 | return isFullscreen; |
100 | } | 105 | } |
@@ -112,7 +117,7 @@ bool MediaPlayerState::shuffled() { | |||
112 | } | 117 | } |
113 | 118 | ||
114 | 119 | ||
115 | bool MediaPlayerState:: playlist() { | 120 | bool MediaPlayerState::playlist() { |
116 | return usePlaylist; | 121 | return usePlaylist; |
117 | } | 122 | } |
118 | 123 | ||
@@ -149,6 +154,15 @@ void MediaPlayerState::setIsStreaming( bool b ) { | |||
149 | isStreaming = b; | 154 | isStreaming = b; |
150 | } | 155 | } |
151 | 156 | ||
157 | void MediaPlayerState::setIsSeekable( bool b ) { | ||
158 | |||
159 | //if ( isSeekable == b ) { | ||
160 | // return; | ||
161 | // } | ||
162 | isSeekable = b; | ||
163 | emit isSeekableToggled(b); | ||
164 | } | ||
165 | |||
152 | 166 | ||
153 | void MediaPlayerState::setFullscreen( bool b ) { | 167 | void MediaPlayerState::setFullscreen( bool b ) { |
154 | if ( isFullscreen == b ) { | 168 | if ( isFullscreen == b ) { |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 4fef8e0..8c4e09e 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -54,6 +54,7 @@ public: | |||
54 | bool isPlaying; | 54 | bool isPlaying; |
55 | bool isStoped; | 55 | bool isStoped; |
56 | bool streaming(); | 56 | bool streaming(); |
57 | bool seekable(); | ||
57 | bool fullscreen(); | 58 | bool fullscreen(); |
58 | bool scaled(); | 59 | bool scaled(); |
59 | bool looping(); | 60 | bool looping(); |
@@ -68,6 +69,7 @@ public: | |||
68 | 69 | ||
69 | public slots: | 70 | public slots: |
70 | void setIsStreaming( bool b ); | 71 | void setIsStreaming( bool b ); |
72 | void setIsSeekable( bool b ); | ||
71 | void setFullscreen( bool b ); | 73 | void setFullscreen( bool b ); |
72 | void setScaled( bool b ); | 74 | void setScaled( bool b ); |
73 | void setLooping( bool b ); | 75 | void setLooping( bool b ); |
@@ -113,6 +115,7 @@ signals: | |||
113 | void positionUpdated( long ); // When the media file progresses | 115 | void positionUpdated( long ); // When the media file progresses |
114 | void lengthChanged( long ); | 116 | void lengthChanged( long ); |
115 | void viewChanged( char ); | 117 | void viewChanged( char ); |
118 | void isSeekableToggled( bool ); | ||
116 | void blankToggled( bool ); | 119 | void blankToggled( bool ); |
117 | void videoGammaChanged( int ); | 120 | void videoGammaChanged( int ); |
118 | void prev(); | 121 | void prev(); |
@@ -120,6 +123,7 @@ signals: | |||
120 | 123 | ||
121 | private: | 124 | private: |
122 | bool isStreaming; | 125 | bool isStreaming; |
126 | bool isSeekable; | ||
123 | bool isFullscreen; | 127 | bool isFullscreen; |
124 | bool isScaled; | 128 | bool isScaled; |
125 | bool isBlanked; | 129 | bool isBlanked; |
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index b1f4811..707efeb 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c | |||
@@ -497,7 +497,7 @@ static vo_info_t vo_info_null = { | |||
497 | }; | 497 | }; |
498 | 498 | ||
499 | vo_info_t *get_video_out_plugin_info(){ | 499 | vo_info_t *get_video_out_plugin_info(){ |
500 | vo_info_null.description = _("xine video output plugin using null device"); | 500 | vo_info_null.description = ("xine video output plugin using null device"); |
501 | return &vo_info_null; | 501 | return &vo_info_null; |
502 | } | 502 | } |
503 | 503 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 7b8ad7a..7d71d09 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -384,12 +384,11 @@ void VideoWidget::makeVisible() { | |||
384 | resize( qApp->desktop()->size() ); | 384 | resize( qApp->desktop()->size() ); |
385 | slider->hide(); | 385 | slider->hide(); |
386 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 386 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
387 | // qApp->processEvents(); | ||
388 | } else { | 387 | } else { |
389 | showNormal(); | 388 | showNormal(); |
390 | showMaximized(); | 389 | showMaximized(); |
391 | setBackgroundPixmap( *pixBg ); | 390 | setBackgroundPixmap( *pixBg ); |
392 | if ( mediaPlayerState->streaming() ) { | 391 | if ( mediaPlayerState->seekable() ) { |
393 | slider->hide(); | 392 | slider->hide(); |
394 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 393 | disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
395 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 394 | disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
@@ -399,8 +398,8 @@ void VideoWidget::makeVisible() { | |||
399 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 398 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
400 | } | 399 | } |
401 | QWidget *d = QApplication::desktop(); | 400 | QWidget *d = QApplication::desktop(); |
402 | int w=d->width(); | 401 | int w = d->width(); |
403 | int h=d->height(); | 402 | int h = d->height(); |
404 | 403 | ||
405 | if(w>h) { | 404 | if(w>h) { |
406 | int newW=(w/2)-(246/2); //this will only work with 320x240 | 405 | int newW=(w/2)-(246/2); //this will only work with 320x240 |
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 03176b3..65ac127 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -75,9 +75,9 @@ void XineControl::play( const QString& fileName ) { | |||
75 | hasAudioChannel = FALSE; | 75 | hasAudioChannel = FALSE; |
76 | m_fileName = fileName; | 76 | m_fileName = fileName; |
77 | 77 | ||
78 | //qDebug("<<FILENAME: " + fileName + ">>>>"); | 78 | qDebug("<<FILENAME: " + fileName + ">>>>"); |
79 | 79 | ||
80 | if ( !libXine->play( fileName ) ) { | 80 | if ( !libXine->play( fileName, 0, 0 ) ) { |
81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); | 81 | QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); |
82 | // toggle stop so the the play button is reset | 82 | // toggle stop so the the play button is reset |
83 | mediaPlayerState->setPlaying( false ); | 83 | mediaPlayerState->setPlaying( false ); |
@@ -99,7 +99,8 @@ void XineControl::play( const QString& fileName ) { | |||
99 | hasVideoChannel = TRUE; | 99 | hasVideoChannel = TRUE; |
100 | } | 100 | } |
101 | // determine if slider is shown | 101 | // determine if slider is shown |
102 | mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); | 102 | mediaPlayerState->setIsSeekable( !libXine->isSeekable() ); |
103 | |||
103 | // which gui (video / audio) | 104 | // which gui (video / audio) |
104 | mediaPlayerState->setView( whichGui ); | 105 | mediaPlayerState->setView( whichGui ); |
105 | 106 | ||