summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2014-12-21 14:12:29 +0100
committerStefan Sauer <ensonic@users.sf.net>2014-12-21 14:15:54 +0100
commitef4910b9e601c3baf706b4757a1ef22d71d32516 (patch)
treeeb54443b4542e4b3899ea083375b5aa84b29ee07 /gst
parenta536c62ed650fdeb4b7c223d0ee58ed49e8ca503 (diff)
debugutils: use a constant for the max param length
Improve readability by using a define for the max-chars. Also use the unicode ellipsis as dot files are utf-8.
Diffstat (limited to 'gst')
-rw-r--r--gst/gstdebugutils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c
index 02a7456b8..4e5dcd2f9 100644
--- a/gst/gstdebugutils.c
+++ b/gst/gstdebugutils.c
@@ -56,6 +56,8 @@
extern const gchar *priv_gst_dump_dot_dir; /* NULL *//* set from gst.c */
+#define PARAM_MAX_LENGTH 80
+
const gchar spaces[] = {
" " /* 32 */
" " /* 64 */
@@ -123,8 +125,8 @@ debug_dump_get_element_params (GstElement * element,
/* too long, ellipsize */
if (!(details & GST_DEBUG_GRAPH_SHOW_FULL_PARAMS) &&
- strlen (value_str) > 80)
- ellipses = "...";
+ strlen (value_str) > PARAM_MAX_LENGTH)
+ ellipses = "…";
else
ellipses = "";
@@ -137,7 +139,8 @@ debug_dump_get_element_params (GstElement * element,
param_name = g_strdup_printf ("%s\\n%s=%s", tmp, property->name,
value_str);
} else {
- param_name = g_strdup_printf ("%s\\n%s=%.80s%s", tmp, property->name,
+ param_name = g_strdup_printf ("%s\\n%s=%."
+ G_STRINGIFY (PARAM_MAX_LENGTH) "s%s", tmp, property->name,
value_str, ellipses);
}