| GStreamer Core Reference Manual |
|---|
GstUtils — Utility functions
#include <gst/gst.h> void gst_util_set_object_arg (GObject *object, constgchar *name, constgchar *value); void gst_util_set_value_from_string (GValue *value, constgchar *value_str);gint gst_util_get_int_arg (GObject *object, constgchar *argname);gboolean gst_util_get_bool_arg (GObject *object, constgchar *argname);glong gst_util_get_long_arg (GObject *object, constgchar *argname);gfloat gst_util_get_float_arg (GObject *object, constgchar *argname);gdouble gst_util_get_double_arg (GObject *object, constgchar *argname); constgchar * gst_util_get_string_arg (GObject *object, constgchar *argname);gpointer gst_util_get_pointer_arg (GObject *object, constgchar *argname);gint64 gst_util_get_int64_arg (GObject *object, constgchar *argname); void gst_util_dump_mem (guchar *mem,guint size);gboolean gst_util_has_arg (GObject *object, constgchar *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);
Some convenience functions
void gst_util_set_object_arg (GObject *object, constgchar *name, constgchar *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 |
void gst_util_set_value_from_string (GValue *value, constgchar *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 |
gint gst_util_get_int_arg (GObject *object, constgchar *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 |
gboolean gst_util_get_bool_arg (GObject *object, constgchar *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 |
glong gst_util_get_long_arg (GObject *object, constgchar *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 |
gfloat gst_util_get_float_arg (GObject *object, constgchar *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 |
gdouble gst_util_get_double_arg (GObject *object, constgchar *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 |
constgchar * gst_util_get_string_arg (GObject *object, constgchar *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 |
gpointer gst_util_get_pointer_arg (GObject *object, constgchar *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 |
gint64 gst_util_get_int64_arg (GObject *object, constgchar *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 |
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 |
gboolean gst_util_has_arg (GObject *object, constgchar *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 |
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 |
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 |
| << GstTypeFactory | GstXML >> |