From 4d8b4c8dd38f727fb0229fcacc9c883ad6a4f022 Mon Sep 17 00:00:00 2001 From: Laszlo Pandy Date: Sat, 11 Apr 2009 16:58:25 +0200 Subject: [PATCH] debug: Implement gst.debug_log. Fixes #571380 --- gst/gst.override | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/gst/gst.override b/gst/gst.override index 70b3fa2..d4f65a6 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -302,7 +302,6 @@ ignore gst_error_get_message gst_parse_launchv gst_trace_read_tsc - gst_debug_log gst_debug_log_default gst_iterator_new_list gst_task_set_lock @@ -742,6 +741,33 @@ _wrap_gst_flow_get_name(PyObject *self, PyObject *args, PyObject *kwargs) } %% +override gst_debug_log args +static PyObject * +_wrap_gst_debug_log (PyObject *whatever, PyObject *string) +{ +#ifndef GST_DISABLE_GST_DEBUG + gchar *filename; + gchar *func; + gint lineno; + gchar *message; + + PyObject *py_level = NULL; + GstDebugLevel level; + + if (!PyArg_ParseTuple(string, "Ossis:gst.debug_log", &py_level, &filename, &func, &lineno, &message)) { + return NULL; + } + if (pyg_enum_get_value(GST_TYPE_DEBUG_LEVEL, py_level, (gint *)&level)) { + return NULL; + } + + /* gst_debug_log : category, level, file, function, line, object, format, va_list */ + gst_debug_log (python_debug, level, filename, func, lineno, NULL, "%s", message); +#endif + Py_INCREF (Py_None); + return Py_None; +} +%% override gst_log args static PyObject * _wrap_gst_log (PyObject *whatever, PyObject *string) -- 2.7.4