[gst-devel] name suggestion for a new iface

Steve Baker steve at stevebaker.org
Wed Mar 23 13:36:40 CET 2005


> http://www.buzztard.org/index.php/Polyphonic_elemnts#Idea3:_child_objects
> company has contributed a nice idea to handle multichannel element in a
> quite
> generic way.

There seems to be a large overlap between GstParent and GstBin.  Why not
just add the required api to GstBin to give the same benefits as
GstParent? Then polyphonic/mixer elements can just subclass GstBin and
maybe implement a tiny interface to provide the rest of the functionality.

So we have:
get_child_by_name <=> gst_bin_get_by_name

child_added <=> element-added
child_removed <=> element-removed

Which means only the following needs to be implemented in GstBin, which
will be useful to all GStreamer apps anyway
gst_bin_get (GST_BIN(polyphonic_element), "voice3::note", &old_note, NULL);
gst_bin_set (GST_BIN(polyphonic_element), "voice3::note", new_note, NULL);


The only conceptual difference I see between GstParent and GstBin is that
GstParent will have its children arranged in parallel and GstBin can have
its children in any combination of serial and parallel.

So all we need now is an interface which says that this bin has its
children arranged in parallel and each child has some kind of explicit
position in the bin. Position would always go from 0 to
get_position_count-1. The interface could have a name like GstParallel.

GstObject * (* move_child_to_position) (GstParallel *parent, const gchar
*name, guint id);
GstObject * (* get_child_by_position) (GstParallel *parent, guint id);
guint (* get_position_count) (GstParallel *parent);

Or we could just put all this in GstBin too and subclasses can choose to
ignore the position stuff ;)

cheers





More information about the gstreamer-devel mailing list