-rw-r--r-- | core/multimedia/opieplayer/audiodevice.cpp | 50 | ||||
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 25 | ||||
-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.cpp | 68 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol.cpp | 42 | ||||
-rw-r--r-- | core/multimedia/opieplayer/loopcontrol_threaded.cpp | 54 | ||||
-rw-r--r-- | core/multimedia/opieplayer/mediaplayer.cpp | 18 | ||||
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.cpp | 26 | ||||
-rw-r--r-- | core/multimedia/opieplayer/modplug/memfile.cpp | 6 | ||||
-rw-r--r-- | core/multimedia/opieplayer/om3u.cpp | 18 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 19 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 90 | ||||
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 25 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/libtremorplugin.cpp | 31 | ||||
-rw-r--r-- | core/multimedia/opieplayer/wavplugin/wavplugin.cpp | 48 |
14 files changed, 292 insertions, 228 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp index 355062b..9b64e07 100644 --- a/core/multimedia/opieplayer/audiodevice.cpp +++ b/core/multimedia/opieplayer/audiodevice.cpp @@ -22,12 +22,8 @@ -#include <stdlib.h> -#include <stdio.h> -#include <qpe/qpeapplication.h> -#include <qpe/config.h> -#include <qmessagebox.h> - #include "audiodevice.h" - -#include <errno.h> +/* OPIE */ +#include <qpe/qpeapplication.h> +#include <qpe/config.h> +#include <opie2/odebug.h> @@ -37,2 +33,10 @@ +/* QT */ +#include <qmessagebox.h> + +/* STD */ +#include <stdlib.h> +#include <stdio.h> +#include <errno.h> + #if defined(Q_WS_X11) || defined(Q_WS_QWS) @@ -147,3 +151,3 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume, //#endif -// qDebug( "setting volume to: 0x%x", volume ); +// odebug << "setting volume to: 0x" << volume << "" << oendl; #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) @@ -157,3 +161,3 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume, AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { - // qDebug("creating new audio device"); + // odebug << "creating new audio device" << oendl; // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; @@ -163,3 +167,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { d->bytesPerSample = bps; - // qDebug("%d",bps); + // odebug << "" << bps << "" << oendl; int format=0; @@ -168,3 +172,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { else format = AFMT_S16_LE; - // qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format); + // odebug << "AD- freq " << f << ", channels " << chs << ", b/sample " << bps << ", bitrate " << format << "" << oendl; connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); @@ -202,6 +206,6 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); - // qDebug("freq %d", d->frequency); + // odebug << "freq " << d->frequency << "" << oendl; if(ioctl( d->handle, SNDCTL_DSP_SPEED, &d->frequency )==-1) perror("ioctl(\"SNDCTL_DSP_SPEED\")"); - // qDebug("channels %d",d->channels); + // odebug << "channels " << d->channels << "" << oendl; if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) { @@ -218,8 +222,8 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { - //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels ); - //if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency ); - //if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" ); - //if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" ); - //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" ); - //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" ); + //if ( chs != d->channels ) odebug << "Wanted " << chs << ", got " << d->channels << " channels" << oendl; + //if ( f != d->frequency ) odebug << "wanted " << f << "Hz, got " << d->frequency << "Hz" << oendl; + //if ( capabilities & DSP_CAP_BATCH ) odebug << "Sound card has local buffer" << oendl; + //if ( capabilities & DSP_CAP_REALTIME )odebug << "Sound card has realtime sync" << oendl; + //if ( capabilities & DSP_CAP_TRIGGER ) odebug << "Sound card has precise trigger" << oendl; + //if ( capabilities & DSP_CAP_MMAP ) odebug << "Sound card can mmap" << oendl; @@ -229,3 +233,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { AudioDevice::~AudioDevice() { - // qDebug("destryo audiodevice"); + // odebug << "destryo audiodevice" << oendl; // QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; @@ -253,3 +257,3 @@ void AudioDevice::write( char *buffer, unsigned int length ) if ( t != (int)length) { - // qDebug("Ahhh!! memcpys 1"); + // odebug << "Ahhh!! memcpys 1" << oendl; memcpy(d->unwrittenBuffer,buffer+t,length-t); @@ -316,3 +320,3 @@ int AudioDevice::bytesWritten() { if ( ioctl( d->handle, SNDCTL_DSP_GETODELAY, &buffered ) ) { - // qDebug( "failed to get audio device position" ); + // odebug << "failed to get audio device position" << oendl; return -1; diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index 7da2d54..376f8d3 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp @@ -19,2 +19,6 @@ **********************************************************************/ +#include "audiowidget.h" +#include "mediaplayerstate.h" + +/* OPIE */ #include <qpe/qpeapplication.h> @@ -22,7 +26,8 @@ #include <qpe/config.h> +#include <opie2/odebug.h> +/* QT */ #include <qdir.h> -#include "audiowidget.h" -#include "mediaplayerstate.h" +/* STD */ #include <stdlib.h> @@ -73,3 +78,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : setCaption( tr("OpiePlayer") ); - // qDebug("<<<<<audioWidget"); + // odebug << "<<<<<audioWidget" << oendl; @@ -87,3 +92,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : - // qDebug("skin path " + skinPath); + // odebug << "skin path " + skinPath << oendl; @@ -123,3 +128,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { -// qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); +// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl; QImage img; @@ -255,3 +260,3 @@ void AudioWidget::sliderReleased() { void AudioWidget::setPosition( long i ) { -// qDebug("set position %d",i); +// odebug << "set position " << i << "" << oendl; long length = mediaPlayerState->length(); @@ -369,3 +374,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { // if ( isOnButton && i == AudioVolumeUp ) -// qDebug("on up"); +// odebug << "on up" << oendl; @@ -376,3 +381,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { case AudioVolumeUp: - // qDebug("more clicked"); + // odebug << "more clicked" << oendl; emit moreClicked(); @@ -380,3 +385,3 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) { case AudioVolumeDown: - // qDebug("less clicked"); + // odebug << "less clicked" << oendl; emit lessClicked(); @@ -472,3 +477,3 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e) hide(); -// qDebug("Audio F9"); +// odebug << "Audio F9" << oendl; break; diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp index 1989b4a..428fc28 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp +++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp @@ -21,2 +21,14 @@ +#include "libmadplugin.h" + +/* OPIE */ +#include <qpe/config.h> +#include <opie2/odebug.h> + +/* QT */ +#include <qapplication.h> +#include <qmessagebox.h> +#include <qregexp.h> + +/* STD */ #include <stdio.h> @@ -36,8 +48,2 @@ -#include <qapplication.h> -#include <qmessagebox.h> -#include <qregexp.h> - -#include <qpe/config.h> - // for network handling @@ -56,3 +62,2 @@ #endif -#include "libmadplugin.h" @@ -384,3 +389,3 @@ int LibMadPlugin::http_open(const QString& path ) { if (len == -1) { - // qDebug( "http_open: "+ QString(strerror(errno)) +"\n"); + // odebug << "http_open: "+ QString(strerror(errno)) +"\n" << oendl; return 0; @@ -398,3 +403,3 @@ int LibMadPlugin::http_open(const QString& path ) { if (strncmp(http_request + 4, "200 ", 4)) { - // qDebug("http_open: " + QString(http_request) + "\n"); + // odebug << "http_open: " + QString(http_request) + "\n" << oendl; return 0; @@ -419,3 +424,3 @@ int LibMadPlugin::http_open(const QString& path ) { - // qDebug("Stream info: " + info); + // odebug << "Stream info: " + info << oendl; @@ -431,3 +436,3 @@ bool LibMadPlugin::open( const QString& path ) { bufferSize = cfg.readNumEntry("MPeg_BufferSize",MPEG_BUFFER_SIZE); - // qDebug("buffer size is %d", bufferSize); + // odebug << "buffer size is " << bufferSize << "" << oendl; d->bad_last_frame = 0; @@ -436,3 +441,3 @@ bool LibMadPlugin::open( const QString& path ) { - //qDebug( "Opening %s", path.latin1() ); + //odebug << "Opening " << path << "" << oendl; @@ -452,3 +457,3 @@ bool LibMadPlugin::open( const QString& path ) { if (d->input.fd == -1) { - // qDebug("error opening %s", d->input.path ); + // odebug << "error opening " << d->input.path << "" << oendl; return FALSE; @@ -458,3 +463,3 @@ bool LibMadPlugin::open( const QString& path ) { if (fstat(d->input.fd, &stat) == -1) { - // qDebug("error calling fstat"); return FALSE; + // odebug << "error calling fstat" << oendl; return FALSE; } @@ -470,3 +475,3 @@ bool LibMadPlugin::open( const QString& path ) { if (d->input.fdm == 0) { - // qDebug("error mmapping file"); return FALSE; + // odebug << "error mmapping file" << oendl; return FALSE; } @@ -479,3 +484,3 @@ bool LibMadPlugin::open( const QString& path ) { if (d->input.data == 0) { - // qDebug("error allocating input buffer"); + // odebug << "error allocating input buffer" << oendl; return FALSE; @@ -507,3 +512,3 @@ bool LibMadPlugin::close() { if (unmap_file(d->input.fdm, d->input.length) == -1) { - // qDebug("error munmapping file"); + // odebug << "error munmapping file" << oendl; result = FALSE; @@ -521,3 +526,3 @@ bool LibMadPlugin::close() { if (::close(d->input.fd) == -1) { - // qDebug("error closing file %s", d->input.path); + // odebug << "error closing file " << d->input.path << "" << oendl; result = FALSE; @@ -547,3 +552,3 @@ int LibMadPlugin::audioChannels( int ) { long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); - qDebug( "LibMadPlugin::audioChannels: %i", d->frame.header.mode > 0 ? 2 : 1 ); + odebug << "LibMadPlugin::audioChannels: " << d->frame.header.mode > 0 ? 2 : 1 << "" << oendl; return d->frame.header.mode > 0 ? 2 : 1; @@ -557,3 +562,3 @@ int LibMadPlugin::audioFrequency( int ) { long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); - // qDebug( "LibMadPlugin::audioFrequency: %i", d->frame.header.samplerate ); + // odebug << "LibMadPlugin::audioFrequency: " << d->frame.header.samplerate << "" << oendl; return d->frame.header.samplerate; @@ -568,4 +573,3 @@ int LibMadPlugin::audioSamples( int ) { /* - qDebug( "LibMadPlugin::audioSamples: %i*%i", d->frame.header.duration.seconds, - d->frame.header.samplerate ); + odebug << "LibMadPlugin::audioSamples: " << d->frame.header.duration.seconds << "*" << d->frame.header.samplerate << oendl; return d->frame.header.duration.seconds * d->frame.header.samplerate; @@ -578,3 +582,3 @@ int LibMadPlugin::audioSamples( int ) { // (int)d->frame.header.samplerate, (int)d->frame.header.bitrate ); - // qDebug( "LibMadPlugin::audioSamples: %i", samples ); + // odebug << "LibMadPlugin::audioSamples: " << samples << "" << oendl; @@ -594,3 +598,3 @@ bool LibMadPlugin::audioSetSample( long, int ) { // // Seek to requested position -// qDebug( "seek pos: %i", (int)((double)pos * d->input.fileLength / totalSamples) ); +// odebug << "seek pos: " << (int)((double)pos * d->input.fileLength / totalSamples) << "" << oendl; // ::lseek( d->input.fd, (long)((double)pos * d->input.fileLength / totalSamples), SEEK_SET ); @@ -682,3 +686,3 @@ bool LibMadPlugin::read() { if (len == -1) { - // qDebug("error reading audio"); + // odebug << "error reading audio" << oendl; return FALSE; @@ -760,3 +764,3 @@ bool LibMadPlugin::decode( short *output, long samples, long& samplesMade ) { mad_frame_mute(&d->frame); - // qDebug( "error decoding, bad crc" ); + // odebug << "error decoding, bad crc" << oendl; } @@ -823,3 +827,3 @@ double LibMadPlugin::getTime() { void LibMadPlugin::printID3Tags() { - // qDebug( "LibMadPlugin::printID3Tags" ); + // odebug << "LibMadPlugin::printID3Tags" << oendl; @@ -828,3 +832,3 @@ void LibMadPlugin::printID3Tags() { if ( ::lseek( d->input.fd, -128, SEEK_END ) == -1 ) { - // qDebug( "error seeking to id3 tags" ); + // odebug << "error seeking to id3 tags" << oendl; return; @@ -833,3 +837,3 @@ void LibMadPlugin::printID3Tags() { if ( ::read( d->input.fd, id3v1, 128 ) != 128 ) { - // qDebug( "error reading in id3 tags" ); + // odebug << "error reading in id3 tags" << oendl; return; @@ -843,3 +847,3 @@ void LibMadPlugin::printID3Tags() { char *ptr = id3v1 + 3, *ptr2 = ptr + len[0]; - // qDebug( "ID3 tags in file:" ); + // odebug << "ID3 tags in file:" << oendl; info = ""; @@ -855,3 +859,3 @@ void LibMadPlugin::printID3Tags() { } -// qDebug( info.latin1() ); +// odebug << info.latin1() << oendl; *ptr3 = push2; @@ -864,3 +868,3 @@ void LibMadPlugin::printID3Tags() { if ( ::lseek(d->input.fd, 0, SEEK_SET) == -1 ) { - // qDebug( "error seeking back to beginning" ); + // odebug << "error seeking back to beginning" << oendl; return; diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp index 4ed5921..91153fd 100644 --- a/core/multimedia/opieplayer/loopcontrol.cpp +++ b/core/multimedia/opieplayer/loopcontrol.cpp @@ -21,3 +21,12 @@ + +#include "mediaplayerstate.h" +#include "loopcontrol.h" +#include "videowidget.h" +#include "audiodevice.h" + +/* OPIE */ #include <qpe/qpeapplication.h> +#include <qpe/mediaplayerplugininterface.h> +#include <opie2/odebug.h> @@ -26,2 +35,6 @@ #endif + +/* QT */ + +/* STD */ #include <stdio.h> @@ -32,7 +45,2 @@ #include <unistd.h> -#include "loopcontrol.h" -#include "videowidget.h" -#include "audiodevice.h" -#include <qpe/mediaplayerplugininterface.h> -#include "mediaplayerstate.h" @@ -102,3 +110,3 @@ LoopControl::LoopControl( QObject *parent, const char *name ) connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) ); - //qDebug("starting loopcontrol"); + //odebug << "starting loopcontrol" << oendl; audioMutex = new Mutex; @@ -114,3 +122,3 @@ LoopControl::LoopControl( QObject *parent, const char *name ) } else { - // qDebug( "Error setting up a realtime thread, reverting to using a normal thread." ); + // odebug << "Error setting up a realtime thread, reverting to using a normal thread." << oendl; pthread_attr_destroy(&audio_attr); @@ -119,3 +127,3 @@ LoopControl::LoopControl( QObject *parent, const char *name ) #endif - //qDebug("create audio thread"); + //odebug << "create audio thread" << oendl; pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this); @@ -155,3 +163,3 @@ void LoopControl::setPosition( long pos ) { audioMutex->lock(); -// qDebug("Loop control %d", pos); +// odebug << "Loop control " << pos << "" << oendl; if ( hasVideoChannel && hasAudioChannel ) { @@ -230,3 +238,3 @@ void LoopControl::startAudio() { // if ( currentSample != audioSampleCounter + 1 ) -// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); +// odebug << "out of sync with decoder " << currentSample << " " << audioSampleCounter << "" << oendl; @@ -243,3 +251,3 @@ void LoopControl::startAudio() { else if ( sampleWaitTime <= -5000 ) { - // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); + // odebug << "need to catch up by: " << -sampleWaitTime << " (" << currentSample << "," << sampleWeShouldBeAt << ")" << oendl; // //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); @@ -363,3 +371,3 @@ bool LoopControl::init( const QString& filename ) { - // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); + // odebug << "Using the " << mediaPlayerState->curDecoder()->pluginName() << " decoder" << oendl; @@ -389,3 +397,3 @@ bool LoopControl::init( const QString& filename ) { - // qDebug( "LC- channels = %d", channels ); + // odebug << "LC- channels = " << channels << "" << oendl; @@ -395,3 +403,3 @@ bool LoopControl::init( const QString& filename ) { total_audio_samples += 1000; - // qDebug("total samples %d", total_audio_samples); + // odebug << "total samples " << total_audio_samples << "" << oendl; mediaPlayerState->setLength( total_audio_samples ); @@ -399,3 +407,3 @@ bool LoopControl::init( const QString& filename ) { freq = mediaPlayerState->curDecoder()->audioFrequency( astream ); - // qDebug( "LC- frequency = %d", freq ); + // odebug << "LC- frequency = " << freq << "" << oendl; @@ -405,3 +413,3 @@ bool LoopControl::init( const QString& filename ) { bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime(); - // qDebug("using stupid hack"); + // odebug << "using stupid hack" << oendl; } else { @@ -453,3 +461,3 @@ bool LoopControl::init( const QString& filename ) { void LoopControl::play() { - // qDebug("LC- play"); + // odebug << "LC- play" << oendl; mediaPlayerState->setPosition( 0); //uglyhack diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp index 0a1fc17..9a162c2 100644 --- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp +++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp @@ -21,6 +21,13 @@ +#include "mediaplayerplugininterface.h" +#include "loopcontrol.h" +#include "audiodevice.h" +#include "videowidget.h" +#include "audiowidget.h" +#include "mediaplayerstate.h" + +/* OPIE */ #include <qpe/qpeapplication.h> #include <qpe/custom.h> -#include <qimage.h> -#include <qpainter.h> + #if !defined(QT_NO_COP) @@ -28,3 +35,10 @@ #endif -#include "mediaplayerplugininterface.h" + +#include <opie2/odebug.h> + +/* QT */ +#include <qimage.h> +#include <qpainter.h> + +/* STD */ #include <stdio.h> @@ -35,10 +49,2 @@ #include <pthread.h> -#include "loopcontrol.h" -#include "audiodevice.h" -#include "videowidget.h" -#include "audiowidget.h" -#include "mediaplayerstate.h" - - - @@ -193,3 +199,3 @@ void LoopControl::setPosition( long pos ) { audioMutex->lock(); - //qDebug("setting position"); + //odebug << "setting position" << oendl; playtime.restart(); @@ -294,3 +300,3 @@ void LoopControl::startVideo() { -// qDebug("elapsed: %i %i (%f)", int( playtime.elapsed() ), current_frame, framerate ); +// odebug << "elapsed: " << int( playtime.elapsed() ) << " " << current_frame << " (" << framerate << ")" << oendl; @@ -309,3 +315,3 @@ void LoopControl::startVideo() { if ( current_frame > prev_frame + 1 ) { - // qDebug("skipped a frame"); + // odebug << "skipped a frame" << oendl; mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream ); @@ -343,3 +349,3 @@ void LoopControl::startAudio() { // if ( currentSample != audioSampleCounter + 1 ) -// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); +// odebug << "out of sync with decoder " << currentSample << " " << audioSampleCounter << "" << oendl; audioMutex->unlock(); @@ -367,3 +373,3 @@ void LoopControl::startAudio() { if ( sampleWaitTime >= 0 && sampleWaitTime <= 2000 ) { - //qDebug("sampleWaitTime: %i", sampleWaitTime); + //odebug << "sampleWaitTime: " << sampleWaitTime << "" << oendl; usleep( ( sampleWaitTime * 1000000 ) / ( freq ) ); @@ -372,3 +378,3 @@ void LoopControl::startAudio() { if ( sampleWaitTime <= -2000 ) { - // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); + // odebug << "need to catch up by: " << -sampleWaitTime << " (" << currentSample << "," << sampleWeShouldBeAt << ")" << oendl; mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); @@ -389,4 +395,4 @@ void LoopControl::startAudio() { - //qDebug("currentSample: %i audioSampleCounter: %i total_audio_samples: %i", currentSample, audioSampleCounter, total_audio_samples); -// qDebug("current: %i counter: %i total: %i", currentSample, audioSampleCounter, (int)total_audio_samples); + //odebug << "currentSample: " << currentSample << " audioSampleCounter: " << audioSampleCounter << " total_audio_samples: " << total_audio_samples << "" << oendl; +// odebug << "current: " << currentSample << " counter: " << audioSampleCounter << " total: " << (int)total_audio_samples << "" << oendl; moreAudio = audioSampleCounter <= total_audio_samples; @@ -403,3 +409,3 @@ void LoopControl::startAudio() { - // qDebug( "End of file" ); + // odebug << "End of file" << oendl; @@ -417,3 +423,3 @@ void LoopControl::killTimers() { if ( pthread_join(video_tid,&thread_result) != 0 ) - // qDebug("thread join error 1"); + // odebug << "thread join error 1" << oendl; pthread_attr_destroy(&video_attr); @@ -427,3 +433,3 @@ void LoopControl::killTimers() { if ( pthread_join(audio_tid,&thread_result) != 0 ) - // qDebug("thread join error 2"); + // odebug << "thread join error 2" << oendl; pthread_attr_destroy(&audio_attr); @@ -449,3 +455,3 @@ void LoopControl::startTimers() { pthread_attr_setschedpolicy(&audio_attr,SCHED_RR); // Real-time round robin - //qDebug("min: %i, max: %i", sched_get_priority_min( SCHED_RR ), sched_get_priority_max( SCHED_RR ) ); + //odebug << "min: " << sched_get_priority_min( SCHED_RR ) << ", max: " << sched_get_priority_max( SCHED_RR ) << "" << oendl; sched_param params; @@ -514,3 +520,3 @@ bool LoopControl::init( const QString& filename ) { - // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); + // odebug << "Using the " << mediaPlayerState->curDecoder()->pluginName() << " decoder" << oendl; diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp index 6c743ec..15f6928 100644 --- a/core/multimedia/opieplayer/mediaplayer.cpp +++ b/core/multimedia/opieplayer/mediaplayer.cpp @@ -21,4 +21,2 @@ -#include <qmessagebox.h> - #include "mediaplayer.h" @@ -28,5 +26,9 @@ #include "audiodevice.h" - #include "mediaplayerstate.h" +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ +#include <qmessagebox.h> @@ -75,3 +77,3 @@ void MediaPlayer::play() { void MediaPlayer::setPlaying( bool play ) { - // qDebug("MediaPlayer setPlaying %d", play); + // odebug << "MediaPlayer setPlaying " << play << "" << oendl; if ( !play ) { @@ -86,3 +88,3 @@ void MediaPlayer::setPlaying( bool play ) { } - // qDebug("about to ctrash"); + // odebug << "about to ctrash" << oendl; const DocLnk *playListCurrent = playList->current(); @@ -193,3 +195,3 @@ void MediaPlayer::stopChangingVolume() { void MediaPlayer::timerEvent( QTimerEvent * ) { -// qDebug("timer"); +// odebug << "timer" << oendl; if ( volumeDirection == +1 ) @@ -205,3 +207,3 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) { -// qDebug("returning %d, %d, %d, %d", v, l, r, m); +// odebug << "returning " << v << ", " << l << ", " << r << ", " << m << "" << oendl; return; @@ -251,3 +253,3 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { case Key_F12: //home - // qDebug("Blank here"); + // odebug << "Blank here" << oendl; break; diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp index 5bfb87e..b700cd1 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.cpp +++ b/core/multimedia/opieplayer/mediaplayerstate.cpp @@ -19,10 +19,2 @@ **********************************************************************/ -#include <qpe/qpeapplication.h> -#include <qpe/qlibrary.h> -#include <qpe/config.h> -#include <qdir.h> -#include <qpe/mediaplayerplugininterface.h> -#include "mediaplayerstate.h" - - @@ -35,2 +27,14 @@ +#include "mediaplayerstate.h" + +/* OPIE */ +#include <qpe/qpeapplication.h> +#include <qpe/qlibrary.h> +#include <qpe/config.h> +#include <qpe/mediaplayerplugininterface.h> +#include <opie2/odebug.h> + +/* QT */ +#include <qdir.h> + @@ -127,3 +131,3 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { void MediaPlayerState::loadPlugins() { - // qDebug("load plugins"); + // odebug << "load plugins" << oendl; #ifndef QT_NO_COMPONENT @@ -144,3 +148,3 @@ void MediaPlayerState::loadPlugins() { QLibrary *lib = new QLibrary( path + "/" + *it ); -// qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); +// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; @@ -148,3 +152,3 @@ void MediaPlayerState::loadPlugins() { -// qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); +// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; diff --git a/core/multimedia/opieplayer/modplug/memfile.cpp b/core/multimedia/opieplayer/modplug/memfile.cpp index 8a29997..cd243c7 100644 --- a/core/multimedia/opieplayer/modplug/memfile.cpp +++ b/core/multimedia/opieplayer/modplug/memfile.cpp @@ -21,2 +21,6 @@ +/* OPIE */ +#include <opie2/odebug.h> + +/* STD */ #include <unistd.h> @@ -68,3 +72,3 @@ QByteArray &MemFile::data() else - qDebug( "MemFile: mmap() failed!" ); + odebug << "MemFile: mmap() failed!" << oendl; // fallback diff --git a/core/multimedia/opieplayer/om3u.cpp b/core/multimedia/opieplayer/om3u.cpp index ae89518..95ed03c 100644 --- a/core/multimedia/opieplayer/om3u.cpp +++ b/core/multimedia/opieplayer/om3u.cpp @@ -33,2 +33,4 @@ +/* OPIE */ +#include <opie2/odebug.h> @@ -46,3 +48,3 @@ Om3u::Om3u( const QString &filePath, int mode) : QStringList (){ -//qDebug("<<<<<<<new m3u "+filePath); +//odebug << "<<<<<<<new m3u "+filePath << oendl; f.setName(filePath); @@ -54,3 +56,3 @@ Om3u::~Om3u(){} void Om3u::readM3u() { -// qDebug("<<<<<<reading m3u "+f.name()); +// odebug << "<<<<<<reading m3u "+f.name() << oendl; QTextStream t(&f); @@ -60,3 +62,3 @@ void Om3u::readM3u() { s=t.readLine(); - // qDebug(s); + // odebug << s << oendl; if( s.find( "#", 0, TRUE) == -1 ) { @@ -69,3 +71,3 @@ void Om3u::readM3u() { append(s); - // qDebug(s); + // odebug << s << oendl; } else { // is url @@ -79,3 +81,3 @@ void Om3u::readM3u() { append(name); - // qDebug(name); + // odebug << name << oendl; } @@ -94,3 +96,3 @@ void Om3u::readPls() { //it's a pls file s.replace( QRegExp( "%20" )," "); -// qDebug( "adding " + s + " to playlist" ); +// odebug << "adding " + s + " to playlist" << oendl; // numberofentries=2 @@ -128,3 +130,3 @@ void Om3u::write() { //writes list to m3u file for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { - // qDebug(*it); + // odebug << *it << oendl; t << *it << "\n"; @@ -144,3 +146,3 @@ void Om3u::remove(const QString &filePath) { //removes from m3u list currentFile=*it; - // qDebug(*it); + // odebug << *it << oendl; diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index ad831cf..58c3966 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -20,6 +20,11 @@ -#include <qheader.h> - #include "playlistselection.h" +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ +#include <qheader.h> + +/* STD */ #include <stdlib.h> @@ -46,3 +51,3 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) { -// qDebug("starting playlistselector"); +// odebug << "starting playlistselector" << oendl; // #ifdef USE_PLAYLIST_BACKGROUND @@ -68,3 +73,3 @@ PlayListSelection::~PlayListSelection() { void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { -// qDebug("drawBackground"); +// odebug << "drawBackground" << oendl; p->fillRect( r, QBrush( white ) ); @@ -188,3 +193,3 @@ void PlayListSelection::writeCurrent( Config& cfg ) { cfg.writeEntry("current", item->text(0) ); - // qDebug(item->text(0)); + // odebug << item->text(0) << oendl; @@ -197,5 +202,5 @@ void PlayListSelection::setSelectedItem(const QString &strk ) { for ( ; it.current(); ++it ) { -// qDebug( it.current()->text(0)); +// odebug << it.current()->text(0) << oendl; if( strk == it.current()->text(0)) { -// qDebug( "We have a match "+strk); +// odebug << "We have a match "+strk << oendl; setSelected( it.current(), TRUE); diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 3609f5d..d85ce50 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -22,6 +22,16 @@ -#include <qtoolbar.h> +#include "playlistselection.h" +#include "playlistwidget.h" +#include "mediaplayerstate.h" +#include "inputDialog.h" +#include "audiowidget.h" +#include "videowidget.h" + +/* OPIE */ #include <qpe/qpemenubar.h> #include <qpe/lnkproperties.h> +#include <opie2/odebug.h> +/* QT */ +#include <qtoolbar.h> #include <qaction.h> @@ -29,14 +39,6 @@ #include <qmessagebox.h> - //#include <qtimer.h> -#include "playlistselection.h" -#include "playlistwidget.h" -#include "mediaplayerstate.h" - -#include "inputDialog.h" - +/* STD */ #include <stdlib.h> -#include "audiowidget.h" -#include "videowidget.h" @@ -391,3 +393,3 @@ void PlayListWidget::writeConfig( Config& cfg ) const { entryName.sprintf( "File%i", noOfFiles + 1 ); -// qDebug(entryName); +// odebug << entryName << oendl; cfg.writeEntry( entryName, lnk->linkFile() ); @@ -485,3 +487,3 @@ void PlayListWidget::setDocument(const QString& fileref) { void PlayListWidget::setDocumentEx(const QString& fileref) { - qDebug("opieplayer receive "+fileref); + odebug << "opieplayer receive "+fileref << oendl; clearList(); @@ -494,3 +496,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) { } - // qDebug("<<<<<<<<<<<<<<<<<<<<<<setDocument "+fileref); + // odebug << "<<<<<<<<<<<<<<<<<<<<<<setDocument "+fileref << oendl; QString extension = fileInfo.extension(false); @@ -536,3 +538,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) { void PlayListWidget::setActiveWindow() { - // qDebug("SETTING active window"); + // odebug << "SETTING active window" << oendl; // When we get raised we need to ensure that it switches views @@ -553,3 +555,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly { - // qDebug("playlist"); + // odebug << "playlist" << oendl; if ( mediaPlayerState->playlist() ) { @@ -566,3 +568,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly { - // qDebug("audioView"); + // odebug << "audioView" << oendl; QListIterator<DocLnk> dit( files.children() ); @@ -662,3 +664,3 @@ void PlayListWidget::loadList( const DocLnk & lnk) { QString name = lnk.name(); - // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); + // odebug << "<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name << oendl; @@ -666,3 +668,3 @@ void PlayListWidget::loadList( const DocLnk & lnk) { setCaption("OpiePlayer: "+name); - // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); + // odebug << "<<<<<<<<<<<<load list "+ lnk.file() << oendl; clearList(); @@ -820,3 +822,3 @@ void PlayListWidget::btnPlay(bool b) { insanityBool=FALSE; - qDebug("insanity"); + odebug << "insanity" << oendl; // } @@ -953,3 +955,3 @@ void PlayListWidget::listDelete() { void PlayListWidget::scanForAudio() { - // qDebug("scan for audio"); + // odebug << "scan for audio" << oendl; files.detachChildren(); @@ -963,3 +965,3 @@ void PlayListWidget::scanForAudio() { void PlayListWidget::scanForVideo() { - // qDebug("scan for video"); + // odebug << "scan for video" << oendl; vFiles.detachChildren(); @@ -998,3 +1000,3 @@ void PlayListWidget::populateAudioView() { size = QFile( dit.current()->file() ).size(); - // qDebug(dit.current()->name()); + // odebug << dit.current()->name() << oendl; newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), @@ -1042,3 +1044,3 @@ void PlayListWidget::openFile() { filename = fileDlg->text(); - // qDebug( "Selected filename is " + filename ); + // odebug << "Selected filename is " + filename << oendl; DocLnk lnk; @@ -1087,3 +1089,3 @@ reads m3u and shows files/urls to playlist widget */ void PlayListWidget::readm3u( const QString &filename ) { - // qDebug( "read m3u filename " + filename ); + // odebug << "read m3u filename " + filename << oendl; @@ -1096,3 +1098,3 @@ void PlayListWidget::readm3u( const QString &filename ) { s = *it; - // qDebug("reading "+ s); + // odebug << "reading "+ s << oendl; if(s.left(4)=="http") { @@ -1113,3 +1115,3 @@ void PlayListWidget::readm3u( const QString &filename ) { if(s.left(1) != "/") { - // qDebug("set link "+QFileInfo(filename).dirPath()+"/"+s); + // odebug << "set link "+QFileInfo(filename).dirPath()+"/"+s << oendl; lnk.setFile( QFileInfo(filename).dirPath()+"/"+s); @@ -1117,3 +1119,3 @@ void PlayListWidget::readm3u( const QString &filename ) { } else { - // qDebug("set link2 "+s); + // odebug << "set link2 "+s << oendl; lnk.setFile( s); @@ -1144,3 +1146,3 @@ void PlayListWidget::readPls( const QString &filename ) { - // qDebug( "pls filename is " + filename ); + // odebug << "pls filename is " + filename << oendl; Om3u *m3uList; @@ -1187,3 +1189,3 @@ void PlayListWidget::readPls( const QString &filename ) { void PlayListWidget::writeCurrentM3u() { - // qDebug("writing to current m3u"); + // odebug << "writing to current m3u" << oendl; Config cfg( "OpiePlayer" ); @@ -1196,3 +1198,3 @@ void PlayListWidget::writeCurrentM3u() { do { - // qDebug( "writeCurrentM3u " +d->selectedFiles->current()->file()); + // odebug << "writeCurrentM3u " +d->selectedFiles->current()->file() << oendl; m3uList->add( d->selectedFiles->current()->file() ); @@ -1200,3 +1202,3 @@ void PlayListWidget::writeCurrentM3u() { while ( d->selectedFiles->next() ); - // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); + // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl; m3uList->write(); @@ -1219,3 +1221,3 @@ void PlayListWidget::writem3u() { name = fileDlg->text(); - // qDebug( filename ); + // odebug << filename << oendl; if( name.find("/",0,true) != -1) {// assume they specify a file path @@ -1237,3 +1239,3 @@ void PlayListWidget::writem3u() { while ( d->selectedFiles->next() ); - // qDebug( list ); + // odebug << list << oendl; m3uList->write(); @@ -1249,3 +1251,3 @@ void PlayListWidget::writem3u() { - // qDebug(filename); + // odebug << filename << oendl; Config config( "OpiePlayer" ); @@ -1257,3 +1259,3 @@ void PlayListWidget::writem3u() { if(!lnk.writeLink()) { - // qDebug("Writing doclink did not work"); + // odebug << "Writing doclink did not work" << oendl; } @@ -1293,3 +1295,3 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) // case Key_P: //play -// qDebug("Play"); +// odebug << "Play" << oendl; // playSelected(); @@ -1327,3 +1329,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) { -// qDebug("Key press"); +// odebug << "Key press" << oendl; // switch ( e->key() ) { @@ -1331,3 +1333,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) // case Key_A: //add to playlist -// qDebug("Add"); +// odebug << "Add" << oendl; // addSelected(); @@ -1338,3 +1340,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) // case Key_P: //play -// qDebug("Play"); +// odebug << "Play" << oendl; // playSelected(); @@ -1342,3 +1344,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) // case Key_Space: -// qDebug("Play"); +// odebug << "Play" << oendl; // playSelected(); @@ -1349,3 +1351,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *) void PlayListWidget::doBlank() { - // qDebug("do blanking"); + // odebug << "do blanking" << oendl; #ifdef QT_QWS_DEVFS @@ -1365,3 +1367,3 @@ void PlayListWidget::doUnblank() { // fd=open("/dev/fb0",O_RDWR); - // qDebug("do unblanking"); + // odebug << "do unblanking" << oendl; if (fd != -1) { @@ -1390,3 +1392,3 @@ void PlayListWidget::populateSkinsMenu() { skinName = fi->fileName(); - // qDebug( fi->fileName() ); + // odebug << fi->fileName() << oendl; if( skinName != "." && skinName != ".." && skinName !="CVS" ) { @@ -1416,3 +1418,3 @@ void PlayListWidget::skinsMenuActivated( int item ) { void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { - // qDebug("qcop message "+msg ); + // odebug << "qcop message "+msg << oendl; QDataStream stream ( data, IO_ReadOnly ); diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 164458b..e851044 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp @@ -19,2 +19,7 @@ **********************************************************************/ + +#include "videowidget.h" +#include "mediaplayerstate.h" + +/* OPIE */ #include <qpe/resource.h> @@ -23,7 +28,7 @@ #include <qpe/qpeapplication.h> +#include <opie2/odebug.h> +/* QT */ #include <qdir.h> #include <qslider.h> -#include "videowidget.h" -#include "mediaplayerstate.h" @@ -84,3 +89,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : - // qDebug("skin path " + skinPath); + // odebug << "skin path " + skinPath << oendl; @@ -98,3 +103,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); - // qDebug("loading "+filename); + // odebug << "loading "+filename << oendl; masks[i] = new QBitmap( filename ); @@ -113,3 +118,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : } - // qDebug("finished loading first pics"); + // odebug << "finished loading first pics" << oendl; for ( int i = 0; i < 7; i++ ) { @@ -125,3 +130,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { -// qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); +// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl; QImage img; @@ -355,3 +360,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { case VideoPlay: { - // qDebug("play"); + // odebug << "play" << oendl; if( !mediaPlayerState->playing()) { @@ -363,3 +368,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { if( mediaPlayerState->isPaused ) { - // qDebug("isPaused"); + // odebug << "isPaused" << oendl; setToggleButton( i, FALSE ); @@ -368,3 +373,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { } else if( !mediaPlayerState->isPaused ) { - // qDebug("is not paused"); + // odebug << "is not paused" << oendl; setToggleButton( i, TRUE ); @@ -460,3 +465,3 @@ bool VideoWidget::playVideo() { bool result = FALSE; -// qDebug("<<<<<<<<<<<<<<<< play video"); +// odebug << "<<<<<<<<<<<<<<<< play video" << oendl; int stream = 0; diff --git a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp index 53c4b2b..0002213 100644 --- a/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp +++ b/core/multimedia/opieplayer/vorbis/libtremorplugin.cpp @@ -21,2 +21,11 @@ +#include "libtremorplugin.h" + +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ +#include <qmap.h> + +/* STD */ #include <stdio.h> @@ -35,6 +44,2 @@ -#include <qmap.h> - -#include "libtremorplugin.h" - @@ -64,3 +69,3 @@ public: LibTremorPlugin::LibTremorPlugin() { -qDebug("<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>"); +odebug << "<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>" << oendl; d = new LibTremorPluginData; @@ -107,3 +112,3 @@ bool LibTremorPlugin::open( const QString& path ) { if (d->f == 0) { - qDebug("error opening %s", d->filename ); + odebug << "error opening " << d->filename << "" << oendl; return FALSE; @@ -112,3 +117,3 @@ bool LibTremorPlugin::open( const QString& path ) { if (ov_open(d->f, &d->vf, NULL, 0) < 0) { - qDebug("error opening %s", d->filename); + odebug << "error opening " << d->filename << "" << oendl; return FALSE; @@ -155,3 +160,3 @@ bool LibTremorPlugin::open( const QString& path ) { - qDebug("finfo: " + d->finfo); + odebug << "finfo: " + d->finfo << oendl; @@ -167,3 +172,3 @@ bool LibTremorPlugin::close() { if (fclose(d->f) == -1) { - qDebug("error closing file %s", d->filename); + odebug << "error closing file " << d->filename << "" << oendl; result = FALSE; @@ -195,3 +200,3 @@ int LibTremorPlugin::audioStreams() { int LibTremorPlugin::audioChannels( int ) { - qDebug( "LibTremorPlugin::audioChannels: %i", d->vi->channels ); + odebug << "LibTremorPlugin::audioChannels: " << d->vi->channels << "" << oendl; return d->vi->channels; @@ -201,3 +206,3 @@ int LibTremorPlugin::audioChannels( int ) { int LibTremorPlugin::audioFrequency( int ) { - qDebug( "LibTremorPlugin::audioFrequency: %ld", d->vi->rate ); + odebug << "LibTremorPlugin::audioFrequency: " << d->vi->rate << "" << oendl; return d->vi->rate; @@ -225,3 +230,3 @@ long LibTremorPlugin::audioGetSample( int ) { bool LibTremorPlugin::audioReadSamples( short *output, int, long samples, long& samplesMade, int ) { -// qDebug( "<<<<<<<<<<<<LibTremorPlugin::audioReadStereoSamples %d", samples ); +// odebug << "<<<<<<<<<<<<LibTremorPlugin::audioReadStereoSamples " << samples << "" << oendl; @@ -247,3 +252,3 @@ bool LibTremorPlugin::audioReadSamples( short *output, int, long samples, long& long ret = ov_read(&d->vf, buf, n, &d->csection); -// qDebug("%d", ret); +// odebug << "" << ret << "" << oendl; if (ret == 0) { diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp index 4e82900..7f3a0a8 100644 --- a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp +++ b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp @@ -21,2 +21,12 @@ + +#include "wavplugin.h" + +/* OPIE */ +#include <opie2/odebug.h> + +/* QT */ +#include <qfile.h> + +/* STD */ #include <stdio.h> @@ -26,4 +36,2 @@ #include <unistd.h> -#include <qfile.h> -#include "wavplugin.h" @@ -78,3 +86,3 @@ public: if ( input == 0 ) { - qDebug("no input"); + odebug << "no input" << oendl; return FALSE; @@ -85,3 +93,3 @@ public: if ( getSample(l, r) == FALSE ) { - qDebug("didn't get sample"); + odebug << "didn't get sample" << oendl; return FALSE; @@ -137,3 +145,3 @@ public: if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) { - qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag); + odebug << "WAV file: UNSUPPORTED FORMAT " << chunkdata.formatTag << "" << oendl; return FALSE; @@ -147,3 +155,3 @@ public: } // while - qDebug("bits %d", chunkdata.wBitsPerSample); + odebug << "bits " << chunkdata.wBitsPerSample << "" << oendl; return TRUE; @@ -209,3 +217,3 @@ WavPlugin::~WavPlugin() { bool WavPlugin::isFileSupported( const QString& path ) { -// qDebug( "WavPlugin::isFileSupported" ); +// odebug << "WavPlugin::isFileSupported" << oendl; @@ -228,3 +236,3 @@ bool WavPlugin::isFileSupported( const QString& path ) { bool WavPlugin::open( const QString& path ) { -// qDebug( "WavPlugin::open" ); +// odebug << "WavPlugin::open" << oendl; @@ -236,3 +244,3 @@ bool WavPlugin::open( const QString& path ) { if ( d->input->open(IO_ReadOnly) == FALSE ) { - qDebug("couldn't open file"); + odebug << "couldn't open file" << oendl; delete d->input; @@ -250,3 +258,3 @@ bool WavPlugin::open( const QString& path ) { bool WavPlugin::close() { -// qDebug( "WavPlugin::close" ); +// odebug << "WavPlugin::close" << oendl; @@ -260,3 +268,3 @@ bool WavPlugin::close() { bool WavPlugin::isOpen() { -// qDebug( "WavPlugin::isOpen" ); +// odebug << "WavPlugin::isOpen" << oendl; return ( d->input != 0 ); @@ -266,3 +274,3 @@ bool WavPlugin::isOpen() { int WavPlugin::audioStreams() { -// qDebug( "WavPlugin::audioStreams" ); +// odebug << "WavPlugin::audioStreams" << oendl; return 1; @@ -272,3 +280,3 @@ int WavPlugin::audioStreams() { int WavPlugin::audioChannels( int ) { -// qDebug( "WavPlugin::audioChannels" ); +// odebug << "WavPlugin::audioChannels" << oendl; return d->chunkdata.channels;// 2; // ### Always scale audio to stereo samples @@ -278,3 +286,3 @@ int WavPlugin::audioChannels( int ) { int WavPlugin::audioFrequency( int ) { -// qDebug( "WavPlugin::audioFrequency %d", d->chunkdata.samplesPerSec ); +// odebug << "WavPlugin::audioFrequency " << d->chunkdata.samplesPerSec << "" << oendl; return d->chunkdata.samplesPerSec; //44100; // ### Always scale to frequency of 44100 @@ -284,3 +292,3 @@ int WavPlugin::audioFrequency( int ) { int WavPlugin::audioSamples( int ) { -// qDebug( "WavPlugin::audioSamples" ); +// odebug << "WavPlugin::audioSamples" << oendl; return d->samples / d->chunkdata.channels/2; // ### Scaled samples will be made stereo, @@ -291,3 +299,3 @@ int WavPlugin::audioSamples( int ) { bool WavPlugin::audioSetSample( long, int ) { -// qDebug( "WavPlugin::audioSetSample" ); +// odebug << "WavPlugin::audioSetSample" << oendl; return FALSE; @@ -297,3 +305,3 @@ bool WavPlugin::audioSetSample( long, int ) { long WavPlugin::audioGetSample( int ) { -// qDebug( "WavPlugin::audioGetSample" ); +// odebug << "WavPlugin::audioGetSample" << oendl; return 0; @@ -327,3 +335,3 @@ bool WavPlugin::audioReadStereoSamples( short *output, long samples, long& sampl bool WavPlugin::audioReadSamples( short *output, int channels, long samples, long& samplesMade, int ) { -// qDebug( "WavPlugin::audioReadSamples" ); +// odebug << "WavPlugin::audioReadSamples" << oendl; return d->add( output, samples, samplesMade, channels != 1 ); @@ -332,3 +340,3 @@ bool WavPlugin::audioReadSamples( short *output, int channels, long samples, lon double WavPlugin::getTime() { -// qDebug( "WavPlugin::getTime" ); //this is a stupid hack here!! +// odebug << "WavPlugin::getTime" << oendl; //this is a stupid hack here!! return d->chunkdata.wBitsPerSample; /*0.0*/; @@ -337,3 +345,3 @@ double WavPlugin::getTime() { // int WavPlugin::audioBitsPerSample( int ) { -// // qDebug( "WavPlugin::audioFormat %d", d->chunkdata.wBitsPerSample ); +// // odebug << "WavPlugin::audioFormat " << d->chunkdata.wBitsPerSample << "" << oendl; // return d->chunkdata.wBitsPerSample; // |