summaryrefslogtreecommitdiff
path: root/core/multimedia
Unidiff
Diffstat (limited to 'core/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp3
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3.pro2
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp2
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.pro2
4 files changed, 5 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 20345b7..b9561d5 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -83,49 +83,50 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
83 slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); 83 slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) );
84 slider->setFocusPolicy( QWidget::NoFocus ); 84 slider->setFocusPolicy( QWidget::NoFocus );
85 slider->setGeometry( QRect( 7, 262, 220, 20 ) ); 85 slider->setGeometry( QRect( 7, 262, 220, 20 ) );
86 86
87 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); 87 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
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( viewChanged(char) ), this, SLOT( setView(char) ) ); 91 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
92 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 92 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
93 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); 93 connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
94 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 94 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
95 95
96 if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus 96 if( !mediaPlayerState->isStreaming) { // this stops the slider from being moved, thus
97 // does not stop stream when it reaches the end 97 // does not stop stream when it reaches the end
98 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 98 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
99 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 99 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
100 } 100 }
101 // Intialise state 101 // Intialise state
102 setLength( mediaPlayerState->length() ); 102 setLength( mediaPlayerState->length() );
103 setPosition( mediaPlayerState->position() ); 103 setPosition( mediaPlayerState->position() );
104 setLooping( mediaPlayerState->fullscreen() ); 104 setLooping( mediaPlayerState->fullscreen() );
105 setPaused( mediaPlayerState->paused() ); 105 setPaused( mediaPlayerState->paused() );
106 setPlaying( mediaPlayerState->playing() ); 106 setPlaying( mediaPlayerState->playing() );
107 107 if (mediaPlayerState->isStreaming) slider->hide();
108
108} 109}
109 110
110 111
111AudioWidget::~AudioWidget() { 112AudioWidget::~AudioWidget() {
112 for ( int i = 0; i < 4; i++ ) 113 for ( int i = 0; i < 4; i++ )
113 delete pixmaps[i]; 114 delete pixmaps[i];
114} 115}
115 116
116 117
117static bool audioSliderBeingMoved = FALSE; 118static bool audioSliderBeingMoved = FALSE;
118 119
119 120
120void AudioWidget::sliderPressed() { 121void AudioWidget::sliderPressed() {
121 audioSliderBeingMoved = TRUE; 122 audioSliderBeingMoved = TRUE;
122} 123}
123 124
124 125
125void AudioWidget::sliderReleased() { 126void AudioWidget::sliderReleased() {
126 audioSliderBeingMoved = FALSE; 127 audioSliderBeingMoved = FALSE;
127 if ( slider->width() == 0 ) 128 if ( slider->width() == 0 )
128 return; 129 return;
129 long val = long((double)slider->value() * mediaPlayerState->length() / slider->width()); 130 long val = long((double)slider->value() * mediaPlayerState->length() / slider->width());
130 mediaPlayerState->setPosition( val ); 131 mediaPlayerState->setPosition( val );
131} 132}
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro b/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
index e50aa4e..f5e5954 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3.pro
@@ -15,29 +15,29 @@ SOURCES = libmpeg3plugin.cpp libmpeg3pluginimpl.cpp \
15 audio/dct.c \ 15 audio/dct.c \
16 audio/exponents.c \ 16 audio/exponents.c \
17 audio/header.c \ 17 audio/header.c \
18 audio/layer2.c \ 18 audio/layer2.c \
19 audio/layer3.c \ 19 audio/layer3.c \
20 audio/mantissa.c \ 20 audio/mantissa.c \
21 audio/mpeg3audio.c \ 21 audio/mpeg3audio.c \
22 audio/pcm.c \ 22 audio/pcm.c \
23 audio/synthesizers.c \ 23 audio/synthesizers.c \
24 audio/tables.c \ 24 audio/tables.c \
25 video/getpicture.c \ 25 video/getpicture.c \
26 video/headers.c \ 26 video/headers.c \
27 video/idct.c \ 27 video/idct.c \
28 video/macroblocks.c \ 28 video/macroblocks.c \
29 video/mmxtest.c \ 29 video/mmxtest.c \
30 video/motion.c \ 30 video/motion.c \
31 video/mpeg3video.c \ 31 video/mpeg3video.c \
32 video/output.c \ 32 video/output.c \
33 video/reconstruct.c \ 33 video/reconstruct.c \
34 video/seek.c \ 34 video/seek.c \
35 video/slice.c \ 35 video/slice.c \
36 video/vlc.c 36 video/vlc.c
37TARGET = mpeg3plugin 37TARGET = mpeg3plugin
38TMAKE_CC=g++ 38TMAKE_CC=g++
39DESTDIR = ../../plugins/codecs 39DESTDIR = $(OPIEDIR)/plugins/codecs
40INCLUDEPATH += $(OPIEDIR)/include .. 40INCLUDEPATH += $(OPIEDIR)/include ..
41DEPENDPATH += ../$(OPIEDIR)/include .. 41DEPENDPATH += ../$(OPIEDIR)/include ..
42LIBS += -lqpe -lpthread -lm 42LIBS += -lqpe -lpthread -lm
43VERSION = 1.0.0 43VERSION = 1.0.0
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 15175d0..01596a0 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -226,50 +226,50 @@ void LoopControl::startAudio() {
226 226
227 if ( !isMuted && mediaPlayerState->curDecoder() ) { 227 if ( !isMuted && mediaPlayerState->curDecoder() ) {
228 228
229 currentSample = audioSampleCounter + 1; 229 currentSample = audioSampleCounter + 1;
230 230
231 if ( currentSample != audioSampleCounter + 1 ) 231 if ( currentSample != audioSampleCounter + 1 )
232 qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); 232 qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter);
233 233
234 long samplesRead = 0; 234 long samplesRead = 0;
235 bool readOk=mediaPlayerState->curDecoder()->audioReadSamples( (short*)audioBuffer, channels, 1024, samplesRead, stream ); 235 bool readOk=mediaPlayerState->curDecoder()->audioReadSamples( (short*)audioBuffer, channels, 1024, samplesRead, stream );
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// this causes drop outs not sure why its even here
240// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) { 240// if ( ( sampleWaitTime > 2000 ) && ( sampleWaitTime < 20000 ) ) {
241// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) ); 241// usleep( (long)((double)sampleWaitTime * 1000000.0 / freq) );
242// } 242// }
243// else if ( sampleWaitTime <= -5000 ) { 243// else if ( sampleWaitTime <= -5000 ) {
244// qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 244// qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt );
245// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 245// //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
246// currentSample = sampleWeShouldBeAt; 246// currentSample = sampleWeShouldBeAt;
247// } 247// }
248 248
249 audioDevice->write( audioBuffer, samplesRead * 2 * channels ); 249 audioDevice->write( audioBuffer, samplesRead * 2 * channels );
250 if( mediaPlayerState->isStreaming == FALSE);
251 250
251// if( mediaPlayerState->isStreaming == FALSE)
252 audioSampleCounter = currentSample + samplesRead - 1; 252 audioSampleCounter = currentSample + samplesRead - 1;
253 253
254 moreAudio = readOk && (audioSampleCounter <= total_audio_samples); 254 moreAudio = readOk && (audioSampleCounter <= total_audio_samples);
255 255
256 } else { 256 } else {
257 257
258 moreAudio = FALSE; 258 moreAudio = FALSE;
259 259
260 } 260 }
261 261
262 } 262 }
263 263
264 audioMutex->unlock(); 264 audioMutex->unlock();
265} 265}
266 266
267 267
268void LoopControl::killTimers() { 268void LoopControl::killTimers() {
269 269
270 audioMutex->lock(); 270 audioMutex->lock();
271 271
272 if ( hasVideoChannel ) 272 if ( hasVideoChannel )
273 killTimer( videoId ); 273 killTimer( videoId );
274 killTimer( sliderId ); 274 killTimer( sliderId );
275 threadOkToGo = FALSE; 275 threadOkToGo = FALSE;
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.pro b/core/multimedia/opieplayer/wavplugin/wavplugin.pro
index 2160431..f0834de 100644
--- a/core/multimedia/opieplayer/wavplugin/wavplugin.pro
+++ b/core/multimedia/opieplayer/wavplugin/wavplugin.pro
@@ -1,10 +1,10 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt warn_on release
3 HEADERS = wavplugin.h wavpluginimpl.h 3 HEADERS = wavplugin.h wavpluginimpl.h
4 SOURCES = wavplugin.cpp wavpluginimpl.cpp 4 SOURCES = wavplugin.cpp wavpluginimpl.cpp
5 TARGET = wavplugin 5 TARGET = wavplugin
6 DESTDIR = ../../plugins/codecs 6 DESTDIR = $(OPIEDIR)/plugins/codecs
7INCLUDEPATH += $(OPIEDIR)/include .. 7INCLUDEPATH += $(OPIEDIR)/include ..
8DEPENDPATH += ../$(OPIEDIR)/include .. 8DEPENDPATH += ../$(OPIEDIR)/include ..
9LIBS += -lqpe 9LIBS += -lqpe
10 VERSION = 1.0.0 10 VERSION = 1.0.0