Update of /cvsroot/xine/xine-lib/src/xine-engine In directory usw-pr-cvs1:/tmp/cvs-serv24772/src/xine-engine Modified Files: audio_decoder.c audio_out.c audio_out.h metronom.c video_decoder.c video_out.c xine.c xine_internal.h Log Message: big debug output cleanup. removed debug output from log window, logging relevant information like stream type/size/bitrate instead. demuxer cleanup, removed no-longer-needed macros :-) switched off video_out/libmpeg2/... verbose log output messages. Index: audio_decoder.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/audio_decoder.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- audio_decoder.c 9 Feb 2002 07:13:24 -0000 1.58 +++ audio_decoder.c 17 Feb 2002 17:32:50 -0000 1.59 @@ -212,8 +212,12 @@ if (decoder) { xine_event_t event; - printf ("audio_loop: using decoder >%s< \n", + printf ("audio_decoder: using decoder >%s< \n", decoder->get_identifier()); + xine_log (this, XINE_LOG_FORMAT, + "using audio decoder plugin '%s'\n", + decoder->get_identifier()); + this->cur_audio_decoder_plugin = decoder; this->cur_audio_decoder_plugin->init (this->cur_audio_decoder_plugin, this->audio_out); Index: audio_out.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/audio_out.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- audio_out.c 9 Feb 2002 07:13:24 -0000 1.40 +++ audio_out.c 17 Feb 2002 17:32:50 -0000 1.41 @@ -389,6 +389,10 @@ int output_sample_rate, err; + xine_log (this->xine, XINE_LOG_FORMAT, + "stream audio format is %d kHz sampling rate, %d bits. mode is %d.\n", + rate, bits, mode); + if ((output_sample_rate=this->driver->open(this->driver,bits,(this->force_rate ? this->force_rate : rate),mode)) == 0) { printf("audio_out: open failed!\n"); return 0; @@ -531,17 +535,18 @@ return(this->driver->set_property(this->driver, property, value)); } -ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom, - config_values_t *config) { - - ao_instance_t *this; - int i; - static char *resample_modes[] = {"auto", "off", "on", NULL}; +ao_instance_t *ao_new_instance (ao_driver_t *driver, xine_t *xine) { + + config_values_t *config = xine->config; + ao_instance_t *this; + int i; + static char *resample_modes[] = {"auto", "off", "on", NULL}; this = xine_xmalloc (sizeof (ao_instance_t)) ; this->driver = driver; - this->metronom = metronom; + this->metronom = xine->metronom; + this->xine = xine; this->open = ao_open; this->get_buffer = ao_get_buffer; Index: audio_out.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/audio_out.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- audio_out.h 9 Feb 2002 07:13:24 -0000 1.23 +++ audio_out.h 17 Feb 2002 17:32:50 -0000 1.24 @@ -184,6 +184,7 @@ ao_driver_t *driver; metronom_t *metronom; + xine_t *xine; int audio_loop_running; int audio_paused; @@ -210,7 +211,7 @@ /* This initiates the audio_out sync routines * found in ./src/xine-engine/audio_out.c */ -ao_instance_t *ao_new_instance (ao_driver_t *driver, metronom_t *metronom, config_values_t *config) ; +ao_instance_t *ao_new_instance (ao_driver_t *driver, xine_t *xine) ; /* * to build a dynamic audio output plugin, * you have to implement these driver: Index: metronom.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/metronom.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- metronom.c 17 Feb 2002 15:53:28 -0000 1.55 +++ metronom.c 17 Feb 2002 17:32:50 -0000 1.56 @@ -50,7 +50,7 @@ #define METRONOM_REPORT /* -#define METRONOM_LOG +#define LOG */ /* @@ -239,7 +239,7 @@ pthread_mutex_unlock (&this->lock); -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: %lld pts per %d samples\n", pts_per_smpls, AUDIO_SAMPLE_NUM); #endif @@ -331,7 +331,7 @@ diff = pts - predicted_pts; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: got video pts %lld, predicted %lld (= %lld + %lld) => diff %lld\n", pts, predicted_pts, this->last_video_pts, duration, diff); #endif @@ -340,7 +340,7 @@ pts_discontinuity = 1; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: this is a video discontinuity\n"); #endif @@ -350,7 +350,7 @@ */ if( !this->video_discontinuity ) { pts = 0; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: not expecting a video discontinuity => ignored\n"); #endif } @@ -413,7 +413,7 @@ diff = this->video_vpts - vpts; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: video diff is %lld (predicted %lld, given %lld)\n", diff, this->video_vpts, vpts); #endif @@ -424,7 +424,7 @@ /* following line is useless (wrap_offset=wrap_offset) */ /* this->video_wrap_offset = vpts - pts; */ -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: video jump, wrap offset is now %lld\n", this->video_wrap_offset); #endif @@ -435,7 +435,7 @@ /* make wrap_offset consistent with the drift correction */ this->video_wrap_offset = this->video_vpts - pts; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: video drift, wrap offset is now %lld\n", this->video_wrap_offset); #endif @@ -448,7 +448,7 @@ img->vpts = this->video_vpts + this->av_offset; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: video vpts for %10lld : %10lld\n", pts, this->video_vpts); #endif @@ -495,7 +495,7 @@ int64_t vpts; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: got %d samples, pts is %lld, last_pts is %lld, diff = %lld\n", nsamples, pts, this->last_audio_pts, pts - this->last_audio_pts); #endif @@ -594,7 +594,7 @@ this->audio_vpts += nsamples * (this->audio_pts_delta + this->pts_per_smpls) / AUDIO_SAMPLE_NUM; this->num_audio_samples_guessed += nsamples; -#ifdef METRONOM_LOG +#ifdef LOG printf ("metronom: audio vpts for %10lld : %10lld\n", pts, vpts); #endif Index: video_decoder.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/video_decoder.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- video_decoder.c 9 Feb 2002 07:13:24 -0000 1.72 +++ video_decoder.c 17 Feb 2002 17:32:51 -0000 1.73 @@ -232,6 +232,9 @@ printf ("video_decoder: using decoder >%s< \n", decoder->get_identifier()); + + xine_log (this, XINE_LOG_FORMAT, "using video decoder plugin '%s'\n", + decoder->get_identifier()); } Index: video_out.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/video_out.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- video_out.c 17 Feb 2002 15:53:28 -0000 1.74 +++ video_out.c 17 Feb 2002 17:32:51 -0000 1.75 @@ -42,27 +42,27 @@ #ifdef __GNUC__ #define LOG_MSG_STDERR(xine, message, args...) { \ - xine_log(xine, XINE_LOG_VIDEO, message, ##args); \ + xine_log(xine, XINE_LOG_MSG, message, ##args); \ fprintf(stderr, message, ##args); \ } #define LOG_MSG(xine, message, args...) { \ - xine_log(xine, XINE_LOG_VIDEO, message, ##args); \ + xine_log(xine, XINE_LOG_MSG, message, ##args); \ printf(message, ##args); \ } #else #define LOG_MSG_STDERR(xine, ...) { \ - xine_log(xine, XINE_LOG_VIDEO, __VA_ARGS__); \ + xine_log(xine, XINE_LOG_MSG, __VA_ARGS__); \ fprintf(stderr, __VA_ARGS__); \ } #define LOG_MSG(xine, ...) { \ - xine_log(xine, XINE_LOG_VIDEO, __VA_ARGS__); \ + xine_log(xine, XINE_LOG_MSG, __VA_ARGS__); \ printf(__VA_ARGS__); \ } #endif - +/* #define LOG - +*/ #define NUM_FRAME_BUFFERS 15 Index: xine.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- xine.c 9 Feb 2002 07:13:24 -0000 1.103 +++ xine.c 17 Feb 2002 17:32:51 -0000 1.104 @@ -269,13 +269,13 @@ } int xine_play (xine_t *this, char *mrl, - int start_pos, int start_time) { + int start_pos, int start_time) { double share ; off_t pos, len; int i; - LOG_MSG(this, _("xine_play: xine open %s, start pos = %d, start time = %d (sec)\n"), + printf ("xine_play: xine open %s, start pos = %d, start time = %d (sec)\n", mrl, start_pos, start_time); pthread_mutex_lock (&this->xine_lock); @@ -323,9 +323,14 @@ return 0; } - LOG_MSG(this, _("xine: using input plugin >%s< for this MRL (%s).\n"), + printf ("xine: using input plugin >%s< for this MRL (%s).\n", this->cur_input_plugin->get_identifier(this->cur_input_plugin), mrl); + xine_log (this, XINE_LOG_FORMAT, + _("using input plugin '%s' for MRL '%s'\n"), + this->cur_input_plugin->get_identifier(this->cur_input_plugin), + mrl); + /* * find demuxer plugin */ @@ -337,9 +342,13 @@ return 0; } - LOG_MSG(this, _("xine: using demuxer plugin >%s< for this MRL.\n"), + printf ("xine: using demuxer plugin >%s< for this MRL.\n", this->cur_demuxer_plugin->get_identifier()); + xine_log (this, XINE_LOG_FORMAT, + _("system layer format '%s' detected.\n"), + this->cur_demuxer_plugin->get_identifier()); + /* * start demuxer */ @@ -511,7 +520,7 @@ update_osd_display, this ); if(ao) - this->audio_out = ao_new_instance (ao, this->metronom, config); + this->audio_out = ao_new_instance (ao, this); audio_decoder_init (this); @@ -854,13 +863,9 @@ const char **xine_get_log_names(void) { static const char *log_sections[XINE_LOG_NUM + 1]; - log_sections[XINE_LOG_MSG] = _("messages"); /* XINE_LOG_MSG */ - log_sections[XINE_LOG_INPUT] = _("inputs"); /* XINE_LOG_INPUT */ - log_sections[XINE_LOG_DEMUX] = _("demuxers"); /* XINE_LOG_DEMUX */ - log_sections[XINE_LOG_CODEC] = _("codecs"); /* XINE_LOG_CODEC */ - log_sections[XINE_LOG_VIDEO] = _("video"); /* XINE_LOG_VIDEO */ - log_sections[XINE_LOG_METRONOM] = _("metronom"); /* XINE_LOG_METRONOM */ - log_sections[XINE_LOG_PLUGIN] = _("plugin"); /* XINE_LOG_PLUGIN */ + log_sections[XINE_LOG_MSG] = _("messages"); + log_sections[XINE_LOG_FORMAT] = _("stream format"); + log_sections[XINE_LOG_PLUGIN] = _("plugin"); log_sections[XINE_LOG_NUM] = NULL; return log_sections; Index: xine_internal.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine_internal.h,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- xine_internal.h 6 Feb 2002 10:57:15 -0000 1.71 +++ xine_internal.h 17 Feb 2002 17:32:51 -0000 1.72 @@ -138,14 +138,10 @@ /* * log output */ -#define XINE_LOG_MSG 0 -#define XINE_LOG_INPUT 1 -#define XINE_LOG_DEMUX 2 -#define XINE_LOG_CODEC 3 -#define XINE_LOG_VIDEO 4 -#define XINE_LOG_METRONOM 5 -#define XINE_LOG_PLUGIN 6 -#define XINE_LOG_NUM 7 /* # of log buffers defined */ +#define XINE_LOG_MSG 0 /* warnings, errors, ... */ +#define XINE_LOG_FORMAT 1 /* stream format, decoders, video size... */ +#define XINE_LOG_PLUGIN 2 +#define XINE_LOG_NUM 3 /* # of log buffers defined */ typedef void (*xine_event_listener_t) (void *user_data, xine_event_t *); |