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:
@@ -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
|
# licensed add-ons, you need to run configure with the --include-gpl-addons
|
||||||
# parameter
|
# parameter
|
||||||
SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder ;
|
SubIncludeGPL HAIKU_TOP src add-ons media plugins ac3_decoder ;
|
||||||
|
#SubIncludeGPL HAIKU_TOP src add-ons media plugins xvid_decoder ;
|
||||||
|
|||||||
@@ -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) {
|
if (gCodecTable[i].family == descr.family && gCodecTable[i].fourcc == cid) {
|
||||||
fCodec = avcodec_find_decoder(gCodecTable[i].id);
|
fCodec = avcodec_find_decoder(gCodecTable[i].id);
|
||||||
if (!fCodec) {
|
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;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,8 +225,8 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
|
|||||||
ffc->extradata = fExtraData;
|
ffc->extradata = fExtraData;
|
||||||
ffc->extradata_size = fExtraDataSize;
|
ffc->extradata_size = fExtraDataSize;
|
||||||
|
|
||||||
printf("bit_rate %d, sample_rate %d, channels %d, block_align %d, extradata_size %d\n",
|
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);
|
ffc->bit_rate, ffc->sample_rate, ffc->channels, ffc->block_align, ffc->extradata_size));
|
||||||
|
|
||||||
// close any previous instance
|
// close any previous instance
|
||||||
if (fCodecInitDone) {
|
if (fCodecInitDone) {
|
||||||
@@ -268,7 +268,7 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
|
|||||||
ffc->extradata_size = fInputFormat.MetaDataSize();
|
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,
|
// 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
|
// 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) {
|
if (!fCodecInitDone) {
|
||||||
printf("avcodec_open() failed!\n");
|
PRINT(("avcodec_open() failed!\n"));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
if (!conv_func) {
|
if (!conv_func) {
|
||||||
printf("no conv_func!\n");
|
PRINT(("no conv_func!\n"));
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ avCodec::NegotiateOutputFormat(media_format *inout_format)
|
|||||||
PRINT(("[%c] out_format=%s\n", isAudio?('a'):('v'), buffer));
|
PRINT(("[%c] out_format=%s\n", isAudio?('a'):('v'), buffer));
|
||||||
#endif
|
#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;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -354,17 +354,17 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
|
|||||||
|
|
||||||
mh->start_time = fStartTime;
|
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;
|
char *output_buffer = (char *)out_buffer;
|
||||||
*out_frameCount = 0;
|
*out_frameCount = 0;
|
||||||
while (*out_frameCount < fOutputFrameCount) {
|
while (*out_frameCount < fOutputFrameCount) {
|
||||||
if (fOutputBufferSize < 0) {
|
if (fOutputBufferSize < 0) {
|
||||||
printf("############ fOutputBufferSize %ld\n", fOutputBufferSize);
|
PRINT(("############ fOutputBufferSize %ld\n", fOutputBufferSize));
|
||||||
fOutputBufferSize = 0;
|
fOutputBufferSize = 0;
|
||||||
}
|
}
|
||||||
if (fChunkBufferSize < 0) {
|
if (fChunkBufferSize < 0) {
|
||||||
printf("############ fChunkBufferSize %ld\n", fChunkBufferSize);
|
PRINT(("############ fChunkBufferSize %ld\n", fChunkBufferSize));
|
||||||
fChunkBufferSize = 0;
|
fChunkBufferSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
|
|||||||
status_t err;
|
status_t err;
|
||||||
err = GetNextChunk(&fChunkBuffer, &fChunkBufferSize, &chunk_mh);
|
err = GetNextChunk(&fChunkBuffer, &fChunkBufferSize, &chunk_mh);
|
||||||
if (err != B_OK || fChunkBufferSize < 0) {
|
if (err != B_OK || fChunkBufferSize < 0) {
|
||||||
printf("GetNextChunk error\n");
|
PRINT(("GetNextChunk error\n"));
|
||||||
fChunkBufferSize = 0;
|
fChunkBufferSize = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -397,13 +397,13 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
|
|||||||
int len, out_size;
|
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);
|
len = avcodec_decode_audio(ffc, (short *)fOutputBuffer, &out_size, const_cast<uint8_t *>(static_cast<const uint8_t *>(fChunkBuffer)) + fChunkBufferOffset, fChunkBufferSize);
|
||||||
if (len < 0) {
|
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;
|
out_size = 0;
|
||||||
len = 0;
|
len = 0;
|
||||||
fChunkBufferOffset = 0;
|
fChunkBufferOffset = 0;
|
||||||
fChunkBufferSize = 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;
|
fChunkBufferOffset += len;
|
||||||
fChunkBufferSize -= len;
|
fChunkBufferSize -= len;
|
||||||
fOutputBufferOffset = 0;
|
fOutputBufferOffset = 0;
|
||||||
@@ -451,8 +451,8 @@ avCodec::Decode(void *out_buffer, int64 *out_frameCount,
|
|||||||
int len;
|
int len;
|
||||||
len = avcodec_decode_video(ffc, ffpicture, &got_picture, (uint8_t *)data, size);
|
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);
|
//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));
|
||||||
//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)(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)
|
if (len < 0)
|
||||||
printf("[%c] avCodec: error in decoding frame %lld\n", isAudio?('a'):('v'), *out_frameCount);
|
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;
|
diff2 += prof_t3 - prof_t2;
|
||||||
prof_cnt++;
|
prof_cnt++;
|
||||||
if (!(fFrame % 10))
|
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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "RawFormats.h"
|
#include "RawFormats.h"
|
||||||
#include "avi_reader.h"
|
#include "avi_reader.h"
|
||||||
|
|
||||||
#define TRACE_AVI_READER
|
//#define TRACE_AVI_READER
|
||||||
#ifdef TRACE_AVI_READER
|
#ifdef TRACE_AVI_READER
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -27,6 +27,15 @@
|
|||||||
#include <MediaFormats.h>
|
#include <MediaFormats.h>
|
||||||
#include "matroska_codecs.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))
|
#define IS_CODEC(a,b) !memcmp(a, b, strlen(b))
|
||||||
|
|
||||||
struct bitmap_info_header
|
struct bitmap_info_header
|
||||||
@@ -50,7 +59,7 @@ struct bitmap_info_header
|
|||||||
status_t
|
status_t
|
||||||
GetAudioFormat(media_format *format, const char *codec, void *private_data, int private_size)
|
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;
|
BMediaFormats formats;
|
||||||
media_format_description description;
|
media_format_description description;
|
||||||
@@ -129,7 +138,7 @@ GetAudioFormat(media_format *format, const char *codec, void *private_data, int
|
|||||||
status_t
|
status_t
|
||||||
GetVideoFormat(media_format *format, const char *codec, void *private_data, int private_size)
|
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;
|
BMediaFormats formats;
|
||||||
media_format_description description;
|
media_format_description description;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "matroska_codecs.h"
|
#include "matroska_codecs.h"
|
||||||
#include "matroska_util.h"
|
#include "matroska_util.h"
|
||||||
|
|
||||||
#define TRACE_MKV_READER
|
//#define TRACE_MKV_READER
|
||||||
#ifdef TRACE_MKV_READER
|
#ifdef TRACE_MKV_READER
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include "mov_reader.h"
|
#include "mov_reader.h"
|
||||||
|
|
||||||
#define TRACE_MOV_READER
|
//#define TRACE_MOV_READER
|
||||||
#ifdef TRACE_MOV_READER
|
#ifdef TRACE_MOV_READER
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <MediaRoster.h>
|
#include <MediaRoster.h>
|
||||||
#include "mp3DecoderPlugin.h"
|
#include "mp3DecoderPlugin.h"
|
||||||
|
|
||||||
#define TRACE_MP3_DECODER
|
//#define TRACE_MP3_DECODER
|
||||||
#ifdef TRACE_MP3_DECODER
|
#ifdef TRACE_MP3_DECODER
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_MP4_READER
|
//#define TRACE_MP4_READER
|
||||||
#ifdef TRACE_MP4_READER
|
#ifdef TRACE_MP4_READER
|
||||||
# define TRACE printf
|
# define TRACE printf
|
||||||
#else
|
#else
|
||||||
@@ -469,7 +469,7 @@ mp4Reader::AllocateCookie(int32 streamNumber, void **_cookie)
|
|||||||
size_t size = video_format->VOLSize;
|
size_t size = video_format->VOLSize;
|
||||||
const void *data = video_format->theVOL;
|
const void *data = video_format->theVOL;
|
||||||
if (format->SetMetaData(data, size) != B_OK) {
|
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
|
#ifdef TRACE_MP4_READER
|
||||||
|
|||||||
@@ -11,6 +11,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
//#define TRACE_MUSEPACK_READER
|
||||||
|
#ifdef TRACE_MUSEPACK_READER
|
||||||
|
#define TRACE printf
|
||||||
|
#else
|
||||||
|
#define TRACE(a...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
MusePackReader::MusePackReader()
|
MusePackReader::MusePackReader()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -40,12 +48,12 @@ MusePackReader::Sniff(int32 *_streamCount)
|
|||||||
int error = fInfo.ReadStreamInfo(file);
|
int error = fInfo.ReadStreamInfo(file);
|
||||||
if (error > B_OK) {
|
if (error > B_OK) {
|
||||||
// error came from engine
|
// error came from engine
|
||||||
printf("MusePackReader: ReadStreamInfo() engine error %d\n", error);
|
TRACE("MusePackReader: ReadStreamInfo() engine error %d\n", error);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
} else if (error < B_OK)
|
} else if (error < B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
printf("MusePackReader: recognized MPC file\n");
|
TRACE("MusePackReader: recognized MPC file\n");
|
||||||
*_streamCount = 1;
|
*_streamCount = 1;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "speexCodecDefaults.h"
|
#include "speexCodecDefaults.h"
|
||||||
#include "OggSpeexFormats.h"
|
#include "OggSpeexFormats.h"
|
||||||
|
|
||||||
#define TRACE_THIS 1
|
#define TRACE_THIS 0
|
||||||
#if TRACE_THIS
|
#if TRACE_THIS
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "theoraCodecPlugin.h"
|
#include "theoraCodecPlugin.h"
|
||||||
#include "OggTheoraFormats.h"
|
#include "OggTheoraFormats.h"
|
||||||
|
|
||||||
#define TRACE_THIS 1
|
#define TRACE_THIS 0
|
||||||
#if TRACE_THIS
|
#if TRACE_THIS
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "vorbisCodecPlugin.h"
|
#include "vorbisCodecPlugin.h"
|
||||||
#include "OggVorbisFormats.h"
|
#include "OggVorbisFormats.h"
|
||||||
|
|
||||||
#define TRACE_THIS 1
|
#define TRACE_THIS 0
|
||||||
#if TRACE_THIS
|
#if TRACE_THIS
|
||||||
#define TRACE printf
|
#define TRACE printf
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user