summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer
authorzecke <zecke>2003-10-07 12:53:39 (UTC)
committer zecke <zecke>2003-10-07 12:53:39 (UTC)
commite65d5c86b5fff521dfb94282a96606546bad9585 (patch) (unidiff)
tree7aee07687deec9dec91031a0a7f70fc802d47c06 /core/multimedia/opieplayer
parent877f982ab6996b85870befffcacdef84a6700746 (diff)
downloadopie-e65d5c86b5fff521dfb94282a96606546bad9585.zip
opie-e65d5c86b5fff521dfb94282a96606546bad9585.tar.gz
opie-e65d5c86b5fff521dfb94282a96606546bad9585.tar.bz2
-Kill stupid QCOP check
-introduce OPIE_SOUND_FRAGMENT_SHIFT -USE_REALTIME_AUDIO_THREAD is now defined in custom.h
Diffstat (limited to 'core/multimedia/opieplayer') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp37
-rw-r--r--core/multimedia/opieplayer/loopcontrol_threaded.cpp33
2 files changed, 35 insertions, 35 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 6a38fc9..d296d27 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -26,2 +26,3 @@
26#include <qpe/config.h> 26#include <qpe/config.h>
27#include <qpe/custom.h>
27#include <qmessagebox.h> 28#include <qmessagebox.h>
@@ -33,4 +34,4 @@
33 34
34#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 35#if !defined(QT_NO_COP)
35#include "qpe/qcopenvelope_qws.h" 36#include <qpe/qcopenvelope_qws.h>
36#endif 37#endif
@@ -47,7 +48,7 @@
47 48
48# if defined(QT_QWS_IPAQ) 49#ifdef OPIE_SOUND_FRAGMENT_SHIFT
49static const int sound_fragment_shift = 14; 50static const int sound_fragment_shift = OPIE_SOUND_FRAGMENT_SHIFT;
50# else 51#else
51static const int sound_fragment_shift = 16; 52static const int sound_fragment_shift = 16;
52# endif 53#endif
53static const int sound_fragment_bytes = (1<<sound_fragment_shift); 54static const int sound_fragment_bytes = (1<<sound_fragment_shift);
@@ -147,6 +148,6 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
147//#endif 148//#endif
148// qDebug( "setting volume to: 0x%x", volume ); 149// qDebug( "setting volume to: 0x%x", volume );
149#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 150#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
150 // Send notification that the volume has changed 151 // Send notification that the volume has changed
151 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted; 152 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << muted;
152#endif 153#endif
@@ -158,3 +159,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
158 // qDebug("creating new audio device"); 159 // qDebug("creating new audio device");
159// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 160// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
160 d = new AudioDevicePrivate; 161 d = new AudioDevicePrivate;
@@ -174,3 +175,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
174 175
175 176
176#ifdef KEEP_DEVICE_OPEN 177#ifdef KEEP_DEVICE_OPEN
@@ -189,3 +190,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
189 } 190 }
190#ifdef KEEP_DEVICE_OPEN 191#ifdef KEEP_DEVICE_OPEN
191 AudioDevicePrivate::dspFd = d->handle; 192 AudioDevicePrivate::dspFd = d->handle;
@@ -211,3 +212,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
211 } 212 }
212// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 213// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
213 214
@@ -217,3 +218,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
217 d->can_GETOSPACE = TRUE; // until we find otherwise 218 d->can_GETOSPACE = TRUE; // until we find otherwise
218 219
219 //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels ); 220 //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels );
@@ -224,5 +225,5 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
224 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" ); 225 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
225 226
226} 227}
227 228
228 229
@@ -231,4 +232,4 @@ AudioDevice::~AudioDevice() {
231// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 232// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
232 233
233# ifndef KEEP_DEVICE_OPEN 234# ifndef KEEP_DEVICE_OPEN
234 close( d->handle ); // Now it should be safe to shut the handle 235 close( d->handle ); // Now it should be safe to shut the handle
@@ -238,3 +239,3 @@ AudioDevice::~AudioDevice() {
238// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 239// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
239 240
240} 241}
diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
index 364e77b..3796549 100644
--- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp
+++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
@@ -22,5 +22,6 @@
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qpe/custom.h>
23#include <qimage.h> 24#include <qimage.h>
24#include <qpainter.h> 25#include <qpainter.h>
25#ifdef Q_WS_QWS 26#if !defined(QT_NO_COP)
26#include <qpe/qcopenvelope_qws.h> 27#include <qpe/qcopenvelope_qws.h>
@@ -41,5 +42,3 @@
41 42
42#if defined(QT_QWS_SL5XXX) || defined(QT_QWS_IPAQ) || defined(QT_QWS_RAMSES) 43
43#define USE_REALTIME_AUDIO_THREAD
44#endif
45 44
@@ -258,3 +257,3 @@ void LoopControl::startVideo() {
258 //current_frame = ( clock() - begin ) * (double)framerate / CLOCKS_PER_SEC; 257 //current_frame = ( clock() - begin ) * (double)framerate / CLOCKS_PER_SEC;
259 258
260 // Sync to Audio 259 // Sync to Audio
@@ -314,3 +313,3 @@ void LoopControl::startVideo() {
314 prev_frame = current_frame; 313 prev_frame = current_frame;
315 if ( moreVideo = videoUI->playVideo() ) 314 if ( moreVideo = videoUI->playVideo() )
316 emitChangePos = TRUE; 315 emitChangePos = TRUE;
@@ -319,3 +318,3 @@ void LoopControl::startVideo() {
319 318
320 } else 319 } else
321 moreVideo = FALSE; 320 moreVideo = FALSE;
@@ -324,3 +323,3 @@ void LoopControl::startVideo() {
324 323
325 if ( !moreVideo && !moreAudio ) 324 if ( !moreVideo && !moreAudio )
326 emitPlayFinished = TRUE; 325 emitPlayFinished = TRUE;
@@ -332,3 +331,3 @@ void LoopControl::startAudio() {
332 moreAudio = TRUE; 331 moreAudio = TRUE;
333 332
334 while ( moreAudio ) { 333 while ( moreAudio ) {
@@ -406,3 +405,3 @@ void LoopControl::startAudio() {
406 405
407 if ( !moreVideo && !moreAudio ) 406 if ( !moreVideo && !moreAudio )
408 emitPlayFinished = TRUE; 407 emitPlayFinished = TRUE;
@@ -486,3 +485,3 @@ void LoopControl::stop( bool willPlayAgainShortly ) {
486 if ( !willPlayAgainShortly && disabledSuspendScreenSaver ) { 485 if ( !willPlayAgainShortly && disabledSuspendScreenSaver ) {
487 disabledSuspendScreenSaver = FALSE; 486 disabledSuspendScreenSaver = FALSE;
488 // Re-enable the suspend mode 487 // Re-enable the suspend mode
@@ -514,5 +513,5 @@ bool LoopControl::init( const QString& filename ) {
514 current_frame = total_video_frames = total_audio_samples = 0; 513 current_frame = total_video_frames = total_audio_samples = 0;
515 514
516 // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); 515 // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() );
517 516
518 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin 517 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin
@@ -536,3 +535,3 @@ bool LoopControl::init( const QString& filename ) {
536 DecodeLoopDebug(( "channels = %d\n", channels )); 535 DecodeLoopDebug(( "channels = %d\n", channels ));
537 536
538 if ( !total_audio_samples ) 537 if ( !total_audio_samples )
@@ -541,3 +540,3 @@ bool LoopControl::init( const QString& filename ) {
541 mediaPlayerState->setLength( total_audio_samples ); 540 mediaPlayerState->setLength( total_audio_samples );
542 541
543 freq = mediaPlayerState->curDecoder()->audioFrequency( astream ); 542 freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
@@ -596,5 +595,5 @@ void LoopControl::play() {
596 if ( !disabledSuspendScreenSaver ) { 595 if ( !disabledSuspendScreenSaver ) {
597 disabledSuspendScreenSaver = TRUE; 596 disabledSuspendScreenSaver = TRUE;
598 // Stop the screen from blanking and power saving state 597 // Stop the screen from blanking and power saving state
599 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) 598 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" )
600 << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend ); 599 << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend );