summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmad/libmadplugin.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
index 9d1ff8c..1989b4a 100644
--- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp
+++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp
@@ -383,5 +383,5 @@ int LibMadPlugin::http_open(const QString& path ) {
383 383
384 if (len == -1) { 384 if (len == -1) {
385 qDebug( "http_open: "+ QString(strerror(errno)) +"\n"); 385 // qDebug( "http_open: "+ QString(strerror(errno)) +"\n");
386 return 0; 386 return 0;
387 } 387 }
@@ -397,5 +397,5 @@ int LibMadPlugin::http_open(const QString& path ) {
397 /* This is shoutcast/icecast streaming */ 397 /* This is shoutcast/icecast streaming */
398 if (strncmp(http_request + 4, "200 ", 4)) { 398 if (strncmp(http_request + 4, "200 ", 4)) {
399 qDebug("http_open: " + QString(http_request) + "\n"); 399 // qDebug("http_open: " + QString(http_request) + "\n");
400 return 0; 400 return 0;
401 } 401 }
@@ -418,5 +418,5 @@ int LibMadPlugin::http_open(const QString& path ) {
418 info = QString(name + genre + url + bitrate + message).replace( QRegExp("\n"), " : " ); 418 info = QString(name + genre + url + bitrate + message).replace( QRegExp("\n"), " : " );
419 419
420 qDebug("Stream info: " + info); 420 // qDebug("Stream info: " + info);
421 421
422 return (tcp_sock); 422 return (tcp_sock);
@@ -430,5 +430,5 @@ bool LibMadPlugin::open( const QString& path ) {
430 cfg.setGroup("Options"); 430 cfg.setGroup("Options");
431 bufferSize = cfg.readNumEntry("MPeg_BufferSize",MPEG_BUFFER_SIZE); 431 bufferSize = cfg.readNumEntry("MPeg_BufferSize",MPEG_BUFFER_SIZE);
432 qDebug("buffer size is %d", bufferSize); 432 // qDebug("buffer size is %d", bufferSize);
433 d->bad_last_frame = 0; 433 d->bad_last_frame = 0;
434 d->flush = TRUE; 434 d->flush = TRUE;
@@ -451,5 +451,5 @@ bool LibMadPlugin::open( const QString& path ) {
451 } 451 }
452 if (d->input.fd == -1) { 452 if (d->input.fd == -1) {
453 qDebug("error opening %s", d->input.path ); 453 // qDebug("error opening %s", d->input.path );
454 return FALSE; 454 return FALSE;
455 } 455 }
@@ -457,5 +457,5 @@ bool LibMadPlugin::open( const QString& path ) {
457 struct stat stat; 457 struct stat stat;
458 if (fstat(d->input.fd, &stat) == -1) { 458 if (fstat(d->input.fd, &stat) == -1) {
459 qDebug("error calling fstat"); return FALSE; 459 // qDebug("error calling fstat"); return FALSE;
460 } 460 }
461 if (S_ISREG(stat.st_mode) && stat.st_size > 0) 461 if (S_ISREG(stat.st_mode) && stat.st_size > 0)
@@ -469,5 +469,5 @@ bool LibMadPlugin::open( const QString& path ) {
469 d->input.fdm = map_file(d->input.fd, &d->input.length); 469 d->input.fdm = map_file(d->input.fd, &d->input.length);
470 if (d->input.fdm == 0) { 470 if (d->input.fdm == 0) {
471 qDebug("error mmapping file"); return FALSE; 471 // qDebug("error mmapping file"); return FALSE;
472 } 472 }
473 d->input.data = (unsigned char *)d->input.fdm; 473 d->input.data = (unsigned char *)d->input.fdm;
@@ -478,5 +478,5 @@ bool LibMadPlugin::open( const QString& path ) {
478 d->input.data = (unsigned char *)malloc( bufferSize /*MPEG_BUFFER_SIZE*/); 478 d->input.data = (unsigned char *)malloc( bufferSize /*MPEG_BUFFER_SIZE*/);
479 if (d->input.data == 0) { 479 if (d->input.data == 0) {
480 qDebug("error allocating input buffer"); 480 // qDebug("error allocating input buffer");
481 return FALSE; 481 return FALSE;
482 } 482 }
@@ -506,5 +506,5 @@ bool LibMadPlugin::close() {
506 if (d->input.fdm) { 506 if (d->input.fdm) {
507 if (unmap_file(d->input.fdm, d->input.length) == -1) { 507 if (unmap_file(d->input.fdm, d->input.length) == -1) {
508 qDebug("error munmapping file"); 508 // qDebug("error munmapping file");
509 result = FALSE; 509 result = FALSE;
510 } 510 }
@@ -520,5 +520,5 @@ bool LibMadPlugin::close() {
520 520
521 if (::close(d->input.fd) == -1) { 521 if (::close(d->input.fd) == -1) {
522 qDebug("error closing file %s", d->input.path); 522 // qDebug("error closing file %s", d->input.path);
523 result = FALSE; 523 result = FALSE;
524 } 524 }
@@ -556,5 +556,5 @@ int LibMadPlugin::audioFrequency( int ) {
556 debugMsg( "LibMadPlugin::audioFrequency" ); 556 debugMsg( "LibMadPlugin::audioFrequency" );
557 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 ); 557 long t; short t1[5]; audioReadSamples( t1, 2, 1, t, 0 );
558 qDebug( "LibMadPlugin::audioFrequency: %i", d->frame.header.samplerate ); 558 // qDebug( "LibMadPlugin::audioFrequency: %i", d->frame.header.samplerate );
559 return d->frame.header.samplerate; 559 return d->frame.header.samplerate;
560} 560}
@@ -575,7 +575,7 @@ int LibMadPlugin::audioSamples( int ) {
575 int samples = (d->input.fileLength / (d->frame.header.bitrate/8)) * d->frame.header.samplerate; 575 int samples = (d->input.fileLength / (d->frame.header.bitrate/8)) * d->frame.header.samplerate;
576 576
577 qDebug( "LibMadPlugin::audioSamples: %i * %i * 8 / %i", (int)d->input.fileLength, 577 // qDebug( "LibMadPlugin::audioSamples: %i * %i * 8 / %i", (int)d->input.fileLength,
578 (int)d->frame.header.samplerate, (int)d->frame.header.bitrate ); 578 // (int)d->frame.header.samplerate, (int)d->frame.header.bitrate );
579 qDebug( "LibMadPlugin::audioSamples: %i", samples ); 579 // qDebug( "LibMadPlugin::audioSamples: %i", samples );
580 580
581 return samples; 581 return samples;
@@ -681,5 +681,5 @@ bool LibMadPlugin::read() {
681 681
682 if (len == -1) { 682 if (len == -1) {
683 qDebug("error reading audio"); 683 // qDebug("error reading audio");
684 return FALSE; 684 return FALSE;
685 } 685 }
@@ -759,5 +759,5 @@ bool LibMadPlugin::decode( short *output, long samples, long& samplesMade ) {
759 if ( d->stream.error == MAD_ERROR_BADCRC ) { 759 if ( d->stream.error == MAD_ERROR_BADCRC ) {
760 mad_frame_mute(&d->frame); 760 mad_frame_mute(&d->frame);
761 qDebug( "error decoding, bad crc" ); 761 // qDebug( "error decoding, bad crc" );
762 } 762 }
763 } 763 }
@@ -822,15 +822,15 @@ double LibMadPlugin::getTime() {
822 822
823void LibMadPlugin::printID3Tags() { 823void LibMadPlugin::printID3Tags() {
824 qDebug( "LibMadPlugin::printID3Tags" ); 824 // qDebug( "LibMadPlugin::printID3Tags" );
825 825
826 char id3v1[128 + 1]; 826 char id3v1[128 + 1];
827 827
828 if ( ::lseek( d->input.fd, -128, SEEK_END ) == -1 ) { 828 if ( ::lseek( d->input.fd, -128, SEEK_END ) == -1 ) {
829 qDebug( "error seeking to id3 tags" ); 829 // qDebug( "error seeking to id3 tags" );
830 return; 830 return;
831 } 831 }
832 832
833 if ( ::read( d->input.fd, id3v1, 128 ) != 128 ) { 833 if ( ::read( d->input.fd, id3v1, 128 ) != 128 ) {
834 qDebug( "error reading in id3 tags" ); 834 // qDebug( "error reading in id3 tags" );
835 return; 835 return;
836 } 836 }
@@ -842,5 +842,5 @@ void LibMadPlugin::printID3Tags() {
842 QString label[5] = { tr( "Title" ), tr( "Artist" ), tr( "Album" ), tr( "Year" ), tr( "Comment" ) }; 842 QString label[5] = { tr( "Title" ), tr( "Artist" ), tr( "Album" ), tr( "Year" ), tr( "Comment" ) };
843 char *ptr = id3v1 + 3, *ptr2 = ptr + len[0]; 843 char *ptr = id3v1 + 3, *ptr2 = ptr + len[0];
844 qDebug( "ID3 tags in file:" ); 844 // qDebug( "ID3 tags in file:" );
845 info = ""; 845 info = "";
846 for ( int i = 0; i < 5; ptr += len[i], i++, ptr2 += len[i] ) { 846 for ( int i = 0; i < 5; ptr += len[i], i++, ptr2 += len[i] ) {
@@ -863,5 +863,5 @@ void LibMadPlugin::printID3Tags() {
863 863
864 if ( ::lseek(d->input.fd, 0, SEEK_SET) == -1 ) { 864 if ( ::lseek(d->input.fd, 0, SEEK_SET) == -1 ) {
865 qDebug( "error seeking back to beginning" ); 865 // qDebug( "error seeking back to beginning" );
866 return; 866 return;
867 } 867 }