mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
gst/gstelement.c: also show file/line/func if no additional debug was given
Original commit message from CVS: * gst/gstelement.c: (gst_element_message_full): also show file/line/func if no additional debug was given
This commit is contained in:
parent
281eb4c00b
commit
93d14f9c64
2 changed files with 22 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-01-31 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst/gstelement.c: (gst_element_message_full):
|
||||||
|
also show file/line/func if no additional debug was given
|
||||||
|
|
||||||
2006-01-31 Sebastien Moutte <sebastien@moutte.net>
|
2006-01-31 Sebastien Moutte <sebastien@moutte.net>
|
||||||
|
|
||||||
* win32/vs7/grammar.vcproj:
|
* win32/vs7/grammar.vcproj:
|
||||||
|
|
|
@ -1451,10 +1451,11 @@ void gst_element_message_full
|
||||||
gchar *name;
|
gchar *name;
|
||||||
gchar *sent_text;
|
gchar *sent_text;
|
||||||
gchar *sent_debug;
|
gchar *sent_debug;
|
||||||
|
gboolean has_debug = TRUE;
|
||||||
GstMessage *message = NULL;
|
GstMessage *message = NULL;
|
||||||
|
|
||||||
/* checks */
|
/* checks */
|
||||||
GST_DEBUG ("start");
|
GST_DEBUG_OBJECT (element, "start");
|
||||||
g_return_if_fail (GST_IS_ELEMENT (element));
|
g_return_if_fail (GST_IS_ELEMENT (element));
|
||||||
g_return_if_fail ((type == GST_MESSAGE_ERROR) ||
|
g_return_if_fail ((type == GST_MESSAGE_ERROR) ||
|
||||||
(type == GST_MESSAGE_WARNING));
|
(type == GST_MESSAGE_WARNING));
|
||||||
|
@ -1470,13 +1471,17 @@ void gst_element_message_full
|
||||||
/* construct a sent_debug with extra information from source */
|
/* construct a sent_debug with extra information from source */
|
||||||
if ((debug == NULL) || (debug[0] == 0)) {
|
if ((debug == NULL) || (debug[0] == 0)) {
|
||||||
/* debug could have come from g_strdup_printf (""); */
|
/* debug could have come from g_strdup_printf (""); */
|
||||||
sent_debug = NULL;
|
has_debug = FALSE;
|
||||||
} else {
|
|
||||||
name = gst_object_get_path_string (GST_OBJECT (element));
|
|
||||||
sent_debug = g_strdup_printf ("%s(%d): %s: %s:\n%s",
|
|
||||||
file, line, function, name, debug ? debug : "");
|
|
||||||
g_free (name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
name = gst_object_get_path_string (GST_OBJECT (element));
|
||||||
|
if (has_debug)
|
||||||
|
sent_debug = g_strdup_printf ("%s(%d): %s (): %s:\n%s",
|
||||||
|
file, line, function, name, debug);
|
||||||
|
else
|
||||||
|
sent_debug = g_strdup_printf ("%s(%d): %s (): %s",
|
||||||
|
file, line, function, name);
|
||||||
|
g_free (name);
|
||||||
g_free (debug);
|
g_free (debug);
|
||||||
|
|
||||||
/* create gerror and post message */
|
/* create gerror and post message */
|
||||||
|
|
Loading…
Reference in a new issue