summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-02-17 17:32:49 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-02-17 17:32:49 +0000
commit31c216d7c3195e7975040ceb5445f200db384c84 (patch)
treebd34b07ef3db8ab9dab46229c6289321eb12f324 /src/xine-engine
parent5106a372ebd84fda2e004541efebd7c366201efd (diff)
downloadxine-lib-31c216d7c3195e7975040ceb5445f200db384c84.tar.gz
xine-lib-31c216d7c3195e7975040ceb5445f200db384c84.tar.bz2
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. CVS patchset: 1503 CVS date: 2002/02/17 17:32:49
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_decoder.c8
-rw-r--r--src/xine-engine/audio_out.c21
-rw-r--r--src/xine-engine/audio_out.h5
-rw-r--r--src/xine-engine/metronom.c24
-rw-r--r--src/xine-engine/video_decoder.c5
-rw-r--r--src/xine-engine/video_out.c14
-rw-r--r--src/xine-engine/xine.c31
-rw-r--r--src/xine-engine/xine_internal.h14
8 files changed, 68 insertions, 54 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 169919f2b..7f73ebbc1 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.58 2002/02/09 07:13:24 guenter Exp $
+ * $Id: audio_decoder.c,v 1.59 2002/02/17 17:32:50 guenter Exp $
*
*
* functions that implement audio decoding
@@ -212,8 +212,12 @@ void *audio_decoder_loop (void *this_gen) {
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);
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 2eca26b8f..1ab098f6a 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.40 2002/02/09 07:13:24 guenter Exp $
+ * $Id: audio_out.c,v 1.41 2002/02/17 17:32:50 guenter Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -389,6 +389,10 @@ static int ao_open(ao_instance_t *this,
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 @@ static int ao_set_property (ao_instance_t *this, int property, int value) {
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;
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index 23e987560..d864be464 100644
--- a/src/xine-engine/audio_out.h
+++ b/src/xine-engine/audio_out.h
@@ -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_out.h,v 1.23 2002/02/09 07:13:24 guenter Exp $
+ * $Id: audio_out.h,v 1.24 2002/02/17 17:32:50 guenter Exp $
*/
#ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H
@@ -184,6 +184,7 @@ struct ao_instance_s {
ao_driver_t *driver;
metronom_t *metronom;
+ xine_t *xine;
int audio_loop_running;
int audio_paused;
@@ -210,7 +211,7 @@ struct ao_instance_s {
/* 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:
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c
index 2f3b127e0..7a04735c4 100644
--- a/src/xine-engine/metronom.c
+++ b/src/xine-engine/metronom.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: metronom.c,v 1.55 2002/02/17 15:53:28 guenter Exp $
+ * $Id: metronom.c,v 1.56 2002/02/17 17:32:50 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -50,7 +50,7 @@
#define METRONOM_REPORT
/*
-#define METRONOM_LOG
+#define LOG
*/
/*
@@ -239,7 +239,7 @@ static void metronom_set_audio_rate (metronom_t *this, int64_t pts_per_smpls) {
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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
pts_discontinuity = 1;
-#ifdef METRONOM_LOG
+#ifdef LOG
printf ("metronom: this is a video discontinuity\n");
#endif
@@ -350,7 +350,7 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
*/
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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
/* 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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
/* 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 @@ static void metronom_got_video_frame (metronom_t *this, vo_frame_t *img) {
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 @@ static int64_t metronom_got_audio_samples (metronom_t *this, int64_t pts,
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 @@ static int64_t metronom_got_audio_samples (metronom_t *this, int64_t pts,
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
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index d14467557..d8b55dbf9 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.72 2002/02/09 07:13:24 guenter Exp $
+ * $Id: video_decoder.c,v 1.73 2002/02/17 17:32:51 guenter Exp $
*
*/
@@ -232,6 +232,9 @@ void *video_decoder_loop (void *this_gen) {
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());
}
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 4e7d349a8..b864cb116 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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_out.c,v 1.74 2002/02/17 15:53:28 guenter Exp $
+ * $Id: video_out.c,v 1.75 2002/02/17 17:32:51 guenter Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -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
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 1329dde12..30d794119 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.103 2002/02/09 07:13:24 guenter Exp $
+ * $Id: xine.c,v 1.104 2002/02/17 17:32:51 guenter Exp $
*
* top-level xine functions
*
@@ -269,13 +269,13 @@ static int find_demuxer(xine_t *this, const char *MRL) {
}
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 @@ int xine_play (xine_t *this, char *mrl,
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 @@ int xine_play (xine_t *this, char *mrl,
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 @@ xine_t *xine_init (vo_driver_t *vo,
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 @@ unsigned int xine_get_log_section_count(void) {
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;
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 88f790fcd..1ce4135e2 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -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: xine_internal.h,v 1.71 2002/02/06 10:57:15 f1rmb Exp $
+ * $Id: xine_internal.h,v 1.72 2002/02/17 17:32:51 guenter Exp $
*
*/
@@ -138,14 +138,10 @@ struct audio_decoder_s {
/*
* 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 *);