summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp7
-rw-r--r--core/multimedia/opieplayer/audiowidget.h2
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp4
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.h2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp1
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) :
88 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); 88 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
89 89
90 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 90 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
91 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
92 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
93 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 91 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
94 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 92 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
95 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); 93 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
96 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 94 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
97 95
96 if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus
97 // does not stop stream when it reaches the end
98 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
99 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
100 }
98 // Intialise state 101 // Intialise state
99 setLength( mediaPlayerState->length() ); 102 setLength( mediaPlayerState->length() );
100 setPosition( mediaPlayerState->position() ); 103 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:
102 AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); 102 AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 );
103 ~AudioWidget(); 103 ~AudioWidget();
104 void setTickerText( const QString &text ) { songInfo->setText( text ); } 104 void setTickerText( const QString &text ) { songInfo->setText( text ); }
105 105 bool isStreaming;
106public slots: 106public slots:
107 void updateSlider( long, long ); 107 void updateSlider( long, long );
108 void sliderPressed( ); 108 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() {
236 long sampleWeShouldBeAt = long( playtime.elapsed() ) * freq / 1000; 236 long sampleWeShouldBeAt = long( playtime.elapsed() ) * freq / 1000;
237 long sampleWaitTime = currentSample - sampleWeShouldBeAt; 237 long sampleWaitTime = currentSample - sampleWeShouldBeAt;
238 238
239// this causes drop outs not sure why its even here
239// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) { 240// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) {
240// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) ); 241// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) );
241// } 242// }
@@ -432,6 +433,9 @@ bool LoopControl::init( const QString& filename ) {
432 current_frame = 0; 433 current_frame = 0;
433 prev_frame = -1; 434 prev_frame = -1;
434 435
436 if( fileName.left(7) == "http://")
437 mediaPlayerState->isStreaming = TRUE;
438
435 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) ); 439 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) );
436 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) ); 440 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) );
437 441
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:
34 MediaPlayerState( QObject *parent, const char *name ); 34 MediaPlayerState( QObject *parent, const char *name );
35 ~MediaPlayerState(); 35 ~MediaPlayerState();
36 36
37 37 bool isStreaming;
38 bool fullscreen() { return isFullscreen; } 38 bool fullscreen() { return isFullscreen; }
39 bool scaled() { return isScaled; } 39 bool scaled() { return isScaled; }
40 bool looping() { return isLooping; } 40 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() {
993// name = fileDlg2->LineEdit1->text(); 993// name = fileDlg2->LineEdit1->text();
994// } 994// }
995//http://205.188.234.129:8030 995//http://205.188.234.129:8030
996// http://66.28.68.70:8000
996 qDebug(filename); 997 qDebug(filename);
997 DocLnk lnk; 998 DocLnk lnk;
998// if(filename.left(7) == "http://") 999// if(filename.left(7) == "http://")