#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