mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
gst/gst.override: Only display the filename and not the full path
Original commit message from CVS: * gst/gst.override: (pygst_debug_log): Only display the filename and not the full path
This commit is contained in:
parent
762b581fcb
commit
1a39bca0ea
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-08-11 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gst.override: (pygst_debug_log):
|
||||||
|
Only display the filename and not the full path
|
||||||
|
|
||||||
2005-08-10 Edward Hervey <edward@fluendo.com>
|
2005-08-10 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* gst/gstmodule.c: (init_gst):
|
* gst/gstmodule.c: (init_gst):
|
||||||
|
|
|
@ -236,10 +236,12 @@ pygst_debug_log (PyObject *whatever, PyObject *string, GstDebugLevel level)
|
||||||
|
|
||||||
frame = PyEval_GetFrame();
|
frame = PyEval_GetFrame();
|
||||||
function = PyString_AsString(frame->f_code->co_name);
|
function = PyString_AsString(frame->f_code->co_name);
|
||||||
filename = PyString_AsString(frame->f_code->co_filename);
|
filename = g_path_get_basename(PyString_AsString(frame->f_code->co_filename));
|
||||||
lineno = frame->f_code->co_firstlineno;
|
lineno = frame->f_code->co_firstlineno;
|
||||||
/* gst_debug_log : category, level, file, function, line, object, format, va_list */
|
/* gst_debug_log : category, level, file, function, line, object, format, va_list */
|
||||||
gst_debug_log (GST_CAT_DEFAULT, level, filename, function, lineno, NULL, "%s", str);
|
gst_debug_log (GST_CAT_DEFAULT, level, filename, function, lineno, NULL, "%s", str);
|
||||||
|
if (filename)
|
||||||
|
g_free(filename);
|
||||||
Py_INCREF (Py_None);
|
Py_INCREF (Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue