summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 9780052ca..39bef61d8 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -2278,6 +2278,9 @@ void xine_log (xine_t *this, int buf, const char *format, ...) {
printf("%s", buffer);
va_end (argp);
}
+
+ if (this->log_cb)
+ this->log_cb (this->log_cb_user_data, buf);
}
void xine_vlog(xine_t *this, int buf, const char *format,
@@ -2286,6 +2289,9 @@ void xine_vlog(xine_t *this, int buf, const char *format,
check_log_alloc (this, buf);
this->log_buffers[buf]->scratch_printf(this->log_buffers[buf], format, args);
+
+ if (this->log_cb)
+ this->log_cb (this->log_cb_user_data, buf);
}
char *const *xine_get_log (xine_t *this, int buf) {
@@ -2299,6 +2305,11 @@ char *const *xine_get_log (xine_t *this, int buf) {
return NULL;
}
+void xine_register_log_cb (xine_t *this, xine_log_cb_t cb, void *user_data) {
+ this->log_cb = cb;
+ this->log_cb_user_data = user_data;
+}
+
int xine_get_error (xine_stream_t *stream) {
return stream->err;
}