summaryrefslogtreecommitdiff
path: root/core/multimedia
authorar <ar>2004-05-02 17:04:41 (UTC)
committer ar <ar>2004-05-02 17:04:41 (UTC)
commit4d3379027557e251201b531896974a69ae4c665a (patch) (unidiff)
tree6e813be1aa29131f8f8e91f532f38f8a381e38f4 /core/multimedia
parentf8add41b2e0b0371754521b44d95f87fa70a6ff2 (diff)
downloadopie-4d3379027557e251201b531896974a69ae4c665a.zip
opie-4d3379027557e251201b531896974a69ae4c665a.tar.gz
opie-4d3379027557e251201b531896974a69ae4c665a.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'core/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp50
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp63
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.cpp72
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp68
-rw-r--r--core/multimedia/opieplayer/loopcontrol_threaded.cpp54
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp26
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp34
-rw-r--r--core/multimedia/opieplayer/modplug/memfile.cpp30
-rw-r--r--core/multimedia/opieplayer/om3u.cpp28
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp19
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp176
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp39
-rw-r--r--core/multimedia/opieplayer/vorbis/libtremorplugin.cpp31
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.cpp50
14 files changed, 402 insertions, 338 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 @@
22 22
23#include <stdlib.h>
24#include <stdio.h>
25#include <qpe/qpeapplication.h>
26#include <qpe/config.h>
27#include <qmessagebox.h>
28
29#include "audiodevice.h" 23#include "audiodevice.h"
30 24
31 25/* OPIE */
32#include <errno.h> 26#include <qpe/qpeapplication.h>
27#include <qpe/config.h>
28#include <opie2/odebug.h>
33 29
@@ -37,2 +33,10 @@
37 33
34/* QT */
35#include <qmessagebox.h>
36
37/* STD */
38#include <stdlib.h>
39#include <stdio.h>
40#include <errno.h>
41
38#if defined(Q_WS_X11) || defined(Q_WS_QWS) 42#if defined(Q_WS_X11) || defined(Q_WS_QWS)
@@ -147,3 +151,3 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
147//#endif 151//#endif
148// qDebug( "setting volume to: 0x%x", volume ); 152// odebug << "setting volume to: 0x" << volume << "" << oendl;
149#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 153#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,
157AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { 161AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
158 // qDebug("creating new audio device"); 162 // odebug << "creating new audio device" << oendl;
159// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 163// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
@@ -163,3 +167,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
163 d->bytesPerSample = bps; 167 d->bytesPerSample = bps;
164 // qDebug("%d",bps); 168 // odebug << "" << bps << "" << oendl;
165 int format=0; 169 int format=0;
@@ -168,3 +172,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
168 else format = AFMT_S16_LE; 172 else format = AFMT_S16_LE;
169 // qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format); 173 // odebug << "AD- freq " << f << ", channels " << chs << ", b/sample " << bps << ", bitrate " << format << "" << oendl;
170 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); 174 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
@@ -202,6 +206,6 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
202 perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); 206 perror("ioctl(\"SNDCTL_DSP_SETFMT\")");
203 // qDebug("freq %d", d->frequency); 207 // odebug << "freq " << d->frequency << "" << oendl;
204 if(ioctl( d->handle, SNDCTL_DSP_SPEED, &d->frequency )==-1) 208 if(ioctl( d->handle, SNDCTL_DSP_SPEED, &d->frequency )==-1)
205 perror("ioctl(\"SNDCTL_DSP_SPEED\")"); 209 perror("ioctl(\"SNDCTL_DSP_SPEED\")");
206 // qDebug("channels %d",d->channels); 210 // odebug << "channels " << d->channels << "" << oendl;
207 if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) { 211 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 ) {
218 222
219 //if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels ); 223 //if ( chs != d->channels ) odebug << "Wanted " << chs << ", got " << d->channels << " channels" << oendl;
220 //if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency ); 224 //if ( f != d->frequency ) odebug << "wanted " << f << "Hz, got " << d->frequency << "Hz" << oendl;
221 //if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" ); 225 //if ( capabilities & DSP_CAP_BATCH ) odebug << "Sound card has local buffer" << oendl;
222 //if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" ); 226 //if ( capabilities & DSP_CAP_REALTIME )odebug << "Sound card has realtime sync" << oendl;
223 //if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" ); 227 //if ( capabilities & DSP_CAP_TRIGGER ) odebug << "Sound card has precise trigger" << oendl;
224 //if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" ); 228 //if ( capabilities & DSP_CAP_MMAP ) odebug << "Sound card can mmap" << oendl;
225 229
@@ -229,3 +233,3 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
229AudioDevice::~AudioDevice() { 233AudioDevice::~AudioDevice() {
230 // qDebug("destryo audiodevice"); 234 // odebug << "destryo audiodevice" << oendl;
231// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 235// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
@@ -253,3 +257,3 @@ void AudioDevice::write( char *buffer, unsigned int length )
253 if ( t != (int)length) { 257 if ( t != (int)length) {
254 // qDebug("Ahhh!! memcpys 1"); 258 // odebug << "Ahhh!! memcpys 1" << oendl;
255 memcpy(d->unwrittenBuffer,buffer+t,length-t); 259 memcpy(d->unwrittenBuffer,buffer+t,length-t);
@@ -316,3 +320,3 @@ int AudioDevice::bytesWritten() {
316 if ( ioctl( d->handle, SNDCTL_DSP_GETODELAY, &buffered ) ) { 320 if ( ioctl( d->handle, SNDCTL_DSP_GETODELAY, &buffered ) ) {
317 // qDebug( "failed to get audio device position" ); 321 // odebug << "failed to get audio device position" << oendl;
318 return -1; 322 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 @@
19**********************************************************************/ 19**********************************************************************/
20#include "audiowidget.h"
21#include "mediaplayerstate.h"
22
23/* OPIE */
20#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
@@ -22,7 +26,8 @@
22#include <qpe/config.h> 26#include <qpe/config.h>
27#include <opie2/odebug.h>
23 28
29/* QT */
24#include <qdir.h> 30#include <qdir.h>
25#include "audiowidget.h"
26#include "mediaplayerstate.h"
27 31
32/* STD */
28#include <stdlib.h> 33#include <stdlib.h>
@@ -73,4 +78,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
73 setCaption( tr("OpiePlayer") ); 78 setCaption( tr("OpiePlayer") );
74 // qDebug("<<<<<audioWidget"); 79 // odebug << "<<<<<audioWidget" << oendl;
75 80
76 Config cfg("OpiePlayer"); 81 Config cfg("OpiePlayer");
@@ -86,5 +91,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
86 skinPath = "opieplayer2/skins/default"; 91 skinPath = "opieplayer2/skins/default";
87 92
88 // qDebug("skin path " + skinPath); 93 // odebug << "skin path " + skinPath << oendl;
89 94
90 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 95 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
@@ -105,4 +110,4 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
105 uchar *line = dest[y]; 110 uchar *line = dest[y];
106 for ( int x = 0; x < imgUp->width(); x++ ) 111 for ( int x = 0; x < imgUp->width(); x++ )
107 if ( !qRed( imgMask.pixel( x, y ) ) ) 112 if ( !qRed( imgMask.pixel( x, y ) ) )
108 line[x] = i + 1; 113 line[x] = i + 1;
@@ -118,12 +123,12 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
118 123
119 QWidget *d = QApplication::desktop(); 124 QWidget *d = QApplication::desktop();
120 int width = d->width(); 125 int width = d->width();
121 int height = d->height(); 126 int height = d->height();
122 127
123 if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { 128 if( (width != pixBg->width() ) || (height != pixBg->height() ) ) {
124 // qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); 129// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl;
125 QImage img; 130 QImage img;
126 img = pixBg->convertToImage(); 131 img = pixBg->convertToImage();
127 pixBg->convertFromImage( img.smoothScale( width, height)); 132 pixBg->convertFromImage( img.smoothScale( width, height));
128 } 133 }
129 setBackgroundPixmap( *pixBg); 134 setBackgroundPixmap( *pixBg);
@@ -131,3 +136,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
131 songInfo.setFocusPolicy( QWidget::NoFocus ); 136 songInfo.setFocusPolicy( QWidget::NoFocus );
132 137
133// changeTextColor( &songInfo ); 138// changeTextColor( &songInfo );
@@ -138,3 +143,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
138// songInfo.setForegroundColor(Qt::white); 143// songInfo.setForegroundColor(Qt::white);
139 144
140 slider.setFixedHeight( 20 ); 145 slider.setFixedHeight( 20 );
@@ -174,3 +179,3 @@ AudioWidget::~AudioWidget() {
174 // setPlaying( false); 179 // setPlaying( false);
175 180
176 for ( int i = 0; i < 10; i++ ) { 181 for ( int i = 0; i < 10; i++ ) {
@@ -255,3 +260,3 @@ void AudioWidget::sliderReleased() {
255void AudioWidget::setPosition( long i ) { 260void AudioWidget::setPosition( long i ) {
256// qDebug("set position %d",i); 261// odebug << "set position " << i << "" << oendl;
257 long length = mediaPlayerState->length(); 262 long length = mediaPlayerState->length();
@@ -302,3 +307,3 @@ this->setFocus();
302 time.setText( timeAsString( i ) + " / " + timeAsString( max ) ); 307 time.setText( timeAsString( i ) + " / " + timeAsString( max ) );
303 308
304 if ( max == 0 ) 309 if ( max == 0 )
@@ -368,4 +373,4 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
368 373
369// if ( isOnButton && i == AudioVolumeUp ) 374// if ( isOnButton && i == AudioVolumeUp )
370// qDebug("on up"); 375// odebug << "on up" << oendl;
371 376
@@ -375,8 +380,8 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
375 switch (i) { 380 switch (i) {
376 case AudioVolumeUp: 381 case AudioVolumeUp:
377 // qDebug("more clicked"); 382 // odebug << "more clicked" << oendl;
378 emit moreClicked(); 383 emit moreClicked();
379 return; 384 return;
380 case AudioVolumeDown: 385 case AudioVolumeDown:
381 // qDebug("less clicked"); 386 // odebug << "less clicked" << oendl;
382 emit lessClicked(); 387 emit lessClicked();
@@ -472,3 +477,3 @@ void AudioWidget::keyReleaseEvent( QKeyEvent *e)
472 hide(); 477 hide();
473// qDebug("Audio F9"); 478// odebug << "Audio F9" << oendl;
474 break; 479 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 @@
21 21
22#include "libmadplugin.h"
23
24/* OPIE */
25#include <qpe/config.h>
26#include <opie2/odebug.h>
27
28/* QT */
29#include <qapplication.h>
30#include <qmessagebox.h>
31#include <qregexp.h>
32
33/* STD */
22#include <stdio.h> 34#include <stdio.h>
@@ -36,8 +48,2 @@
36 48
37#include <qapplication.h>
38#include <qmessagebox.h>
39#include <qregexp.h>
40
41#include <qpe/config.h>
42
43// for network handling 49// for network handling
@@ -56,3 +62,2 @@
56#endif 62#endif
57#include "libmadplugin.h"
58 63
@@ -384,3 +389,3 @@ int LibMadPlugin::http_open(const QString& path ) {
384 if (len == -1) { 389 if (len == -1) {
385 // qDebug( "http_open: "+ QString(strerror(errno)) +"\n"); 390 // odebug << "http_open: "+ QString(strerror(errno)) +"\n" << oendl;
386 return 0; 391 return 0;
@@ -398,3 +403,3 @@ int LibMadPlugin::http_open(const QString& path ) {
398 if (strncmp(http_request + 4, "200 ", 4)) { 403 if (strncmp(http_request + 4, "200 ", 4)) {
399 // qDebug("http_open: " + QString(http_request) + "\n"); 404 // odebug << "http_open: " + QString(http_request) + "\n" << oendl;
400 return 0; 405 return 0;
@@ -419,3 +424,3 @@ int LibMadPlugin::http_open(const QString& path ) {
419 424
420 // qDebug("Stream info: " + info); 425 // odebug << "Stream info: " + info << oendl;
421 426
@@ -431,3 +436,3 @@ bool LibMadPlugin::open( const QString& path ) {
431 bufferSize = cfg.readNumEntry("MPeg_BufferSize",MPEG_BUFFER_SIZE); 436 bufferSize = cfg.readNumEntry("MPeg_BufferSize",MPEG_BUFFER_SIZE);
432 // qDebug("buffer size is %d", bufferSize); 437 // odebug << "buffer size is " << bufferSize << "" << oendl;
433 d->bad_last_frame = 0; 438 d->bad_last_frame = 0;
@@ -436,3 +441,3 @@ bool LibMadPlugin::open( const QString& path ) {
436 441
437 //qDebug( "Opening %s", path.latin1() ); 442 //odebug << "Opening " << path << "" << oendl;
438 443
@@ -452,3 +457,3 @@ bool LibMadPlugin::open( const QString& path ) {
452 if (d->input.fd == -1) { 457 if (d->input.fd == -1) {
453 // qDebug("error opening %s", d->input.path ); 458 // odebug << "error opening " << d->input.path << "" << oendl;
454 return FALSE; 459 return FALSE;
@@ -458,3 +463,3 @@ bool LibMadPlugin::open( const QString& path ) {
458 if (fstat(d->input.fd, &stat) == -1) { 463 if (fstat(d->input.fd, &stat) == -1) {
459 // qDebug("error calling fstat"); return FALSE; 464 // odebug << "error calling fstat" << oendl; return FALSE;
460 } 465 }
@@ -464,3 +469,3 @@ bool LibMadPlugin::open( const QString& path ) {
464 d->input.fileLength = 0; 469 d->input.fileLength = 0;
465 470
466#if defined(HAVE_MMAP) 471#if defined(HAVE_MMAP)
@@ -470,3 +475,3 @@ bool LibMadPlugin::open( const QString& path ) {
470 if (d->input.fdm == 0) { 475 if (d->input.fdm == 0) {
471 // qDebug("error mmapping file"); return FALSE; 476 // odebug << "error mmapping file" << oendl; return FALSE;
472 } 477 }
@@ -479,3 +484,3 @@ bool LibMadPlugin::open( const QString& path ) {
479 if (d->input.data == 0) { 484 if (d->input.data == 0) {
480 // qDebug("error allocating input buffer"); 485 // odebug << "error allocating input buffer" << oendl;
481 return FALSE; 486 return FALSE;
@@ -507,3 +512,3 @@ bool LibMadPlugin::close() {
507 if (unmap_file(d->input.fdm, d->input.length) == -1) { 512 if (unmap_file(d->input.fdm, d->input.length) == -1) {
508 // qDebug("error munmapping file"); 513 // odebug << "error munmapping file" << oendl;
509 result = FALSE; 514 result = FALSE;
@@ -521,3 +526,3 @@ bool LibMadPlugin::close() {
521 if (::close(d->input.fd) == -1) { 526 if (::close(d->input.fd) == -1) {
522 // qDebug("error closing file %s", d->input.path); 527 // odebug << "error closing file " << d->input.path << "" << oendl;
523 result = FALSE; 528 result = FALSE;
@@ -547,3 +552,3 @@ int LibMadPlugin::audioChannels( int ) {
547 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); 552 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 );
548 qDebug( "LibMadPlugin::audioChannels: %i", d->frame.header.mode > 0 ? 2 : 1 ); 553 odebug << "LibMadPlugin::audioChannels: " << d->frame.header.mode > 0 ? 2 : 1 << "" << oendl;
549 return d->frame.header.mode > 0 ? 2 : 1; 554 return d->frame.header.mode > 0 ? 2 : 1;
@@ -557,3 +562,3 @@ int LibMadPlugin::audioFrequency( int ) {
557 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); 562 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 );
558 // qDebug( "LibMadPlugin::audioFrequency: %i", d->frame.header.samplerate ); 563 // odebug << "LibMadPlugin::audioFrequency: " << d->frame.header.samplerate << "" << oendl;
559 return d->frame.header.samplerate; 564 return d->frame.header.samplerate;
@@ -568,4 +573,3 @@ int LibMadPlugin::audioSamples( int ) {
568/* 573/*
569 qDebug( "LibMadPlugin::audioSamples: %i*%i", d->frame.header.duration.seconds, 574 odebug << "LibMadPlugin::audioSamples: " << d->frame.header.duration.seconds << "*" << d->frame.header.samplerate << oendl;
570 d->frame.header.samplerate );
571 return d->frame.header.duration.seconds * d->frame.header.samplerate; 575 return d->frame.header.duration.seconds * d->frame.header.samplerate;
@@ -577,4 +581,4 @@ int LibMadPlugin::audioSamples( int ) {
577 // qDebug( "LibMadPlugin::audioSamples: %i * %i * 8 / %i", (int)d->input.fileLength, 581 // qDebug( "LibMadPlugin::audioSamples: %i * %i * 8 / %i", (int)d->input.fileLength,
578 // (int)d->frame.header.samplerate, (int)d->frame.header.bitrate ); 582 // (int)d->frame.header.samplerate, (int)d->frame.header.bitrate );
579 // qDebug( "LibMadPlugin::audioSamples: %i", samples ); 583 // odebug << "LibMadPlugin::audioSamples: " << samples << "" << oendl;
580 584
@@ -594,3 +598,3 @@ bool LibMadPlugin::audioSetSample( long, int ) {
594// // Seek to requested position 598// // Seek to requested position
595// qDebug( "seek pos: %i", (int)((double)pos * d->input.fileLength / totalSamples) ); 599// odebug << "seek pos: " << (int)((double)pos * d->input.fileLength / totalSamples) << "" << oendl;
596// ::lseek( d->input.fd, (long)((double)pos * d->input.fileLength / totalSamples), SEEK_SET ); 600// ::lseek( d->input.fd, (long)((double)pos * d->input.fileLength / totalSamples), SEEK_SET );
@@ -682,3 +686,3 @@ bool LibMadPlugin::read() {
682 if (len == -1) { 686 if (len == -1) {
683 // qDebug("error reading audio"); 687 // odebug << "error reading audio" << oendl;
684 return FALSE; 688 return FALSE;
@@ -760,3 +764,3 @@ bool LibMadPlugin::decode( short *output, long samples, long& samplesMade ) {
760 mad_frame_mute(&d->frame); 764 mad_frame_mute(&d->frame);
761 // qDebug( "error decoding, bad crc" ); 765 // odebug << "error decoding, bad crc" << oendl;
762 } 766 }
@@ -823,3 +827,3 @@ double LibMadPlugin::getTime() {
823void LibMadPlugin::printID3Tags() { 827void LibMadPlugin::printID3Tags() {
824 // qDebug( "LibMadPlugin::printID3Tags" ); 828 // odebug << "LibMadPlugin::printID3Tags" << oendl;
825 829
@@ -828,3 +832,3 @@ void LibMadPlugin::printID3Tags() {
828 if ( ::lseek( d->input.fd, -128, SEEK_END ) == -1 ) { 832 if ( ::lseek( d->input.fd, -128, SEEK_END ) == -1 ) {
829 // qDebug( "error seeking to id3 tags" ); 833 // odebug << "error seeking to id3 tags" << oendl;
830 return; 834 return;
@@ -833,3 +837,3 @@ void LibMadPlugin::printID3Tags() {
833 if ( ::read( d->input.fd, id3v1, 128 ) != 128 ) { 837 if ( ::read( d->input.fd, id3v1, 128 ) != 128 ) {
834 // qDebug( "error reading in id3 tags" ); 838 // odebug << "error reading in id3 tags" << oendl;
835 return; 839 return;
@@ -843,3 +847,3 @@ void LibMadPlugin::printID3Tags() {
843 char *ptr = id3v1 + 3, *ptr2 = ptr + len[0]; 847 char *ptr = id3v1 + 3, *ptr2 = ptr + len[0];
844 // qDebug( "ID3 tags in file:" ); 848 // odebug << "ID3 tags in file:" << oendl;
845 info = ""; 849 info = "";
@@ -855,3 +859,3 @@ void LibMadPlugin::printID3Tags() {
855 } 859 }
856// qDebug( info.latin1() ); 860// odebug << info.latin1() << oendl;
857 *ptr3 = push2; 861 *ptr3 = push2;
@@ -864,3 +868,3 @@ void LibMadPlugin::printID3Tags() {
864 if ( ::lseek(d->input.fd, 0, SEEK_SET) == -1 ) { 868 if ( ::lseek(d->input.fd, 0, SEEK_SET) == -1 ) {
865 // qDebug( "error seeking back to beginning" ); 869 // odebug << "error seeking back to beginning" << oendl;
866 return; 870 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 @@
21 21
22
23#include "mediaplayerstate.h"
24#include "loopcontrol.h"
25#include "videowidget.h"
26#include "audiodevice.h"
27
28/* OPIE */
22#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30#include <qpe/mediaplayerplugininterface.h>
31#include <opie2/odebug.h>
23 32
@@ -26,2 +35,6 @@
26#endif 35#endif
36
37/* QT */
38
39/* STD */
27#include <stdio.h> 40#include <stdio.h>
@@ -32,7 +45,2 @@
32#include <unistd.h> 45#include <unistd.h>
33#include "loopcontrol.h"
34#include "videowidget.h"
35#include "audiodevice.h"
36#include <qpe/mediaplayerplugininterface.h>
37#include "mediaplayerstate.h"
38 46
@@ -102,3 +110,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
102 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) ); 110 connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( setMute(bool) ) );
103 //qDebug("starting loopcontrol"); 111 //odebug << "starting loopcontrol" << oendl;
104 audioMutex = new Mutex; 112 audioMutex = new Mutex;
@@ -114,3 +122,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
114 } else { 122 } else {
115 // qDebug( "Error setting up a realtime thread, reverting to using a normal thread." ); 123 // odebug << "Error setting up a realtime thread, reverting to using a normal thread." << oendl;
116 pthread_attr_destroy(&audio_attr); 124 pthread_attr_destroy(&audio_attr);
@@ -119,3 +127,3 @@ LoopControl::LoopControl( QObject *parent, const char *name )
119#endif 127#endif
120 //qDebug("create audio thread"); 128 //odebug << "create audio thread" << oendl;
121 pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this); 129 pthread_create(&audio_tid, &audio_attr, (void * (*)(void *))startAudioThread, this);
@@ -146,3 +154,3 @@ void LoopControl::timerEvent( QTimerEvent *te ) {
146 154
147 if ( !moreVideo && !moreAudio ) { 155 if ( !moreVideo && !moreAudio ) {
148 mediaPlayerState->setPlaying( FALSE ); 156 mediaPlayerState->setPlaying( FALSE );
@@ -155,3 +163,3 @@ void LoopControl::setPosition( long pos ) {
155 audioMutex->lock(); 163 audioMutex->lock();
156// qDebug("Loop control %d", pos); 164// odebug << "Loop control " << pos << "" << oendl;
157 if ( hasVideoChannel && hasAudioChannel ) { 165 if ( hasVideoChannel && hasAudioChannel ) {
@@ -221,3 +229,3 @@ void LoopControl::startVideo() {
221void LoopControl::startAudio() { 229void LoopControl::startAudio() {
222 230
223 audioMutex->lock(); 231 audioMutex->lock();
@@ -230,3 +238,3 @@ void LoopControl::startAudio() {
230// if ( currentSample != audioSampleCounter + 1 ) 238// if ( currentSample != audioSampleCounter + 1 )
231// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); 239// odebug << "out of sync with decoder " << currentSample << " " << audioSampleCounter << "" << oendl;
232 240
@@ -243,3 +251,3 @@ void LoopControl::startAudio() {
243 else if ( sampleWaitTime <= -5000 ) { 251 else if ( sampleWaitTime <= -5000 ) {
244 // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 252 // odebug << "need to catch up by: " << -sampleWaitTime << " (" << currentSample << "," << sampleWeShouldBeAt << ")" << oendl;
245 // //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 253 // //mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
@@ -272,3 +280,3 @@ void LoopControl::killTimers() {
272 280
273 if ( hasVideoChannel ) 281 if ( hasVideoChannel )
274 killTimer( videoId ); 282 killTimer( videoId );
@@ -326,3 +334,3 @@ void LoopControl::stop( bool willPlayAgainShortly ) {
326 if ( !willPlayAgainShortly && disabledSuspendScreenSaver ) { 334 if ( !willPlayAgainShortly && disabledSuspendScreenSaver ) {
327 disabledSuspendScreenSaver = FALSE; 335 disabledSuspendScreenSaver = FALSE;
328 // Re-enable the suspend mode 336 // Re-enable the suspend mode
@@ -351,3 +359,3 @@ void LoopControl::stop( bool willPlayAgainShortly ) {
351 current_frame=0; 359 current_frame=0;
352 total_audio_samples=0; 360 total_audio_samples=0;
353} 361}
@@ -362,5 +370,5 @@ bool LoopControl::init( const QString& filename ) {
362 current_frame = total_video_frames = total_audio_samples = 0; 370 current_frame = total_video_frames = total_audio_samples = 0;
363 371
364 // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); 372 // odebug << "Using the " << mediaPlayerState->curDecoder()->pluginName() << " decoder" << oendl;
365 373
366 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin 374 // ### Hack to use libmpeg3plugin to get the number of audio samples if we are using the libmad plugin
@@ -372,3 +380,3 @@ bool LoopControl::init( const QString& filename ) {
372// } 380// }
373 381
374 if ( !mediaPlayerState->curDecoder()|| !mediaPlayerState->curDecoder()->open( filename ) ) { 382 if ( !mediaPlayerState->curDecoder()|| !mediaPlayerState->curDecoder()->open( filename ) ) {
@@ -389,4 +397,4 @@ bool LoopControl::init( const QString& filename ) {
389 397
390 // qDebug( "LC- channels = %d", channels ); 398 // odebug << "LC- channels = " << channels << "" << oendl;
391 399
392// if ( !total_audio_samples ) 400// if ( !total_audio_samples )
@@ -395,7 +403,7 @@ bool LoopControl::init( const QString& filename ) {
395 total_audio_samples += 1000; 403 total_audio_samples += 1000;
396 // qDebug("total samples %d", total_audio_samples); 404 // odebug << "total samples " << total_audio_samples << "" << oendl;
397 mediaPlayerState->setLength( total_audio_samples ); 405 mediaPlayerState->setLength( total_audio_samples );
398 406
399 freq = mediaPlayerState->curDecoder()->audioFrequency( astream ); 407 freq = mediaPlayerState->curDecoder()->audioFrequency( astream );
400 // qDebug( "LC- frequency = %d", freq ); 408 // odebug << "LC- frequency = " << freq << "" << oendl;
401 409
@@ -405,3 +413,3 @@ bool LoopControl::init( const QString& filename ) {
405 bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime(); 413 bits_per_sample =(int) mediaPlayerState->curDecoder()->getTime();
406 // qDebug("using stupid hack"); 414 // odebug << "using stupid hack" << oendl;
407 } else { 415 } else {
@@ -453,11 +461,11 @@ bool LoopControl::init( const QString& filename ) {
453void LoopControl::play() { 461void LoopControl::play() {
454 // qDebug("LC- play"); 462 // odebug << "LC- play" << oendl;
455 mediaPlayerState->setPosition( 0); //uglyhack 463 mediaPlayerState->setPosition( 0); //uglyhack
456 464
457#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 465#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
458 if ( !disabledSuspendScreenSaver || previousSuspendMode != hasVideoChannel ) { 466 if ( !disabledSuspendScreenSaver || previousSuspendMode != hasVideoChannel ) {
459 disabledSuspendScreenSaver = TRUE; 467 disabledSuspendScreenSaver = TRUE;
460 previousSuspendMode = hasVideoChannel; 468 previousSuspendMode = hasVideoChannel;
461 // Stop the screen from blanking and power saving state 469 // Stop the screen from blanking and power saving state
462 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) 470 QCopEnvelope("QPE/System", "setScreenSaverMode(int)" )
463 << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend ); 471 << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend );
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 @@
21 21
22#include "mediaplayerplugininterface.h"
23#include "loopcontrol.h"
24#include "audiodevice.h"
25#include "videowidget.h"
26#include "audiowidget.h"
27#include "mediaplayerstate.h"
28
29/* OPIE */
22#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
23#include <qpe/custom.h> 31#include <qpe/custom.h>
24#include <qimage.h> 32
25#include <qpainter.h>
26#if !defined(QT_NO_COP) 33#if !defined(QT_NO_COP)
@@ -28,3 +35,10 @@
28#endif 35#endif
29#include "mediaplayerplugininterface.h" 36
37#include <opie2/odebug.h>
38
39/* QT */
40#include <qimage.h>
41#include <qpainter.h>
42
43/* STD */
30#include <stdio.h> 44#include <stdio.h>
@@ -35,10 +49,2 @@
35#include <pthread.h> 49#include <pthread.h>
36#include "loopcontrol.h"
37#include "audiodevice.h"
38#include "videowidget.h"
39#include "audiowidget.h"
40#include "mediaplayerstate.h"
41
42
43
44 50
@@ -193,3 +199,3 @@ void LoopControl::setPosition( long pos ) {
193 audioMutex->lock(); 199 audioMutex->lock();
194 //qDebug("setting position"); 200 //odebug << "setting position" << oendl;
195 playtime.restart(); 201 playtime.restart();
@@ -294,3 +300,3 @@ void LoopControl::startVideo() {
294 300
295// qDebug("elapsed: %i %i (%f)", int( playtime.elapsed() ), current_frame, framerate ); 301// odebug << "elapsed: " << int( playtime.elapsed() ) << " " << current_frame << " (" << framerate << ")" << oendl;
296 302
@@ -309,3 +315,3 @@ void LoopControl::startVideo() {
309 if ( current_frame > prev_frame + 1 ) { 315 if ( current_frame > prev_frame + 1 ) {
310 // qDebug("skipped a frame"); 316 // odebug << "skipped a frame" << oendl;
311 mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream ); 317 mediaPlayerState->curDecoder()->videoSetFrame( current_frame, stream );
@@ -343,3 +349,3 @@ void LoopControl::startAudio() {
343// if ( currentSample != audioSampleCounter + 1 ) 349// if ( currentSample != audioSampleCounter + 1 )
344// qDebug("out of sync with decoder %i %i", currentSample, audioSampleCounter); 350// odebug << "out of sync with decoder " << currentSample << " " << audioSampleCounter << "" << oendl;
345 audioMutex->unlock(); 351 audioMutex->unlock();
@@ -367,3 +373,3 @@ void LoopControl::startAudio() {
367 if ( sampleWaitTime >= 0 && sampleWaitTime <= 2000 ) { 373 if ( sampleWaitTime >= 0 && sampleWaitTime <= 2000 ) {
368 //qDebug("sampleWaitTime: %i", sampleWaitTime); 374 //odebug << "sampleWaitTime: " << sampleWaitTime << "" << oendl;
369 usleep( ( sampleWaitTime * 1000000 ) / ( freq ) ); 375 usleep( ( sampleWaitTime * 1000000 ) / ( freq ) );
@@ -372,3 +378,3 @@ void LoopControl::startAudio() {
372 if ( sampleWaitTime <= -2000 ) { 378 if ( sampleWaitTime <= -2000 ) {
373 // qDebug("need to catch up by: %li (%i,%li)", -sampleWaitTime, currentSample, sampleWeShouldBeAt ); 379 // odebug << "need to catch up by: " << -sampleWaitTime << " (" << currentSample << "," << sampleWeShouldBeAt << ")" << oendl;
374 mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream ); 380 mediaPlayerState->curDecoder()->audioSetSample( sampleWeShouldBeAt, stream );
@@ -389,4 +395,4 @@ void LoopControl::startAudio() {
389 395
390 //qDebug("currentSample: %i audioSampleCounter: %i total_audio_samples: %i", currentSample, audioSampleCounter, total_audio_samples); 396 //odebug << "currentSample: " << currentSample << " audioSampleCounter: " << audioSampleCounter << " total_audio_samples: " << total_audio_samples << "" << oendl;
391// qDebug("current: %i counter: %i total: %i", currentSample, audioSampleCounter, (int)total_audio_samples); 397// odebug << "current: " << currentSample << " counter: " << audioSampleCounter << " total: " << (int)total_audio_samples << "" << oendl;
392 moreAudio = audioSampleCounter <= total_audio_samples; 398 moreAudio = audioSampleCounter <= total_audio_samples;
@@ -403,3 +409,3 @@ void LoopControl::startAudio() {
403 409
404 // qDebug( "End of file" ); 410 // odebug << "End of file" << oendl;
405 411
@@ -417,3 +423,3 @@ void LoopControl::killTimers() {
417 if ( pthread_join(video_tid,&thread_result) != 0 ) 423 if ( pthread_join(video_tid,&thread_result) != 0 )
418 // qDebug("thread join error 1"); 424 // odebug << "thread join error 1" << oendl;
419 pthread_attr_destroy(&video_attr); 425 pthread_attr_destroy(&video_attr);
@@ -427,3 +433,3 @@ void LoopControl::killTimers() {
427 if ( pthread_join(audio_tid,&thread_result) != 0 ) 433 if ( pthread_join(audio_tid,&thread_result) != 0 )
428 // qDebug("thread join error 2"); 434 // odebug << "thread join error 2" << oendl;
429 pthread_attr_destroy(&audio_attr); 435 pthread_attr_destroy(&audio_attr);
@@ -449,3 +455,3 @@ void LoopControl::startTimers() {
449 pthread_attr_setschedpolicy(&audio_attr,SCHED_RR); // Real-time round robin 455 pthread_attr_setschedpolicy(&audio_attr,SCHED_RR); // Real-time round robin
450 //qDebug("min: %i, max: %i", sched_get_priority_min( SCHED_RR ), sched_get_priority_max( SCHED_RR ) ); 456 //odebug << "min: " << sched_get_priority_min( SCHED_RR ) << ", max: " << sched_get_priority_max( SCHED_RR ) << "" << oendl;
451 sched_param params; 457 sched_param params;
@@ -514,3 +520,3 @@ bool LoopControl::init( const QString& filename ) {
514 520
515 // qDebug( "Using the %s decoder", mediaPlayerState->curDecoder()->pluginName() ); 521 // odebug << "Using the " << mediaPlayerState->curDecoder()->pluginName() << " decoder" << oendl;
516 522
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 @@
21 21
22#include <qmessagebox.h>
23
24#include "mediaplayer.h" 22#include "mediaplayer.h"
@@ -28,5 +26,9 @@
28#include "audiodevice.h" 26#include "audiodevice.h"
29
30#include "mediaplayerstate.h" 27#include "mediaplayerstate.h"
31 28
29/* OPIE */
30#include <opie2/odebug.h>
31
32/* QT */
33#include <qmessagebox.h>
32 34
@@ -75,3 +77,3 @@ void MediaPlayer::play() {
75void MediaPlayer::setPlaying( bool play ) { 77void MediaPlayer::setPlaying( bool play ) {
76 // qDebug("MediaPlayer setPlaying %d", play); 78 // odebug << "MediaPlayer setPlaying " << play << "" << oendl;
77 if ( !play ) { 79 if ( !play ) {
@@ -86,5 +88,5 @@ void MediaPlayer::setPlaying( bool play ) {
86 } 88 }
87 // qDebug("about to ctrash"); 89 // odebug << "about to ctrash" << oendl;
88 const DocLnk *playListCurrent = playList->current(); 90 const DocLnk *playListCurrent = playList->current();
89 91
90 if ( playListCurrent != NULL ) { 92 if ( playListCurrent != NULL ) {
@@ -173,3 +175,3 @@ void MediaPlayer::startIncreasingVolume() {
173 AudioDevice::increaseVolume(); 175 AudioDevice::increaseVolume();
174 176
175} 177}
@@ -193,3 +195,3 @@ void MediaPlayer::stopChangingVolume() {
193void MediaPlayer::timerEvent( QTimerEvent * ) { 195void MediaPlayer::timerEvent( QTimerEvent * ) {
194// qDebug("timer"); 196// odebug << "timer" << oendl;
195 if ( volumeDirection == +1 ) 197 if ( volumeDirection == +1 )
@@ -205,3 +207,3 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
205 if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) { 207 if ( drawnOnScreenDisplay && onScreenDisplayVolume == v ) {
206// qDebug("returning %d, %d, %d, %d", v, l, r, m); 208// odebug << "returning " << v << ", " << l << ", " << r << ", " << m << "" << oendl;
207 return; 209 return;
@@ -232,5 +234,5 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
232 for ( unsigned int i = 0; i < 10; i++ ) { 234 for ( unsigned int i = 0; i < 10; i++ ) {
233 if ( v > i ) 235 if ( v > i )
234 p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); 236 p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 );
235 else 237 else
236 p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); 238 p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 );
@@ -251,3 +253,3 @@ void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
251 case Key_F12: //home 253 case Key_F12: //home
252 // qDebug("Blank here"); 254 // odebug << "Blank here" << oendl;
253 break; 255 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 @@
19 **********************************************************************/ 19 **********************************************************************/
20#include <qpe/qpeapplication.h>
21#include <qpe/qlibrary.h>
22#include <qpe/config.h>
23#include <qdir.h>
24#include <qpe/mediaplayerplugininterface.h>
25#include "mediaplayerstate.h"
26
27
28 20
@@ -35,2 +27,14 @@
35 27
28#include "mediaplayerstate.h"
29
30/* OPIE */
31#include <qpe/qpeapplication.h>
32#include <qpe/qlibrary.h>
33#include <qpe/config.h>
34#include <qpe/mediaplayerplugininterface.h>
35#include <opie2/odebug.h>
36
37/* QT */
38#include <qdir.h>
39
36 40
@@ -106,4 +110,4 @@ MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) {
106 else 110 else
107 isStreaming = FALSE; 111 isStreaming = FALSE;
108 return decoder = tmpDecoder; 112 return decoder = tmpDecoder;
109} 113}
@@ -127,3 +131,3 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
127void MediaPlayerState::loadPlugins() { 131void MediaPlayerState::loadPlugins() {
128 // qDebug("load plugins"); 132 // odebug << "load plugins" << oendl;
129#ifndef QT_NO_COMPONENT 133#ifndef QT_NO_COMPONENT
@@ -144,3 +148,3 @@ void MediaPlayerState::loadPlugins() {
144 QLibrary *lib = new QLibrary( path + "/" + *it ); 148 QLibrary *lib = new QLibrary( path + "/" + *it );
145// qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 149// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
146 150
@@ -148,3 +152,3 @@ void MediaPlayerState::loadPlugins() {
148 152
149// qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); 153// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl;
150 154
@@ -167,3 +171,3 @@ void MediaPlayerState::loadPlugins() {
167 pluginList.clear(); 171 pluginList.clear();
168 172
169 MediaPlayerPlugin plugin0; 173 MediaPlayerPlugin plugin0;
@@ -187,3 +191,3 @@ void MediaPlayerState::loadPlugins() {
187 191
188 if ( pluginList.count() ) 192 if ( pluginList.count() )
189 MediaPlayerDebug(( "%i decoders found", pluginList.count() )); 193 MediaPlayerDebug(( "%i decoders found", pluginList.count() ));
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 @@
21 21
22/* OPIE */
23#include <opie2/odebug.h>
24
25/* STD */
22#include <unistd.h> 26#include <unistd.h>
@@ -49,4 +53,4 @@ void MemFile::unmap()
49 { 53 {
50 munmap( m_data.data(), m_data.size() ); 54 munmap( m_data.data(), m_data.size() );
51 m_data.resetRawData( m_data.data(), m_data.size() ); 55 m_data.resetRawData( m_data.data(), m_data.size() );
52 } 56 }
@@ -60,14 +64,14 @@ QByteArray &MemFile::data()
60#if defined(Q_WS_X11) || defined(Q_WS_QWS) 64#if defined(Q_WS_X11) || defined(Q_WS_QWS)
61 const char *rawData = (const char *)mmap( 0, size(), PROT_READ, 65 const char *rawData = (const char *)mmap( 0, size(), PROT_READ,
62 MAP_SHARED, handle(), 0 ); 66 MAP_SHARED, handle(), 0 );
63 if ( rawData ) 67 if ( rawData )
64 { 68 {
65 m_data.setRawData( rawData, size() ); 69 m_data.setRawData( rawData, size() );
66 return m_data; 70 return m_data;
67 } 71 }
68 else 72 else
69 qDebug( "MemFile: mmap() failed!" ); 73 odebug << "MemFile: mmap() failed!" << oendl;
70 // fallback 74 // fallback
71#endif 75#endif
72 m_data = readAll(); 76 m_data = readAll();
73 } 77 }
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 @@
33 33
34/* OPIE */
35#include <opie2/odebug.h>
34 36
@@ -46,3 +48,3 @@ Om3u::Om3u( const QString &filePath, int mode)
46 : QStringList (){ 48 : QStringList (){
47//qDebug("<<<<<<<new m3u "+filePath); 49//odebug << "<<<<<<<new m3u "+filePath << oendl;
48 f.setName(filePath); 50 f.setName(filePath);
@@ -54,5 +56,5 @@ Om3u::~Om3u(){}
54void Om3u::readM3u() { 56void Om3u::readM3u() {
55// qDebug("<<<<<<reading m3u "+f.name()); 57// odebug << "<<<<<<reading m3u "+f.name() << oendl;
56 QTextStream t(&f); 58 QTextStream t(&f);
57 t.setEncoding(QTextStream::UnicodeUTF8); 59 t.setEncoding(QTextStream::UnicodeUTF8);
58 QString s; 60 QString s;
@@ -60,3 +62,3 @@ void Om3u::readM3u() {
60 s=t.readLine(); 62 s=t.readLine();
61 // qDebug(s); 63 // odebug << s << oendl;
62 if( s.find( "#", 0, TRUE) == -1 ) { 64 if( s.find( "#", 0, TRUE) == -1 ) {
@@ -69,3 +71,3 @@ void Om3u::readM3u() {
69 append(s); 71 append(s);
70 // qDebug(s); 72 // odebug << s << oendl;
71 } else { // is url 73 } else { // is url
@@ -79,3 +81,3 @@ void Om3u::readM3u() {
79 append(name); 81 append(name);
80 // qDebug(name); 82 // odebug << name << oendl;
81 } 83 }
@@ -87,3 +89,3 @@ void Om3u::readPls() { //it's a pls file
87 QTextStream t( &f ); 89 QTextStream t( &f );
88 t.setEncoding(QTextStream::UnicodeUTF8); 90 t.setEncoding(QTextStream::UnicodeUTF8);
89 QString s; 91 QString s;
@@ -94,3 +96,3 @@ void Om3u::readPls() { //it's a pls file
94 s.replace( QRegExp( "%20" )," "); 96 s.replace( QRegExp( "%20" )," ");
95// qDebug( "adding " + s + " to playlist" ); 97// odebug << "adding " + s + " to playlist" << oendl;
96 // numberofentries=2 98 // numberofentries=2
@@ -124,3 +126,3 @@ void Om3u::write() { //writes list to m3u file
124 QString list; 126 QString list;
125 QTextStream t(&f); 127 QTextStream t(&f);
126 t.setEncoding(QTextStream::UnicodeUTF8); 128 t.setEncoding(QTextStream::UnicodeUTF8);
@@ -128,4 +130,4 @@ void Om3u::write() { //writes list to m3u file
128 for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) { 130 for ( QStringList::ConstIterator it = begin(); it != end(); ++it ) {
129 // qDebug(*it); 131 // odebug << *it << oendl;
130 t << *it << "\n"; 132 t << *it << "\n";
131 } 133 }
@@ -144,4 +146,4 @@ void Om3u::remove(const QString &filePath) { //removes from m3u list
144 currentFile=*it; 146 currentFile=*it;
145 // qDebug(*it); 147 // odebug << *it << oendl;
146 148
147 if( filePath != currentFile) 149 if( filePath != currentFile)
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 @@
20 20
21#include <qheader.h>
22
23#include "playlistselection.h" 21#include "playlistselection.h"
24 22
23/* OPIE */
24#include <opie2/odebug.h>
25
26/* QT */
27#include <qheader.h>
28
29/* STD */
25#include <stdlib.h> 30#include <stdlib.h>
@@ -46,3 +51,3 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
46{ 51{
47// qDebug("starting playlistselector"); 52// odebug << "starting playlistselector" << oendl;
48// #ifdef USE_PLAYLIST_BACKGROUND 53// #ifdef USE_PLAYLIST_BACKGROUND
@@ -68,3 +73,3 @@ PlayListSelection::~PlayListSelection() {
68void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { 73void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
69// qDebug("drawBackground"); 74// odebug << "drawBackground" << oendl;
70 p->fillRect( r, QBrush( white ) ); 75 p->fillRect( r, QBrush( white ) );
@@ -188,3 +193,3 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
188 cfg.writeEntry("current", item->text(0) ); 193 cfg.writeEntry("current", item->text(0) );
189 // qDebug(item->text(0)); 194 // odebug << item->text(0) << oendl;
190 195
@@ -197,5 +202,5 @@ void PlayListSelection::setSelectedItem(const QString &strk ) {
197 for ( ; it.current(); ++it ) { 202 for ( ; it.current(); ++it ) {
198// qDebug( it.current()->text(0)); 203// odebug << it.current()->text(0) << oendl;
199 if( strk == it.current()->text(0)) { 204 if( strk == it.current()->text(0)) {
200// qDebug( "We have a match "+strk); 205// odebug << "We have a match "+strk << oendl;
201 setSelected( it.current(), TRUE); 206 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 @@
22 22
23#include <qtoolbar.h> 23#include "playlistselection.h"
24#include "playlistwidget.h"
25#include "mediaplayerstate.h"
26#include "inputDialog.h"
27#include "audiowidget.h"
28#include "videowidget.h"
29
30/* OPIE */
24#include <qpe/qpemenubar.h> 31#include <qpe/qpemenubar.h>
25#include <qpe/lnkproperties.h> 32#include <qpe/lnkproperties.h>
33#include <opie2/odebug.h>
26 34
35/* QT */
36#include <qtoolbar.h>
27#include <qaction.h> 37#include <qaction.h>
@@ -29,14 +39,6 @@
29#include <qmessagebox.h> 39#include <qmessagebox.h>
30
31//#include <qtimer.h> 40//#include <qtimer.h>
32 41
33#include "playlistselection.h" 42/* STD */
34#include "playlistwidget.h"
35#include "mediaplayerstate.h"
36
37#include "inputDialog.h"
38
39#include <stdlib.h> 43#include <stdlib.h>
40#include "audiowidget.h"
41#include "videowidget.h"
42 44
@@ -147,3 +149,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
147 tbDeletePlaylist->setFixedSize(20,20); 149 tbDeletePlaylist->setFixedSize(20,20);
148 150
149 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", 151 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist",
@@ -194,6 +196,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
194 QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); 196 QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton );
195 197
196 tabWidget = new QTabWidget( hbox6, "tabWidget" ); 198 tabWidget = new QTabWidget( hbox6, "tabWidget" );
197// tabWidget->setTabShape(QTabWidget::Triangular); 199// tabWidget->setTabShape(QTabWidget::Triangular);
198 200
199 QWidget *pTab; 201 QWidget *pTab;
@@ -206,3 +208,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
206 // Add the playlist area 208 // Add the playlist area
207 209
208 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); 210 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton );
@@ -223,3 +225,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
223 225
224 226
225 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch 227 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch
@@ -243,3 +245,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
243 audioView->addColumn( tr( "Path" ), -1 ); 245 audioView->addColumn( tr( "Path" ), -1 );
244 246
245 audioView->setColumnAlignment(1, Qt::AlignRight); 247 audioView->setColumnAlignment(1, Qt::AlignRight);
@@ -251,3 +253,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
251 audioView->setSorting( 3, TRUE ); 253 audioView->setSorting( 3, TRUE );
252 254
253 tabWidget->insertTab(aTab,tr("Audio")); 255 tabWidget->insertTab(aTab,tr("Audio"));
@@ -259,3 +261,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
259// videowidget 261// videowidget
260 262
261 QWidget *vTab; 263 QWidget *vTab;
@@ -268,3 +270,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
268 layoutV->addMultiCellWidget( videoView, 0, 0, 0, 1 ); 270 layoutV->addMultiCellWidget( videoView, 0, 0, 0, 1 );
269 271
270 videoView->addColumn(tr("Title"),-1); 272 videoView->addColumn(tr("Title"),-1);
@@ -305,3 +307,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
305 this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int)) ); 307 this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int)) );
306 308
307 connect( audioView, SIGNAL( returnPressed(QListViewItem*)), 309 connect( audioView, SIGNAL( returnPressed(QListViewItem*)),
@@ -339,3 +341,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
339 setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(currentPlayList))); 341 setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(currentPlayList)));
340 342
341 initializeStates(); 343 initializeStates();
@@ -391,3 +393,3 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
391 entryName.sprintf( "File%i", noOfFiles + 1 ); 393 entryName.sprintf( "File%i", noOfFiles + 1 );
392// qDebug(entryName); 394// odebug << entryName << oendl;
393 cfg.writeEntry( entryName, lnk->linkFile() ); 395 cfg.writeEntry( entryName, lnk->linkFile() );
@@ -408,3 +410,3 @@ void PlayListWidget::writeConfig( Config& cfg ) const {
408 410
409 } 411 }
410 noOfFiles++; 412 noOfFiles++;
@@ -448,3 +450,3 @@ void PlayListWidget::addAllToList() {
448 tabWidget->setCurrentPage(0); 450 tabWidget->setCurrentPage(0);
449 451
450 writeCurrentM3u(); 452 writeCurrentM3u();
@@ -456,3 +458,3 @@ void PlayListWidget::addAllMusicToList() {
456 QListIterator<DocLnk> dit( files.children() ); 458 QListIterator<DocLnk> dit( files.children() );
457 for ( ; dit.current(); ++dit ) 459 for ( ; dit.current(); ++dit )
458 if(QFileInfo(dit.current()->file()).exists()) 460 if(QFileInfo(dit.current()->file()).exists())
@@ -460,3 +462,3 @@ void PlayListWidget::addAllMusicToList() {
460 tabWidget->setCurrentPage(0); 462 tabWidget->setCurrentPage(0);
461 463
462 writeCurrentM3u(); 464 writeCurrentM3u();
@@ -472,3 +474,3 @@ void PlayListWidget::addAllVideoToList() {
472 tabWidget->setCurrentPage(0); 474 tabWidget->setCurrentPage(0);
473 475
474 writeCurrentM3u(); 476 writeCurrentM3u();
@@ -485,3 +487,3 @@ void PlayListWidget::setDocument(const QString& fileref) {
485void PlayListWidget::setDocumentEx(const QString& fileref) { 487void PlayListWidget::setDocumentEx(const QString& fileref) {
486 qDebug("opieplayer receive "+fileref); 488 odebug << "opieplayer receive "+fileref << oendl;
487 clearList(); 489 clearList();
@@ -494,3 +496,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
494 } 496 }
495 // qDebug("<<<<<<<<<<<<<<<<<<<<<<setDocument "+fileref); 497 // odebug << "<<<<<<<<<<<<<<<<<<<<<<setDocument "+fileref << oendl;
496 QString extension = fileInfo.extension(false); 498 QString extension = fileInfo.extension(false);
@@ -536,3 +538,3 @@ void PlayListWidget::setDocumentEx(const QString& fileref) {
536void PlayListWidget::setActiveWindow() { 538void PlayListWidget::setActiveWindow() {
537 // qDebug("SETTING active window"); 539 // odebug << "SETTING active window" << oendl;
538 // When we get raised we need to ensure that it switches views 540 // When we get raised we need to ensure that it switches views
@@ -553,3 +555,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
553 { 555 {
554 // qDebug("playlist"); 556 // odebug << "playlist" << oendl;
555 if ( mediaPlayerState->playlist() ) { 557 if ( mediaPlayerState->playlist() ) {
@@ -566,3 +568,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
566 { 568 {
567 // qDebug("audioView"); 569 // odebug << "audioView" << oendl;
568 QListIterator<DocLnk> dit( files.children() ); 570 QListIterator<DocLnk> dit( files.children() );
@@ -574,3 +576,3 @@ const DocLnk *PlayListWidget::current() { // this is fugly
574 } 576 }
575 } 577 }
576 break; 578 break;
@@ -662,3 +664,3 @@ void PlayListWidget::loadList( const DocLnk & lnk) {
662 QString name = lnk.name(); 664 QString name = lnk.name();
663 // qDebug("<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name); 665 // odebug << "<<<<<<<<<<<<<<<<<<<<<<<<currentList is "+name << oendl;
664 666
@@ -666,3 +668,3 @@ void PlayListWidget::loadList( const DocLnk & lnk) {
666 setCaption("OpiePlayer: "+name); 668 setCaption("OpiePlayer: "+name);
667 // qDebug("<<<<<<<<<<<<load list "+ lnk.file()); 669 // odebug << "<<<<<<<<<<<<load list "+ lnk.file() << oendl;
668 clearList(); 670 clearList();
@@ -674,3 +676,3 @@ void PlayListWidget::loadList( const DocLnk & lnk) {
674void PlayListWidget::setPlaylist( bool shown ) { 676void PlayListWidget::setPlaylist( bool shown ) {
675 if ( shown ) 677 if ( shown )
676 d->playListFrame->show(); 678 d->playListFrame->show();
@@ -709,3 +711,3 @@ void PlayListWidget::addSelected() {
709 break; 711 break;
710 712
711 case 2: { // video 713 case 2: { // video
@@ -726,3 +728,3 @@ void PlayListWidget::addSelected() {
726 // tabWidget->setCurrentPage(0); 728 // tabWidget->setCurrentPage(0);
727 writeCurrentM3u(); 729 writeCurrentM3u();
728 730
@@ -759,7 +761,7 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
759 d->selectedFiles->addToSelection( lnk); 761 d->selectedFiles->addToSelection( lnk);
760 762
761 if(tabWidget->currentPageIndex() == 0) 763 if(tabWidget->currentPageIndex() == 0)
762 writeCurrentM3u(); 764 writeCurrentM3u();
763 // tabWidget->setCurrentPage(0); 765 // tabWidget->setCurrentPage(0);
764 766
765 } 767 }
@@ -820,3 +822,3 @@ void PlayListWidget::btnPlay(bool b) {
820 insanityBool=FALSE; 822 insanityBool=FALSE;
821 qDebug("insanity"); 823 odebug << "insanity" << oendl;
822 // } 824 // }
@@ -832,3 +834,3 @@ void PlayListWidget::btnPlay(bool b) {
832 tabWidget->setCurrentPage(1); 834 tabWidget->setCurrentPage(1);
833 insanityBool=FALSE; 835 insanityBool=FALSE;
834 }// audioView->clearSelection(); 836 }// audioView->clearSelection();
@@ -837,3 +839,3 @@ void PlayListWidget::btnPlay(bool b) {
837 { 839 {
838 840
839 addToSelection( videoView->currentItem() ); 841 addToSelection( videoView->currentItem() );
@@ -848,3 +850,3 @@ void PlayListWidget::btnPlay(bool b) {
848 }; 850 };
849 851
850} 852}
@@ -876,5 +878,5 @@ void PlayListWidget::viewPressed( int mouse, QListViewItem *, const QPoint&, int
876 m.insertSeparator(); 878 m.insertSeparator();
877 if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() ) 879 if( QFile(QPEApplication::qpeDir()+"lib/libopie.so").exists() )
878 m.insertItem( tr( "Properties" ), this, SLOT( listDelete() )); 880 m.insertItem( tr( "Properties" ), this, SLOT( listDelete() ));
879 881
880 m.exec( QCursor::pos() ); 882 m.exec( QCursor::pos() );
@@ -895,3 +897,3 @@ void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoi
895 case 1: 897 case 1:
896 898
897 break; 899 break;
@@ -917,3 +919,3 @@ void PlayListWidget::listDelete() {
917 switch ( tabWidget->currentPageIndex()) { 919 switch ( tabWidget->currentPageIndex()) {
918 case 0: 920 case 0:
919 break; 921 break;
@@ -953,3 +955,3 @@ void PlayListWidget::listDelete() {
953void PlayListWidget::scanForAudio() { 955void PlayListWidget::scanForAudio() {
954 // qDebug("scan for audio"); 956 // odebug << "scan for audio" << oendl;
955 files.detachChildren(); 957 files.detachChildren();
@@ -963,3 +965,3 @@ void PlayListWidget::scanForAudio() {
963void PlayListWidget::scanForVideo() { 965void PlayListWidget::scanForVideo() {
964 // qDebug("scan for video"); 966 // odebug << "scan for video" << oendl;
965 vFiles.detachChildren(); 967 vFiles.detachChildren();
@@ -996,5 +998,5 @@ void PlayListWidget::populateAudioView() {
996 size=0; 998 size=0;
997 else 999 else
998 size = QFile( dit.current()->file() ).size(); 1000 size = QFile( dit.current()->file() ).size();
999 // qDebug(dit.current()->name()); 1001 // odebug << dit.current()->name() << oendl;
1000 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), 1002 newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(),
@@ -1042,3 +1044,3 @@ void PlayListWidget::openFile() {
1042 filename = fileDlg->text(); 1044 filename = fileDlg->text();
1043 // qDebug( "Selected filename is " + filename ); 1045 // odebug << "Selected filename is " + filename << oendl;
1044 DocLnk lnk; 1046 DocLnk lnk;
@@ -1077,3 +1079,3 @@ void PlayListWidget::openFile() {
1077 } 1079 }
1078 1080
1079 if( fileDlg ) { 1081 if( fileDlg ) {
@@ -1086,4 +1088,4 @@ void PlayListWidget::openFile() {
1086reads m3u and shows files/urls to playlist widget */ 1088reads m3u and shows files/urls to playlist widget */
1087void PlayListWidget::readm3u( const QString &filename ) { 1089void PlayListWidget::readm3u( const QString &filename ) {
1088 // qDebug( "read m3u filename " + filename ); 1090 // odebug << "read m3u filename " + filename << oendl;
1089 1091
@@ -1096,3 +1098,3 @@ void PlayListWidget::readm3u( const QString &filename ) {
1096 s = *it; 1098 s = *it;
1097 // qDebug("reading "+ s); 1099 // odebug << "reading "+ s << oendl;
1098 if(s.left(4)=="http") { 1100 if(s.left(4)=="http") {
@@ -1107,3 +1109,3 @@ void PlayListWidget::readm3u( const QString &filename ) {
1107 lnk.setFile( s ); //sets file name 1109 lnk.setFile( s ); //sets file name
1108 1110
1109 } else { 1111 } else {
@@ -1112,4 +1114,4 @@ void PlayListWidget::readm3u( const QString &filename ) {
1112 // if(s.right(4) == '.') {//if regular file 1114 // if(s.right(4) == '.') {//if regular file
1113 if(s.left(1) != "/") { 1115 if(s.left(1) != "/") {
1114 // qDebug("set link "+QFileInfo(filename).dirPath()+"/"+s); 1116 // odebug << "set link "+QFileInfo(filename).dirPath()+"/"+s << oendl;
1115 lnk.setFile( QFileInfo(filename).dirPath()+"/"+s); 1117 lnk.setFile( QFileInfo(filename).dirPath()+"/"+s);
@@ -1117,3 +1119,3 @@ void PlayListWidget::readm3u( const QString &filename ) {
1117 } else { 1119 } else {
1118 // qDebug("set link2 "+s); 1120 // odebug << "set link2 "+s << oendl;
1119 lnk.setFile( s); 1121 lnk.setFile( s);
@@ -1137,3 +1139,3 @@ void PlayListWidget::readm3u( const QString &filename ) {
1137 setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(filename))); 1139 setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(filename)));
1138 1140
1139} 1141}
@@ -1144,3 +1146,3 @@ void PlayListWidget::readPls( const QString &filename ) {
1144 1146
1145 // qDebug( "pls filename is " + filename ); 1147 // odebug << "pls filename is " + filename << oendl;
1146 Om3u *m3uList; 1148 Om3u *m3uList;
@@ -1187,3 +1189,3 @@ void PlayListWidget::readPls( const QString &filename ) {
1187void PlayListWidget::writeCurrentM3u() { 1189void PlayListWidget::writeCurrentM3u() {
1188 // qDebug("writing to current m3u"); 1190 // odebug << "writing to current m3u" << oendl;
1189 Config cfg( "OpiePlayer" ); 1191 Config cfg( "OpiePlayer" );
@@ -1196,3 +1198,3 @@ void PlayListWidget::writeCurrentM3u() {
1196 do { 1198 do {
1197 // qDebug( "writeCurrentM3u " +d->selectedFiles->current()->file()); 1199 // odebug << "writeCurrentM3u " +d->selectedFiles->current()->file() << oendl;
1198 m3uList->add( d->selectedFiles->current()->file() ); 1200 m3uList->add( d->selectedFiles->current()->file() );
@@ -1200,3 +1202,3 @@ void PlayListWidget::writeCurrentM3u() {
1200 while ( d->selectedFiles->next() ); 1202 while ( d->selectedFiles->next() );
1201 // qDebug( "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" ); 1203 // odebug << "<<<<<<<<<<<<>>>>>>>>>>>>>>>>>" << oendl;
1202 m3uList->write(); 1204 m3uList->write();
@@ -1219,3 +1221,3 @@ void PlayListWidget::writem3u() {
1219 name = fileDlg->text(); 1221 name = fileDlg->text();
1220 // qDebug( filename ); 1222 // odebug << filename << oendl;
1221 if( name.find("/",0,true) != -1) {// assume they specify a file path 1223 if( name.find("/",0,true) != -1) {// assume they specify a file path
@@ -1229,3 +1231,3 @@ void PlayListWidget::writem3u() {
1229 filename += ".m3u"; 1231 filename += ".m3u";
1230 1232
1231 if( d->selectedFiles->first()) { 1233 if( d->selectedFiles->first()) {
@@ -1237,3 +1239,3 @@ void PlayListWidget::writem3u() {
1237 while ( d->selectedFiles->next() ); 1239 while ( d->selectedFiles->next() );
1238 // qDebug( list ); 1240 // odebug << list << oendl;
1239 m3uList->write(); 1241 m3uList->write();
@@ -1241,3 +1243,3 @@ void PlayListWidget::writem3u() {
1241 if(m3uList) delete m3uList; 1243 if(m3uList) delete m3uList;
1242 1244
1243 if(fileDlg) delete fileDlg; 1245 if(fileDlg) delete fileDlg;
@@ -1249,6 +1251,6 @@ void PlayListWidget::writem3u() {
1249 1251
1250 // qDebug(filename); 1252 // odebug << filename << oendl;
1251 Config config( "OpiePlayer" ); 1253 Config config( "OpiePlayer" );
1252 config.setGroup( "PlayList" ); 1254 config.setGroup( "PlayList" );
1253 1255
1254 config.writeEntry("CurrentPlaylist",filename); 1256 config.writeEntry("CurrentPlaylist",filename);
@@ -1257,3 +1259,3 @@ void PlayListWidget::writem3u() {
1257 if(!lnk.writeLink()) { 1259 if(!lnk.writeLink()) {
1258 // qDebug("Writing doclink did not work"); 1260 // odebug << "Writing doclink did not work" << oendl;
1259 } 1261 }
@@ -1293,3 +1295,3 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1293// case Key_P: //play 1295// case Key_P: //play
1294// qDebug("Play"); 1296// odebug << "Play" << oendl;
1295// playSelected(); 1297// playSelected();
@@ -1309,3 +1311,3 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1309 case Key_4: 1311 case Key_4:
1310 tabWidget->setCurrentPage(3); 1312 tabWidget->setCurrentPage(3);
1311 break; 1313 break;
@@ -1321,3 +1323,3 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1321 break; 1323 break;
1322 1324
1323 } 1325 }
@@ -1327,3 +1329,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
1327{ 1329{
1328// qDebug("Key press"); 1330// odebug << "Key press" << oendl;
1329// switch ( e->key() ) { 1331// switch ( e->key() ) {
@@ -1331,3 +1333,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
1331// case Key_A: //add to playlist 1333// case Key_A: //add to playlist
1332// qDebug("Add"); 1334// odebug << "Add" << oendl;
1333// addSelected(); 1335// addSelected();
@@ -1338,3 +1340,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
1338// case Key_P: //play 1340// case Key_P: //play
1339// qDebug("Play"); 1341// odebug << "Play" << oendl;
1340// playSelected(); 1342// playSelected();
@@ -1342,3 +1344,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
1342// case Key_Space: 1344// case Key_Space:
1343// qDebug("Play"); 1345// odebug << "Play" << oendl;
1344// playSelected(); 1346// playSelected();
@@ -1349,3 +1351,3 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
1349void PlayListWidget::doBlank() { 1351void PlayListWidget::doBlank() {
1350 // qDebug("do blanking"); 1352 // odebug << "do blanking" << oendl;
1351#ifdef QT_QWS_DEVFS 1353#ifdef QT_QWS_DEVFS
@@ -1365,3 +1367,3 @@ void PlayListWidget::doUnblank() {
1365 // fd=open("/dev/fb0",O_RDWR); 1367 // fd=open("/dev/fb0",O_RDWR);
1366 // qDebug("do unblanking"); 1368 // odebug << "do unblanking" << oendl;
1367 if (fd != -1) { 1369 if (fd != -1) {
@@ -1390,3 +1392,3 @@ void PlayListWidget::populateSkinsMenu() {
1390 skinName = fi->fileName(); 1392 skinName = fi->fileName();
1391 // qDebug( fi->fileName() ); 1393 // odebug << fi->fileName() << oendl;
1392 if( skinName != "." && skinName != ".." && skinName !="CVS" ) { 1394 if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
@@ -1416,3 +1418,3 @@ void PlayListWidget::skinsMenuActivated( int item ) {
1416void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { 1418void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
1417 // qDebug("qcop message "+msg ); 1419 // odebug << "qcop message "+msg << oendl;
1418 QDataStream stream ( data, IO_ReadOnly ); 1420 QDataStream stream ( data, IO_ReadOnly );
@@ -1425,5 +1427,5 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) {
1425 } else if ( msg == "next()" ) { //select next in lis 1427 } else if ( msg == "next()" ) { //select next in lis
1426 mediaPlayerState->setNext(); 1428 mediaPlayerState->setNext();
1427 } else if ( msg == "prev()" ) { //select previous in list 1429 } else if ( msg == "prev()" ) { //select previous in list
1428 mediaPlayerState->setPrev(); 1430 mediaPlayerState->setPrev();
1429 } else if ( msg == "toggleLooping()" ) { //loop or not loop 1431 } else if ( msg == "toggleLooping()" ) { //loop or not loop
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 @@
19 **********************************************************************/ 19 **********************************************************************/
20
21#include "videowidget.h"
22#include "mediaplayerstate.h"
23
24/* OPIE */
20#include <qpe/resource.h> 25#include <qpe/resource.h>
@@ -23,7 +28,7 @@
23#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#include <opie2/odebug.h>
24 30
31/* QT */
25#include <qdir.h> 32#include <qdir.h>
26#include <qslider.h> 33#include <qslider.h>
27#include "videowidget.h"
28#include "mediaplayerstate.h"
29 34
@@ -84,3 +89,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
84 89
85 // qDebug("skin path " + skinPath); 90 // odebug << "skin path " + skinPath << oendl;
86 91
@@ -98,3 +103,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
98 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 103 "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
99 // qDebug("loading "+filename); 104 // odebug << "loading "+filename << oendl;
100 masks[i] = new QBitmap( filename ); 105 masks[i] = new QBitmap( filename );
@@ -113,3 +118,3 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
113 } 118 }
114 // qDebug("finished loading first pics"); 119 // odebug << "finished loading first pics" << oendl;
115 for ( int i = 0; i < 7; i++ ) { 120 for ( int i = 0; i < 7; i++ ) {
@@ -120,12 +125,12 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
120 125
121 QWidget *d = QApplication::desktop(); 126 QWidget *d = QApplication::desktop();
122 int width = d->width(); 127 int width = d->width();
123 int height = d->height(); 128 int height = d->height();
124 129
125 if( (width != pixBg->width() ) || (height != pixBg->height() ) ) { 130 if( (width != pixBg->width() ) || (height != pixBg->height() ) ) {
126 // qDebug("<<<<<<<< scale image >>>>>>>>>>>>"); 131// odebug << "<<<<<<<< scale image >>>>>>>>>>>>" << oendl;
127 QImage img; 132 QImage img;
128 img = pixBg->convertToImage(); 133 img = pixBg->convertToImage();
129 pixBg->convertFromImage( img.smoothScale( width, height)); 134 pixBg->convertFromImage( img.smoothScale( width, height));
130 } 135 }
131 setBackgroundPixmap( *pixBg ); 136 setBackgroundPixmap( *pixBg );
@@ -355,3 +360,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
355 case VideoPlay: { 360 case VideoPlay: {
356 // qDebug("play"); 361 // odebug << "play" << oendl;
357 if( !mediaPlayerState->playing()) { 362 if( !mediaPlayerState->playing()) {
@@ -363,3 +368,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
363 if( mediaPlayerState->isPaused ) { 368 if( mediaPlayerState->isPaused ) {
364 // qDebug("isPaused"); 369 // odebug << "isPaused" << oendl;
365 setToggleButton( i, FALSE ); 370 setToggleButton( i, FALSE );
@@ -368,3 +373,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
368 } else if( !mediaPlayerState->isPaused ) { 373 } else if( !mediaPlayerState->isPaused ) {
369 // qDebug("is not paused"); 374 // odebug << "is not paused" << oendl;
370 setToggleButton( i, TRUE ); 375 setToggleButton( i, TRUE );
@@ -460,3 +465,3 @@ bool VideoWidget::playVideo() {
460 bool result = FALSE; 465 bool result = FALSE;
461// qDebug("<<<<<<<<<<<<<<<< play video"); 466// odebug << "<<<<<<<<<<<<<<<< play video" << oendl;
462 int stream = 0; 467 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 @@
21 21
22#include "libtremorplugin.h"
23
24/* OPIE */
25#include <opie2/odebug.h>
26
27/* QT */
28#include <qmap.h>
29
30/* STD */
22#include <stdio.h> 31#include <stdio.h>
@@ -35,6 +44,2 @@
35 44
36#include <qmap.h>
37
38#include "libtremorplugin.h"
39
40 45
@@ -64,3 +69,3 @@ public:
64LibTremorPlugin::LibTremorPlugin() { 69LibTremorPlugin::LibTremorPlugin() {
65qDebug("<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>"); 70odebug << "<<<<<<<<<<<<<TREMOR!!!!!>>>>>>>>>>>>>>>>>>" << oendl;
66 d = new LibTremorPluginData; 71 d = new LibTremorPluginData;
@@ -107,3 +112,3 @@ bool LibTremorPlugin::open( const QString& path ) {
107 if (d->f == 0) { 112 if (d->f == 0) {
108 qDebug("error opening %s", d->filename ); 113 odebug << "error opening " << d->filename << "" << oendl;
109 return FALSE; 114 return FALSE;
@@ -112,3 +117,3 @@ bool LibTremorPlugin::open( const QString& path ) {
112 if (ov_open(d->f, &d->vf, NULL, 0) < 0) { 117 if (ov_open(d->f, &d->vf, NULL, 0) < 0) {
113 qDebug("error opening %s", d->filename); 118 odebug << "error opening " << d->filename << "" << oendl;
114 return FALSE; 119 return FALSE;
@@ -155,3 +160,3 @@ bool LibTremorPlugin::open( const QString& path ) {
155 160
156 qDebug("finfo: " + d->finfo); 161 odebug << "finfo: " + d->finfo << oendl;
157 162
@@ -167,3 +172,3 @@ bool LibTremorPlugin::close() {
167 if (fclose(d->f) == -1) { 172 if (fclose(d->f) == -1) {
168 qDebug("error closing file %s", d->filename); 173 odebug << "error closing file " << d->filename << "" << oendl;
169 result = FALSE; 174 result = FALSE;
@@ -195,3 +200,3 @@ int LibTremorPlugin::audioStreams() {
195int LibTremorPlugin::audioChannels( int ) { 200int LibTremorPlugin::audioChannels( int ) {
196 qDebug( "LibTremorPlugin::audioChannels: %i", d->vi->channels ); 201 odebug << "LibTremorPlugin::audioChannels: " << d->vi->channels << "" << oendl;
197 return d->vi->channels; 202 return d->vi->channels;
@@ -201,3 +206,3 @@ int LibTremorPlugin::audioChannels( int ) {
201int LibTremorPlugin::audioFrequency( int ) { 206int LibTremorPlugin::audioFrequency( int ) {
202 qDebug( "LibTremorPlugin::audioFrequency: %ld", d->vi->rate ); 207 odebug << "LibTremorPlugin::audioFrequency: " << d->vi->rate << "" << oendl;
203 return d->vi->rate; 208 return d->vi->rate;
@@ -225,3 +230,3 @@ long LibTremorPlugin::audioGetSample( int ) {
225bool LibTremorPlugin::audioReadSamples( short *output, int, long samples, long& samplesMade, int ) { 230bool LibTremorPlugin::audioReadSamples( short *output, int, long samples, long& samplesMade, int ) {
226// qDebug( "<<<<<<<<<<<<LibTremorPlugin::audioReadStereoSamples %d", samples ); 231// odebug << "<<<<<<<<<<<<LibTremorPlugin::audioReadStereoSamples " << samples << "" << oendl;
227 232
@@ -247,3 +252,3 @@ bool LibTremorPlugin::audioReadSamples( short *output, int, long samples, long&
247 long ret = ov_read(&d->vf, buf, n, &d->csection); 252 long ret = ov_read(&d->vf, buf, n, &d->csection);
248// qDebug("%d", ret); 253// odebug << "" << ret << "" << oendl;
249 if (ret == 0) { 254 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 @@
21 21
22
23#include "wavplugin.h"
24
25/* OPIE */
26#include <opie2/odebug.h>
27
28/* QT */
29#include <qfile.h>
30
31/* STD */
22#include <stdio.h> 32#include <stdio.h>
@@ -26,4 +36,2 @@
26#include <unistd.h> 36#include <unistd.h>
27#include <qfile.h>
28#include "wavplugin.h"
29 37
@@ -78,3 +86,3 @@ public:
78 if ( input == 0 ) { 86 if ( input == 0 ) {
79 qDebug("no input"); 87 odebug << "no input" << oendl;
80 return FALSE; 88 return FALSE;
@@ -85,3 +93,3 @@ public:
85 if ( getSample(l, r) == FALSE ) { 93 if ( getSample(l, r) == FALSE ) {
86 qDebug("didn't get sample"); 94 odebug << "didn't get sample" << oendl;
87 return FALSE; 95 return FALSE;
@@ -137,3 +145,3 @@ public:
137 if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) { 145 if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
138 qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag); 146 odebug << "WAV file: UNSUPPORTED FORMAT " << chunkdata.formatTag << "" << oendl;
139 return FALSE; 147 return FALSE;
@@ -147,3 +155,3 @@ public:
147 } // while 155 } // while
148 qDebug("bits %d", chunkdata.wBitsPerSample); 156 odebug << "bits " << chunkdata.wBitsPerSample << "" << oendl;
149 return TRUE; 157 return TRUE;
@@ -209,3 +217,3 @@ WavPlugin::~WavPlugin() {
209bool WavPlugin::isFileSupported( const QString& path ) { 217bool WavPlugin::isFileSupported( const QString& path ) {
210// qDebug( "WavPlugin::isFileSupported" ); 218// odebug << "WavPlugin::isFileSupported" << oendl;
211 219
@@ -228,3 +236,3 @@ bool WavPlugin::isFileSupported( const QString& path ) {
228bool WavPlugin::open( const QString& path ) { 236bool WavPlugin::open( const QString& path ) {
229// qDebug( "WavPlugin::open" ); 237// odebug << "WavPlugin::open" << oendl;
230 238
@@ -236,3 +244,3 @@ bool WavPlugin::open( const QString& path ) {
236 if ( d->input->open(IO_ReadOnly) == FALSE ) { 244 if ( d->input->open(IO_ReadOnly) == FALSE ) {
237 qDebug("couldn't open file"); 245 odebug << "couldn't open file" << oendl;
238 delete d->input; 246 delete d->input;
@@ -250,3 +258,3 @@ bool WavPlugin::open( const QString& path ) {
250bool WavPlugin::close() { 258bool WavPlugin::close() {
251// qDebug( "WavPlugin::close" ); 259// odebug << "WavPlugin::close" << oendl;
252 260
@@ -260,3 +268,3 @@ bool WavPlugin::close() {
260bool WavPlugin::isOpen() { 268bool WavPlugin::isOpen() {
261// qDebug( "WavPlugin::isOpen" ); 269// odebug << "WavPlugin::isOpen" << oendl;
262 return ( d->input != 0 ); 270 return ( d->input != 0 );
@@ -266,3 +274,3 @@ bool WavPlugin::isOpen() {
266int WavPlugin::audioStreams() { 274int WavPlugin::audioStreams() {
267// qDebug( "WavPlugin::audioStreams" ); 275// odebug << "WavPlugin::audioStreams" << oendl;
268 return 1; 276 return 1;
@@ -272,3 +280,3 @@ int WavPlugin::audioStreams() {
272int WavPlugin::audioChannels( int ) { 280int WavPlugin::audioChannels( int ) {
273// qDebug( "WavPlugin::audioChannels" ); 281// odebug << "WavPlugin::audioChannels" << oendl;
274 return d->chunkdata.channels;// 2; // ### Always scale audio to stereo samples 282 return d->chunkdata.channels;// 2; // ### Always scale audio to stereo samples
@@ -278,3 +286,3 @@ int WavPlugin::audioChannels( int ) {
278int WavPlugin::audioFrequency( int ) { 286int WavPlugin::audioFrequency( int ) {
279// qDebug( "WavPlugin::audioFrequency %d", d->chunkdata.samplesPerSec ); 287// odebug << "WavPlugin::audioFrequency " << d->chunkdata.samplesPerSec << "" << oendl;
280 return d->chunkdata.samplesPerSec; //44100; // ### Always scale to frequency of 44100 288 return d->chunkdata.samplesPerSec; //44100; // ### Always scale to frequency of 44100
@@ -284,3 +292,3 @@ int WavPlugin::audioFrequency( int ) {
284int WavPlugin::audioSamples( int ) { 292int WavPlugin::audioSamples( int ) {
285// qDebug( "WavPlugin::audioSamples" ); 293// odebug << "WavPlugin::audioSamples" << oendl;
286 return d->samples / d->chunkdata.channels/2; // ### Scaled samples will be made stereo, 294 return d->samples / d->chunkdata.channels/2; // ### Scaled samples will be made stereo,
@@ -291,3 +299,3 @@ int WavPlugin::audioSamples( int ) {
291bool WavPlugin::audioSetSample( long, int ) { 299bool WavPlugin::audioSetSample( long, int ) {
292// qDebug( "WavPlugin::audioSetSample" ); 300// odebug << "WavPlugin::audioSetSample" << oendl;
293 return FALSE; 301 return FALSE;
@@ -297,3 +305,3 @@ bool WavPlugin::audioSetSample( long, int ) {
297long WavPlugin::audioGetSample( int ) { 305long WavPlugin::audioGetSample( int ) {
298// qDebug( "WavPlugin::audioGetSample" ); 306// odebug << "WavPlugin::audioGetSample" << oendl;
299 return 0; 307 return 0;
@@ -327,3 +335,3 @@ bool WavPlugin::audioReadStereoSamples( short *output, long samples, long& sampl
327bool WavPlugin::audioReadSamples( short *output, int channels, long samples, long& samplesMade, int ) { 335bool WavPlugin::audioReadSamples( short *output, int channels, long samples, long& samplesMade, int ) {
328// qDebug( "WavPlugin::audioReadSamples" ); 336// odebug << "WavPlugin::audioReadSamples" << oendl;
329 return d->add( output, samples, samplesMade, channels != 1 ); 337 return d->add( output, samples, samplesMade, channels != 1 );
@@ -332,3 +340,3 @@ bool WavPlugin::audioReadSamples( short *output, int channels, long samples, lon
332double WavPlugin::getTime() { 340double WavPlugin::getTime() {
333// qDebug( "WavPlugin::getTime" ); //this is a stupid hack here!! 341// odebug << "WavPlugin::getTime" << oendl; //this is a stupid hack here!!
334 return d->chunkdata.wBitsPerSample; /*0.0*/; 342 return d->chunkdata.wBitsPerSample; /*0.0*/;
@@ -337,4 +345,4 @@ double WavPlugin::getTime() {
337// int WavPlugin::audioBitsPerSample( int ) { 345// int WavPlugin::audioBitsPerSample( int ) {
338// // qDebug( "WavPlugin::audioFormat %d", d->chunkdata.wBitsPerSample ); 346// // odebug << "WavPlugin::audioFormat " << d->chunkdata.wBitsPerSample << "" << oendl;
339// return d->chunkdata.wBitsPerSample; // 347// return d->chunkdata.wBitsPerSample; //
340// } 348// }