[gst-devel] Re: [gst-cvs] thomasvs gstreamer: gstreamer/docs/random/ds/

Thomas Vander Stichele thomas at apestaart.org
Fri Jul 9 01:22:25 CEST 2004


On Thu, 2004-07-08 at 21:04, Ronald Bultje wrote:
> Hi,
> 
> On Thu, 8 Jul 2004, Thomas Vander Stichele wrote:
> > On Thu, 2004-07-08 at 19:30, Ronald Bultje wrote:
> > > On Thu, 8 Jul 2004, Thomas Vander Stichele wrote:
> > > > + - make gst_bin_get_list virtual so subclasses can override it (e.g.
> > > > +   gst-play which contains an internal thread not inside the bin that is
> > > > +   gstplay)
> > >
> > > Isn't that a gstplay bug? If it pretends to be a bin, it should behave
> > > like one.
> >
> [..]
> > There are other reasons why a bin should be able to virtualize this
> > function - if add and remove are virtualized, then so should get_list be
> > since a bin can very well chose to override add and remove in such a way
> > that they're not actually inside the bin.
> 
> Those are signallers, if I'm correct. So they're called to let the class
> know that a child was removed/added. The child class is required to call
> parent_class->add_element() in its own add_element() implementation, and
> the same goes for remove.
  /* vtable */
  void          (*add_element)          (GstBin *bin, GstElement
*element);
  void          (*remove_element)       (GstBin *bin, GstElement
*element);

these are the virtual functions.

  /* signals */
  void          (*element_added)        (GstBin *bin, GstElement
*child);
  void          (*element_removed)      (GstBin *bin, GstElement
*child);
                                                                                
these are the signal handlers.

Did I miss something ?

> Note that I'm not trying to be a pain, I'm just trying to explain why it
> works the way it does. ;).

Oh no, don't worry :) I like it when people explain their view on a
piece of code, helps me learn.


Thomas

Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Ooh child I'll meet you child
On the sunny side it's alright
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list