Utility functions
while you can use the regular gtk_object_getv () function to
query the value of an object property, GStreamer
provides some easy wrappers for this common operation.
Instead of writing the following Gtk+ code to query the GTK_STRING value
of an object:
GtkArg arg;
guchar *value;
arg.name = argname;
gtk_object_getv (GTK_OBJECT (object), 1, &arg);
value = GTK_VALUE_STRING (arg);
You can also use:
value = gst_util_get_string_arg (object, argname);
These convenience functions exist for the following types:
gint: with gst_util_get_int_arg ();
gboolean: with gst_util_get_bool_arg ();
glong: with gst_util_get_long_arg ();
gfloat: with gst_util_get_float_arg ();
gdouble: with gst_util_get_double_arg ();
guchar*: with gst_util_get_string_arg ();
gpointer: with gst_util_get_pointer_arg ();
GtkWidget*: with gst_util_get_widget_arg ();
There is also another utility function that can be used to dump a block
of memory on the console. This function is very usefull for plugin
developers. The function will dump size bytes of the memory pointed
to by mem.
void gst_util_dump_mem(guchar *mem, guint size);