author | harlekin <harlekin> | 2002-11-10 15:09:09 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-11-10 15:09:09 (UTC) |
commit | 91932ca42cee5568477b1e49532a0b9e4d9bcf96 (patch) (side-by-side diff) | |
tree | f134612cf7aa15787077b0a76c34aab30d72cae3 | |
parent | b6b57412a12c06d07f22060b7a165d71e5eddb84 (diff) | |
download | opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.zip opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.gz opie-91932ca42cee5568477b1e49532a0b9e4d9bcf96.tar.bz2 |
besser seekable handling
-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 @@ -191,4 +191,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : - connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); - connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); + connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); + connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); @@ -197,4 +197,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); - // connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); + connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); @@ -205,4 +205,2 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : - - // Intialise state @@ -310,5 +308,16 @@ void AudioWidget::setView( char view ) { - // this isnt working for some reason +if ( view == 'a' ) { + // startTimer( 150 ); + showMaximized(); + } else { + killTimers(); + hide(); + } + // qApp->processEvents(); +} + + +void AudioWidget::setSeekable( bool isSeekable ) { - if ( mediaPlayerState->streaming() ) { + if ( isSeekable ) { qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); @@ -323,2 +332,3 @@ void AudioWidget::setView( char view ) { slider.show(); + qDebug( " CONNECT SET POSTION " ); connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); @@ -326,11 +336,2 @@ void AudioWidget::setView( char view ) { } - - if ( view == 'a' ) { - // startTimer( 150 ); - showMaximized(); - } else { - killTimers(); - hide(); - } - // qApp->processEvents(); } 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: void setLength( long ); + void setSeekable( bool ); 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 ) { fl= open( "/dev/fl", O_RDWR ); -#endif +#endif 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 ) isStreaming = false; + isSeekable = true; } @@ -97,2 +98,6 @@ bool MediaPlayerState::streaming() { +bool MediaPlayerState::seekable() { + return isSeekable; +} + bool MediaPlayerState::fullscreen() { @@ -114,3 +119,3 @@ bool MediaPlayerState::shuffled() { -bool MediaPlayerState:: playlist() { +bool MediaPlayerState::playlist() { return usePlaylist; @@ -151,2 +156,11 @@ void MediaPlayerState::setIsStreaming( bool b ) { +void MediaPlayerState::setIsSeekable( bool b ) { + + //if ( isSeekable == b ) { + // return; + // } + isSeekable = b; + emit isSeekableToggled(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 @@ -56,2 +56,3 @@ public: bool streaming(); + bool seekable(); bool fullscreen(); @@ -70,2 +71,3 @@ public slots: void setIsStreaming( bool b ); + void setIsSeekable( bool b ); void setFullscreen( bool b ); @@ -115,2 +117,3 @@ signals: void viewChanged( char ); + void isSeekableToggled( bool ); void blankToggled( bool ); @@ -122,2 +125,3 @@ private: bool isStreaming; + bool isSeekable; 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 = { vo_info_t *get_video_out_plugin_info(){ - vo_info_null.description = _("xine video output plugin using null device"); + vo_info_null.description = ("xine video output plugin using null device"); 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() { videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); -// qApp->processEvents(); } else { @@ -391,3 +390,3 @@ void VideoWidget::makeVisible() { setBackgroundPixmap( *pixBg ); - if ( mediaPlayerState->streaming() ) { + if ( mediaPlayerState->seekable() ) { slider->hide(); @@ -401,4 +400,4 @@ void VideoWidget::makeVisible() { QWidget *d = QApplication::desktop(); - int w=d->width(); - int h=d->height(); + int w = d->width(); + int h = d->height(); 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 ) { - //qDebug("<<FILENAME: " + fileName + ">>>>"); + qDebug("<<FILENAME: " + fileName + ">>>>"); - if ( !libXine->play( fileName ) ) { + if ( !libXine->play( fileName, 0, 0 ) ) { QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() ); @@ -101,3 +101,4 @@ void XineControl::play( const QString& fileName ) { // determine if slider is shown - mediaPlayerState->setIsStreaming( !libXine->isSeekable() ); + mediaPlayerState->setIsSeekable( !libXine->isSeekable() ); + // which gui (video / audio) |