[gst-devel] GstPadTemplate and element details changes in CVS

Jan Schmidt thaytan at mad.scientist.com
Tue Feb 5 12:38:09 CET 2008

<quote who="Michael Smith">

> On Mon, 2008-02-04 at 19:54 +0100, Sebastian Dröge wrote:
> > So the question is what to do about this 3 open issues. We could either
> > say that a) is an unsupported hack and people should properly design
> > their stuff, fix b) in core and declare pad template instances as
> > immutable and c) say that this behaviour is a bug and only worked
> > properly before by accident.
> > 
> > Or we could revert the changes and keep everything as is until 0.11.
> I think (a) should be considered a hack, that just sounds horrid. And we
> should fix it in our sources. However, it does work, and we do do it.
> Likewise (b) and (c) - we have plugins doing this stuff, so it's
> unreasonable to assume that nobody else does.
> API/ABI stability is something we tout as a major benefit of using gstreamer. 
> Breaking it should not be an option (it can happen accidently; we're not perfect)
> Just like the many other not-quite-ideal bits of API, this change should
> be marked as an intended change for 0.11, and we should do it then.
> That's my 2 cents, anyway :-)

As usual, I agree with everything Mike says. Our goal with ABI/API stability
is that you should always be able to upgrade GStreamer core and base and
existing elements continue to work without re-compiling, even if those
elements are relying on reasonable-but-accidental behaviour.

The only alternative I can offer is to consider the idea of a new variant
of gst_element_class_add_pad_template() to provide new semantics while
preserving the existing behaviour in the old function. The idea would then
be to move over elements explicitly and avoid breakage.

Another idea, add something to GstElementClass that allows sub-classes to 
signal which behaviour they want (flags or such), with the default being
the old behaviour of leaving an extra ref on the pad template.

I think it's fine to consider pad template's immutable, and document it
as such - at least the GstPadTemplate base-class portions. Obviously
sub-classes can do what they like with their private pieces.

Jan Schmidt                                    thaytan at noraisin.net

I had my head shaved while Kerri-Anne Kennerly was close enough to touch.
 - Peter Hardy

More information about the gstreamer-devel mailing list