utils: remove unused gst_print_* functions

This commit is contained in:
Tim-Philipp Müller 2012-07-04 08:52:08 +01:00
parent 95f2cab053
commit 291403bbb9
4 changed files with 0 additions and 97 deletions

View file

@ -2897,8 +2897,6 @@ GFLOAT_TO_LE
gst_flow_get_name
gst_flow_to_quark
gst_print_element_args
gst_print_pad_caps
gst_guint64_to_gdouble
gst_gdouble_to_guint64
gst_util_dump_mem

View file

@ -735,96 +735,6 @@ gst_util_seqnum_compare (guint32 s1, guint32 s2)
#include "gstpad.h"
static void
string_append_indent (GString * str, gint count)
{
gint xx;
for (xx = 0; xx < count; xx++)
g_string_append_c (str, ' ');
}
/**
* gst_print_pad_caps:
* @buf: the buffer to print the caps in
* @indent: initial indentation
* @pad: (transfer none): the pad to print the caps from
*
* Write the pad capabilities in a human readable format into
* the given GString.
*/
void
gst_print_pad_caps (GString * buf, gint indent, GstPad * pad)
{
GstCaps *caps;
caps = gst_pad_get_current_caps (pad);
if (!caps) {
string_append_indent (buf, indent);
g_string_printf (buf, "%s:%s has no capabilities",
GST_DEBUG_PAD_NAME (pad));
} else {
char *s;
s = gst_caps_to_string (caps);
g_string_append (buf, s);
g_free (s);
gst_caps_unref (caps);
}
}
/**
* gst_print_element_args:
* @buf: the buffer to print the args in
* @indent: initial indentation
* @element: (transfer none): the element to print the args of
*
* Print the element argument in a human readable format in the given
* GString.
*/
void
gst_print_element_args (GString * buf, gint indent, GstElement * element)
{
guint width;
GValue value = { 0, }; /* the important thing is that value.type = 0 */
gchar *str = NULL;
GParamSpec *spec, **specs, **walk;
specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (element), NULL);
width = 0;
for (walk = specs; *walk; walk++) {
spec = *walk;
if (width < strlen (spec->name))
width = strlen (spec->name);
}
for (walk = specs; *walk; walk++) {
spec = *walk;
if (spec->flags & G_PARAM_READABLE) {
g_value_init (&value, spec->value_type);
g_object_get_property (G_OBJECT (element), spec->name, &value);
str = g_strdup_value_contents (&value);
g_value_unset (&value);
} else {
str = g_strdup ("Parameter not readable.");
}
string_append_indent (buf, indent);
g_string_append (buf, spec->name);
string_append_indent (buf, 2 + width - strlen (spec->name));
g_string_append (buf, str);
g_string_append_c (buf, '\n');
g_free (str);
}
g_free (specs);
}
/**
* gst_element_create_all_pads:
* @element: (transfer none): a #GstElement to create pads for

View file

@ -75,9 +75,6 @@ guint64 gst_util_uint64_scale_int_ceil (guint64 val, gint num, gint den
guint32 gst_util_seqnum_next (void);
gint32 gst_util_seqnum_compare (guint32 s1, guint32 s2);
void gst_print_pad_caps (GString *buf, gint indent, GstPad *pad);
void gst_print_element_args (GString *buf, gint indent, GstElement *element);
/**
* GST_CALL_PARENT:

View file

@ -818,8 +818,6 @@ EXPORTS
gst_preset_save_preset
gst_preset_set_app_dir
gst_preset_set_meta
gst_print_element_args
gst_print_pad_caps
gst_progress_type_get_type
gst_proxy_pad_chain_default
gst_proxy_pad_chain_list_default