I can see that methods exist for iterating over the GstElement's within a bin... but for any given GstElement is there are way to programatically determine if it is in fact a bin?
All GstElements are derived from the GLib GObject type, so the GLib G_OBJECT_TYPE() macro can be used to check the type:
if (G_OBJECT_TYPE(element) == GST_TYPE_BIN) ...
Even simpler is to use the convenience macros that are declared in gstbin.h:
if (GST_IS_BIN(element)) ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With