From 06a76b6c287a3ebf57669bc964e0b61d19369e58 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 3 Jun 2002 20:36:26 +0000 Subject: display log messages for unknown codecs CVS patchset: 2007 CVS date: 2002/06/03 20:36:26 --- src/xine-engine/audio_decoder.c | 17 +++++++++++++---- src/xine-engine/video_decoder.c | 19 ++++++++++++++----- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 8ad6d46ec..f498bfbe7 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.73 2002/05/24 22:09:44 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.74 2002/06/03 20:36:26 miguelfreitas Exp $ * * * functions that implement audio decoding @@ -47,6 +47,7 @@ void *audio_decoder_loop (void *this_gen) { int running = 1; audio_decoder_t *decoder; static int prof_audio_decode = -1; + static uint32_t buftype_unknown = 0; if (prof_audio_decode == -1) prof_audio_decode = xine_profiler_allocate_slot ("audio decoder/output"); @@ -239,11 +240,19 @@ void *audio_decoder_loop (void *this_gen) { /* finally - decode data */ if (decoder) - decoder->decode_data (decoder, buf); + decoder->decode_data (decoder, buf); + else if( buf->type != buftype_unknown ) { + xine_log (this, XINE_LOG_MSG, "audio_decoder: no plugin available to handle '%s'\n", + buf_audio_name( buf->type ) ); + buftype_unknown = buf->type; + } } } - } else - printf ("audio_loop: unknown buffer type: %08x\n", buf->type); + } else if( buf->type != buftype_unknown ) { + xine_log (this, XINE_LOG_MSG, "audio_decoder: unknown buffer type: %08x\n", + buf->type ); + buftype_unknown = buf->type; + } xine_profiler_stop_count (prof_audio_decode); } diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 3915e37bd..d061520a8 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.85 2002/05/24 22:09:45 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.86 2002/06/03 20:36:26 miguelfreitas Exp $ * */ @@ -64,7 +64,8 @@ void *video_decoder_loop (void *this_gen) { spu_decoder_t *spu_decoder; static int prof_video_decode = -1; static int prof_spu_decode = -1; - + static uint32_t buftype_unknown = 0; + if (prof_video_decode == -1) prof_video_decode = xine_profiler_allocate_slot ("video decoder"); if (prof_spu_decode == -1) @@ -260,9 +261,17 @@ void *video_decoder_loop (void *this_gen) { } decoder->decode_data (this->cur_video_decoder_plugin, buf); - } - } else - printf ("video_decoder: unknown buffer type: %08x\n", buf->type); + + } else if( buf->type != buftype_unknown ) { + xine_log (this, XINE_LOG_MSG, "video_decoder: no plugin available to handle '%s'\n", + buf_video_name( buf->type ) ); + buftype_unknown = buf->type; + } + } else if( buf->type != buftype_unknown ) { + xine_log (this, XINE_LOG_MSG, "video_decoder: unknown buffer type: %08x\n", + buf->type ); + buftype_unknown = buf->type; + } xine_profiler_stop_count (prof_video_decode); -- cgit v1.2.3