diff options
-rw-r--r-- | include/xine.h.tmpl.in | 4 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 17 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 4 |
3 files changed, 20 insertions, 5 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in index 6f9aed543..674ef21b1 100644 --- a/include/xine.h.tmpl.in +++ b/include/xine.h.tmpl.in @@ -28,7 +28,7 @@ \endverbatim */ /* - * $Id: xine.h.tmpl.in,v 1.65 2001/12/10 00:11:06 f1rmb Exp $ + * $Id: xine.h.tmpl.in,v 1.66 2001/12/13 00:52:01 f1rmb Exp $ * */ @@ -1689,6 +1689,8 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *self); #define XINE_LOG_CODEC 1 #define XINE_LOG_NUM 2 /* # of log buffers defined */ +const char **xine_get_log_names(void); + void xine_log (xine_t *self, int buf, const char *format, ...); char **xine_get_log (xine_t *self, int buf); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 717adb033..79ea1142f 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.88 2001/12/09 18:03:26 guenter Exp $ + * $Id: xine.c,v 1.89 2001/12/13 00:52:01 f1rmb Exp $ * * top-level xine functions * @@ -803,6 +803,15 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this) { /* * log functions */ +const char **xine_get_log_names(void) { + static const char *log_sections[XINE_LOG_NUM + 1] = { + "messages", /* XINE_LOG_MSG */ + "codecs", /* XINE_LOG_CODEC */ + NULL + }; + + return log_sections; +} void xine_log (xine_t *this, int buf, const char *format, ...) { @@ -816,9 +825,11 @@ void xine_log (xine_t *this, int buf, const char *format, ...) { } char **xine_get_log (xine_t *this, int buf) { - + + if(buf >= XINE_LOG_NUM) + return NULL; + return this->log_buffers[buf]->get_content (this->log_buffers[buf]); - } int xine_get_error (xine_t *this) { diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index c091cbb61..34f10e16b 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.63 2001/12/11 15:30:06 miguelfreitas Exp $ + * $Id: xine_internal.h,v 1.64 2001/12/13 00:52:01 f1rmb Exp $ * */ @@ -589,6 +589,8 @@ osd_renderer_t *xine_get_osd_renderer (xine_t *this); * xine log functions */ +const char **xine_get_log_names(void); + void xine_log (xine_t *this, int buf, const char *format, ...); char **xine_get_log (xine_t *this, int buf); |