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?
CodePudding user response:
All GstElement
s 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)) ...