[gst-devel] playbin volume

Johan Dahlin jdahlin at async.com.br
Tue Oct 10 15:15:31 CEST 2006


Christopher Backhouse wrote:
> Doh. Why is the first question I ask always a stupid one?
> I think a more helpful error would have been "incorrect type for 
> 'volume' (expected gdouble)" though
> How is this handled in bindings for languages which are somewhat fuzzy 
> on the whole integer/floating point thing? (specifically python)

It's handled using a type safe GValue conversion in language bindings.
g_object_set is just a convenience method for C which coverts the parameters
to the GValue's the properties expect.

It's not really possible to introspect argument type in runtime and the
compiler is not smart enough to tell you that the argument is wrong.

You could use g_object_set_property instead, but that's rather verbose in C.
Ah well.

-- 
Johan Dahlin <jdahlin at async.com.br>
Async Open Source




More information about the gstreamer-devel mailing list