summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-11-10 15:09:09 (UTC)
committer harlekin <harlekin>2002-11-10 15:09:09 (UTC)
commit91932ca42cee5568477b1e49532a0b9e4d9bcf96 (patch) (unidiff)
treef134612cf7aa15787077b0a76c34aab30d72cae3
parentb6b57412a12c06d07f22060b7a165d71e5eddb84 (diff)
downloadopie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.zip
opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.gz
opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.bz2
besser seekable handling
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp33
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp16
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h4
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp7
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
@@ -191,4 +191,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
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
@@ -197,4 +197,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
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
@@ -205,4 +205,2 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
205 205
206
207
208 // Intialise state 206 // Intialise state
@@ -310,5 +308,16 @@ void AudioWidget::setView( char view ) {
310 308
311 // this isnt working for some reason 309if ( view == 'a' ) {
310 // startTimer( 150 );
311 showMaximized();
312 } else {
313 killTimers();
314 hide();
315 }
316 // qApp->processEvents();
317}
318
319
320void AudioWidget::setSeekable( bool isSeekable ) {
312 321
313 if ( mediaPlayerState->streaming() ) { 322 if ( isSeekable ) {
314 qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); 323 qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
@@ -323,2 +332,3 @@ void AudioWidget::setView( char view ) {
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) ) );
@@ -326,11 +336,2 @@ void AudioWidget::setView( char view ) {
326 } 336 }
327
328 if ( view == 'a' ) {
329 // startTimer( 150 );
330 showMaximized();
331 } else {
332 killTimers();
333 hide();
334 }
335 // qApp->processEvents();
336} 337}
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
@@ -96,2 +96,3 @@ public slots:
96 void setLength( long ); 96 void setLength( long );
97 void setSeekable( bool );
97 void setView( char ); 98 void setView( char );
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
@@ -303,3 +303,3 @@ void MediaPlayer::blank( bool b ) {
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) {
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
@@ -54,2 +54,3 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
54 isStreaming = false; 54 isStreaming = false;
55 isSeekable = true;
55} 56}
@@ -97,2 +98,6 @@ bool MediaPlayerState::streaming() {
97 98
99bool MediaPlayerState::seekable() {
100 return isSeekable;
101}
102
98bool MediaPlayerState::fullscreen() { 103bool MediaPlayerState::fullscreen() {
@@ -114,3 +119,3 @@ bool MediaPlayerState::shuffled() {
114 119
115bool MediaPlayerState:: playlist() { 120bool MediaPlayerState::playlist() {
116 return usePlaylist; 121 return usePlaylist;
@@ -151,2 +156,11 @@ void MediaPlayerState::setIsStreaming( bool b ) {
151 156
157void MediaPlayerState::setIsSeekable( bool b ) {
158
159 //if ( isSeekable == b ) {
160 // return;
161 // }
162 isSeekable = b;
163 emit isSeekableToggled(b);
164}
165
152 166
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
@@ -56,2 +56,3 @@ public:
56 bool streaming(); 56 bool streaming();
57 bool seekable();
57 bool fullscreen(); 58 bool fullscreen();
@@ -70,2 +71,3 @@ 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 );
@@ -115,2 +117,3 @@ signals:
115 void viewChanged( char ); 117 void viewChanged( char );
118 void isSeekableToggled( bool );
116 void blankToggled( bool ); 119 void blankToggled( bool );
@@ -122,2 +125,3 @@ private:
122 bool isStreaming; 125 bool isStreaming;
126 bool isSeekable;
123 bool isFullscreen; 127 bool isFullscreen;
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
@@ -499,3 +499,3 @@ static vo_info_t vo_info_null = {
499vo_info_t *get_video_out_plugin_info(){ 499vo_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;
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
@@ -386,3 +386,2 @@ void VideoWidget::makeVisible() {
386 videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); 386 videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
387// qApp->processEvents();
388 } else { 387 } else {
@@ -391,3 +390,3 @@ void VideoWidget::makeVisible() {
391 setBackgroundPixmap( *pixBg ); 390 setBackgroundPixmap( *pixBg );
392 if ( mediaPlayerState->streaming() ) { 391 if ( mediaPlayerState->seekable() ) {
393 slider->hide(); 392 slider->hide();
@@ -401,4 +400,4 @@ void VideoWidget::makeVisible() {
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
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
@@ -77,5 +77,5 @@ void XineControl::play( const QString& 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() );
@@ -101,3 +101,4 @@ void XineControl::play( const QString& fileName ) {
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)