-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 7 | ||||
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.h | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol.cpp | 4 | ||||
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.h | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 1 |
5 files changed, 12 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 3212001..20345b7 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp @@ -88,13 +88,16 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); - connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); - connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 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) ) ); + if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus + // does not stop stream when it reaches the end + connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); + connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); + } // Intialise state setLength( mediaPlayerState->length() ); setPosition( mediaPlayerState->position() ); diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h index d1d72b6..4ffd167 100644 --- a/core/multimedia/opieplayer/audiowidget.h +++ b/core/multimedia/opieplayer/audiowidget.h @@ -102,7 +102,7 @@ public: AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); ~AudioWidget(); void setTickerText( const QString &text ) { songInfo->setText( text ); } - + bool isStreaming; public slots: void updateSlider( long, long ); void sliderPressed( ); diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp index b9f96de..45c2d3e 100644 --- a/core/multimedia/opieplayer/loopcontrol.cpp +++ b/core/multimedia/opieplayer/loopcontrol.cpp @@ -236,6 +236,7 @@ void LoopControl::startAudio() { long sampleWeShouldBeAt = long( playtime.elapsed() ) * freq / 1000; long sampleWaitTime = currentSample - sampleWeShouldBeAt; +// this causes drop outs not sure why its even here // if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) { // usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) ); // } @@ -432,6 +433,9 @@ bool LoopControl::init( const QString& filename ) { current_frame = 0; prev_frame = -1; + if( fileName.left(7) == "http://") + mediaPlayerState->isStreaming = TRUE; + connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) ); connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) ); diff --git a/core/multimedia/opieplayer/mediaplayerstate.h b/core/multimedia/opieplayer/mediaplayerstate.h index ad273f1..06c5556 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.h +++ b/core/multimedia/opieplayer/mediaplayerstate.h @@ -34,7 +34,7 @@ public: MediaPlayerState( QObject *parent, const char *name ); ~MediaPlayerState(); - + bool isStreaming; bool fullscreen() { return isFullscreen; } bool scaled() { return isScaled; } bool looping() { return isLooping; } diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 250645c..ff156f8 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -993,6 +993,7 @@ void PlayListWidget::openFile() { // name = fileDlg2->LineEdit1->text(); // } //http://205.188.234.129:8030 +// http://66.28.68.70:8000 qDebug(filename); DocLnk lnk; // if(filename.left(7) == "http://") |