GstUtils

GstUtils — Utility functions

Synopsis


#include <gst/gst.h>


void        gst_util_set_object_arg         (GObject *object,
                                             const gchar *name,
                                             const gchar *value);
void        gst_util_set_value_from_string  (GValue *value,
                                             const gchar *value_str);
gint        gst_util_get_int_arg            (GObject *object,
                                             const gchar *argname);
gboolean    gst_util_get_bool_arg           (GObject *object,
                                             const gchar *argname);
glong       gst_util_get_long_arg           (GObject *object,
                                             const gchar *argname);
gfloat      gst_util_get_float_arg          (GObject *object,
                                             const gchar *argname);
gdouble     gst_util_get_double_arg         (GObject *object,
                                             const gchar *argname);
const gchar* gst_util_get_string_arg        (GObject *object,
                                             const gchar *argname);
gpointer    gst_util_get_pointer_arg        (GObject *object,
                                             const gchar *argname);
gint64      gst_util_get_int64_arg          (GObject *object,
                                             const gchar *argname);
void        gst_util_dump_mem               (guchar *mem,
                                             guint size);
gboolean    gst_util_has_arg                (GObject *object,
                                             const gchar *argname,
                                             GType arg_type);
void        gst_print_element_args          (GString *buf,
                                             gint indent,
                                             GstElement *element);
void        gst_print_pad_caps              (GString *buf,
                                             gint indent,
                                             GstPad *pad);

Description

Some convenience functions

Details

gst_util_set_object_arg ()

void        gst_util_set_object_arg         (GObject *object,
                                             const gchar *name,
                                             const gchar *value);

Convertes the string value to the type of the objects argument and sets the argument with it.

object : the object to set the argument of
name : the name of the argument to set
value : the string value to set

gst_util_set_value_from_string ()

void        gst_util_set_value_from_string  (GValue *value,
                                             const gchar *value_str);

Converts the string to the type of the value and sets the value with it.

value : the value to set
value_str : the string to get the value from

gst_util_get_int_arg ()

gint        gst_util_get_int_arg            (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as an integer.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_bool_arg ()

gboolean    gst_util_get_bool_arg           (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a boolean.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_long_arg ()

glong       gst_util_get_long_arg           (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a long.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_float_arg ()

gfloat      gst_util_get_float_arg          (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a float.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_double_arg ()

gdouble     gst_util_get_double_arg         (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a double.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_string_arg ()

const gchar* gst_util_get_string_arg        (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a string.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_pointer_arg ()

gpointer    gst_util_get_pointer_arg        (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as a pointer.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_get_int64_arg ()

gint64      gst_util_get_int64_arg          (GObject *object,
                                             const gchar *argname);

Retrieves a property of an object as an int64.

object : the object to query
argname : the name of the argument
Returns : the property of the object

gst_util_dump_mem ()

void        gst_util_dump_mem               (guchar *mem,
                                             guint size);

Dumps the memory block into a hex representation. Useful for debugging.

mem : a pointer to the memory to dump
size : the size of the memory block to dump

gst_util_has_arg ()

gboolean    gst_util_has_arg                (GObject *object,
                                             const gchar *argname,
                                             GType arg_type);

Determines whether this object has a property of name argname and of type arg_type

object : an object
argname : a property it might have
arg_type : the type of the argument it should have
Returns : TRUE if it has the prop, else FALSE

gst_print_element_args ()

void        gst_print_element_args          (GString *buf,
                                             gint indent,
                                             GstElement *element);

Print the element argument in a human readable format in the given GString.

buf : the buffer to print the args in
indent : initial indentation
element : the element to print the args of

gst_print_pad_caps ()

void        gst_print_pad_caps              (GString *buf,
                                             gint indent,
                                             GstPad *pad);

Write the pad capabilities in a human readable format into the given GString.

buf : the buffer to print the caps in
indent : initial indentation
pad : the pad to print the caps from