[gst-devel] Re: [gst-cvs] company gstreamer: gstreamer/ gstreamer/gst/

Andy Wingo wingo at pobox.com
Tue Jul 6 07:59:07 CEST 2004


Hey Benjamin,

I was headed out for the weekend when I got your mail on Friday. I still
haven't had time to look at the patch -- I'm still just relying on the
description. This reply is predicated on me understanding it correctly
without having seen it :-/

On Fri, 02 Jul 2004, Benjamin Otte wrote:

> On Fri, 2 Jul 2004, Andy Wingo wrote:
> 
> > I'd like to echo this. Soundscrape relies on linking elements outside of
> > bins. Aside from the fact that it would be difficult to implement it any
> > other way, the change breaks apps in a stable series. These checks are
> > scheduling checks, and as such should probably be done by the scheduler.
> > In any case, please revert :-)
> >
> Please fix soundscrape to not do this anyway as it's broken behaviour.

Even if it is in fact broken behaviour, it has been allowed and even
shown in example code since the 0.2 days. A stable series is not the
time to change it ;)

> If you think it's not broken behaviour to have one part of a link
> in one scheduler and the other part in another or no scheduler, please
> enlighten me how we should check this.

Oh no, I think it's broken, if I understand you correctly. But linking
pads when the elements are not in a scheduler is pretty important,
because it is this facility that allows the creation of composite
elements that are under a gstbin. gstbins don't actually do anything,
scheduling-wise -- they are just a useful abstraction, like composite
gtk widgets.

Thus, it is a useful idiom to encapsulate element creation within a
function, e.g. create_my_complicated_element(), and then add it to a
bin. Of course, the element can only be added to another if it isn't a
managing bin. Also, as it is being added, one side of a link will make
it in before the other side, so there will be a point at which the state
is inconsistent. The scheduler just has to deal with that. (The opt
scheduler does so via activated/disabled groups and chains.)

> It's not that I'm proud of this patch or something but I don't want this
> broken behaviour.

I think the scheduler is the proper place to check this, either during
a state change, or as it runs if the scheduler allows that. I think opt
handles this right, but I'm not up-to-date now (although I'll get back
to gst soon.)

Make any sense?

Wingo.




More information about the gstreamer-devel mailing list