Turn off tracing in all the decoder and reader plug-ins. It should be turned on

when looking for a bug in the respective plug-in.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24471 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-03-19 16:44:26 +00:00
parent 1fde221032
commit 936f5631e4
12 changed files with 47 additions and 29 deletions

View File

@ -26,3 +26,4 @@ SubInclude HAIKU_TOP src add-ons media plugins mp4_reader ;
# licensed add-ons, you need to run configure with the --include-gpl-addons
# parameter
SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder ;
#SubIncludeGPL HAIKU_TOP src add-ons media plugins xvid_decoder ;

View File

@ -153,7 +153,7 @@ avCodec::Setup(media_format *ioEncodedFormat, const void *infoBuffer, size_t inf
if (gCodecTable[i].family == descr.family && gCodecTable[i].fourcc == cid) {
fCodec = avcodec_find_decoder(gCodecTable[i].id);
if (!fCodec) {
printf("avCodec: unable to find the correct ffmpeg decoder (id = %d)!!!\n",gCodecTable[i].id);
PRINT(("avCodec: unable to find the correct ffmpeg decoder (id = %d)!!!\n",gCodecTable[i].id));
return B_ERROR;
}
@ -225,8 +225,8 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
ffc->extradata = fExtraData;
ffc->extradata_size = fExtraDataSize;
printf("bit_rate %d, sample_rate %d, channels %d, block_align %d, extradata_size %d\n",
ffc->bit_rate, ffc->sample_rate, ffc->channels, ffc->block_align, ffc->extradata_size);
PRINT(("bit_rate %d, sample_rate %d, channels %d, block_align %d, extradata_size %d\n",
ffc->bit_rate, ffc->sample_rate, ffc->channels, ffc->block_align, ffc->extradata_size));
// close any previous instance
if (fCodecInitDone) {
@ -268,7 +268,7 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
ffc->extradata_size = fInputFormat.MetaDataSize();
}
printf("#### requested video format 0x%x\n", inout_format->u.raw_video.display.format);
PRINT(("#### requested video format 0x%x\n", inout_format->u.raw_video.display.format));
// make MediaPlayer happy (if not in rgb32 screen depth and no overlay,
// it will only ask for YCbCr, which DrawBitmap doesn't handle, so the default
@ -300,11 +300,11 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
}
if (!fCodecInitDone) {
printf("avcodec_open() failed!\n");
PRINT(("avcodec_open() failed!\n"));
return B_ERROR;
}
if (!conv_func) {
printf("no conv_func!\n");
PRINT(("no conv_func!\n"));
return B_ERROR;
}
@ -324,7 +324,7 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
PRINT(("[%c] out_format=%s\n", isAudio?('a'):('v'), buffer));
#endif
printf("#### returned video format 0x%x\n", inout_format->u.raw_video.display.format);
PRINT(("#### returned video format 0x%x\n", inout_format->u.raw_video.display.format));
return B_OK;
}
@ -354,17 +354,17 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
mh->start_time = fStartTime;
// printf("audio start_time %.6f\n", mh->start_time / 1000000.0);
// PRINT(("audio start_time %.6f\n", mh->start_time / 1000000.0));
char *output_buffer = (char *)out_buffer;
*out_frameCount = 0;
while (*out_frameCount < fOutputFrameCount) {
if (fOutputBufferSize < 0) {
printf("############ fOutputBufferSize %ld\n", fOutputBufferSize);
PRINT(("############ fOutputBufferSize %ld\n", fOutputBufferSize));
fOutputBufferSize = 0;
}
if (fChunkBufferSize < 0) {
printf("############ fChunkBufferSize %ld\n", fChunkBufferSize);
PRINT(("############ fChunkBufferSize %ld\n", fChunkBufferSize));
fChunkBufferSize = 0;
}
@ -383,7 +383,7 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
status_t err;
err = GetNextChunk(&fChunkBuffer, &fChunkBufferSize, &chunk_mh);
if (err != B_OK || fChunkBufferSize < 0) {
printf("GetNextChunk error\n");
PRINT(("GetNextChunk error\n"));
fChunkBufferSize = 0;
break;
}
@ -397,13 +397,13 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
int len, out_size;
len = avcodec_decode_audio(ffc, (short *)fOutputBuffer, &out_size, const_cast<uint8_t *>(static_cast<const uint8_t *>(fChunkBuffer)) + fChunkBufferOffset, fChunkBufferSize);
if (len < 0) {
printf("########### audio decode error, fChunkBufferSize %ld, fChunkBufferOffset %ld\n", fChunkBufferSize, fChunkBufferOffset);
PRINT(("########### audio decode error, fChunkBufferSize %ld, fChunkBufferOffset %ld\n", fChunkBufferSize, fChunkBufferOffset));
out_size = 0;
len = 0;
fChunkBufferOffset = 0;
fChunkBufferSize = 0;
}
// else printf("audio decode: len %d, out_size %d\n", len, out_size);
// else PRINT(("audio decode: len %d, out_size %d\n", len, out_size));
fChunkBufferOffset += len;
fChunkBufferSize -= len;
fOutputBufferOffset = 0;
@ -451,8 +451,8 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
int len;
len = avcodec_decode_video(ffc, ffpicture, &got_picture, (uint8_t *)data, size);
//printf("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld ffc->frame_rate = %ld\n", (int)(ffc->pts / (60*60*1000000)), (int)(ffc->pts / (60*1000000)), (int)(ffc->pts / (1000000)), (int)(ffc->pts % 1000000), ffc->frame_number, ffc->frame_rate);
//printf("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld ffc->frame_rate = %ld\n", (int)(ffpicture->pts / (60*60*1000000)), (int)(ffpicture->pts / (60*1000000)), (int)(ffpicture->pts / (1000000)), (int)(ffpicture->pts % 1000000), ffc->frame_number, ffc->frame_rate);
//PRINT(("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld ffc->frame_rate = %ld\n", (int)(ffc->pts / (60*60*1000000)), (int)(ffc->pts / (60*1000000)), (int)(ffc->pts / (1000000)), (int)(ffc->pts % 1000000), ffc->frame_number, ffc->frame_rate));
//PRINT(("FFDEC: PTS = %d:%d:%d.%d - ffc->frame_number = %ld ffc->frame_rate = %ld\n", (int)(ffpicture->pts / (60*60*1000000)), (int)(ffpicture->pts / (60*1000000)), (int)(ffpicture->pts / (1000000)), (int)(ffpicture->pts % 1000000), ffc->frame_number, ffc->frame_rate));
if (len < 0)
printf("[%c] avCodec: error in decoding frame %lld\n", isAudio?('a'):('v'), *out_frameCount);
@ -488,7 +488,7 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
diff2 += prof_t3 - prof_t2;
prof_cnt++;
if (!(fFrame % 10))
printf("[%c] profile: d1 = %lld, d2 = %lld (%ld)\n", isAudio?('a'):('v'), diff1/prof_cnt, diff2/prof_cnt, fFrame);
PRINT(("[%c] profile: d1 = %lld, d2 = %lld (%ld)\n", isAudio?('a'):('v'), diff1/prof_cnt, diff2/prof_cnt, fFrame));
#endif
}
}

View File

@ -33,7 +33,7 @@
#include "RawFormats.h"
#include "avi_reader.h"
#define TRACE_AVI_READER
//#define TRACE_AVI_READER
#ifdef TRACE_AVI_READER
#define TRACE printf
#else

View File

@ -27,6 +27,15 @@
#include <MediaFormats.h>
#include "matroska_codecs.h"
//#define TRACE_MATROSKA
#ifdef TRACE_MATROSKA
#define TRACE printf
#else
#define TRACE(a...)
#endif
#define ERROR(a...) fprintf(stderr, a)
#define IS_CODEC(a,b) !memcmp(a, b, strlen(b))
struct bitmap_info_header
@ -50,7 +59,7 @@ struct bitmap_info_header
status_t
GetAudioFormat(media_format *format, const char *codec, void *private_data, int private_size)
{
printf("GetAudioFormat: codec '%s', private data size %d\n", codec, private_size);
TRACE("GetAudioFormat: codec '%s', private data size %d\n", codec, private_size);
BMediaFormats formats;
media_format_description description;
@ -129,7 +138,7 @@ GetAudioFormat(media_format *format, const char *codec, void *private_data, int
status_t
GetVideoFormat(media_format *format, const char *codec, void *private_data, int private_size)
{
printf("private_data: codec '%s', private data size %d\n", codec, private_size);
TRACE("private_data: codec '%s', private data size %d\n", codec, private_size);
BMediaFormats formats;
media_format_description description;

View File

@ -34,7 +34,7 @@
#include "matroska_codecs.h"
#include "matroska_util.h"
#define TRACE_MKV_READER
//#define TRACE_MKV_READER
#ifdef TRACE_MKV_READER
#define TRACE printf
#else

View File

@ -34,7 +34,7 @@
#include "mov_reader.h"
#define TRACE_MOV_READER
//#define TRACE_MOV_READER
#ifdef TRACE_MOV_READER
#define TRACE printf
#else

View File

@ -29,7 +29,7 @@
#include <MediaRoster.h>
#include "mp3DecoderPlugin.h"
#define TRACE_MP3_DECODER
//#define TRACE_MP3_DECODER
#ifdef TRACE_MP3_DECODER
#define TRACE printf
#else

View File

@ -38,7 +38,7 @@
#include <string.h>
#define TRACE_MP4_READER
//#define TRACE_MP4_READER
#ifdef TRACE_MP4_READER
# define TRACE printf
#else
@ -469,7 +469,7 @@ mp4Reader::AllocateCookie(int32 streamNumber, void **_cookie)
size_t size = video_format->VOLSize;
const void *data = video_format->theVOL;
if (format->SetMetaData(data, size) != B_OK) {
printf("Failed to set VOL\n %d %d",(16 << 20),32000);
ERROR("Failed to set VOL\n %d %d",(16 << 20),32000);
}
#ifdef TRACE_MP4_READER

View File

@ -11,6 +11,14 @@
#include <string.h>
//#define TRACE_MUSEPACK_READER
#ifdef TRACE_MUSEPACK_READER
#define TRACE printf
#else
#define TRACE(a...)
#endif
MusePackReader::MusePackReader()
{
}
@ -40,12 +48,12 @@ MusePackReader::Sniff(int32 *_streamCount)
int error = fInfo.ReadStreamInfo(file);
if (error > B_OK) {
// error came from engine
printf("MusePackReader: ReadStreamInfo() engine error %d\n", error);
TRACE("MusePackReader: ReadStreamInfo() engine error %d\n", error);
return B_ERROR;
} else if (error < B_OK)
return error;
printf("MusePackReader: recognized MPC file\n");
TRACE("MusePackReader: recognized MPC file\n");
*_streamCount = 1;
return B_OK;
}

View File

@ -10,7 +10,7 @@
#include "speexCodecDefaults.h"
#include "OggSpeexFormats.h"
#define TRACE_THIS 1
#define TRACE_THIS 0
#if TRACE_THIS
#define TRACE printf
#else

View File

@ -8,7 +8,7 @@
#include "theoraCodecPlugin.h"
#include "OggTheoraFormats.h"
#define TRACE_THIS 1
#define TRACE_THIS 0
#if TRACE_THIS
#define TRACE printf
#else

View File

@ -8,7 +8,7 @@
#include "vorbisCodecPlugin.h"
#include "OggVorbisFormats.h"
#define TRACE_THIS 1
#define TRACE_THIS 0
#if TRACE_THIS
#define TRACE printf
#else