[gst-devel] linking pads (was: wingo gstreamer: gstreamer/ gstreamer/gst/)
Benjamin Otte
in7y118 at public.uni-hamburg.de
Thu Mar 11 09:01:44 CET 2004
Quoting David Schleef <ds at schleef.org>:
> gst_pad_can_link() is used in several places (internally) where it would
> nice to have a fast function. pad_can_link() currently isn't very fast,
> since it calls pad->getcaps(), which it often recursive and expensive.
> There were more important things to think about at the time, but I
> realized it would be nice to have multiple layers of can_link(), each
> being more expensive than the previous. And (at least right now), they
> should be called gst_pad_can_probably_link(), to indicate that the link
> could still fail.
>
It's fine for me if it just checks templates. But it should check at least
those.
I don't think we need more levels then this and actually linking though.
Because everything else depends on the states of the elements you try to link
anyway.
> Most application code does not check gst_pad_can_link() before linking
> pads. It's rather silly to have to check if you can do something
> before doing something, when the latter can just as easily return
> an error.
>
Most applications use gst_element_link_many which does not tell you where it
failed and does auto pad detection. I think it's a good idea to require more
checks deeper down the code path.
But I don't really care either.
Benjamin
More information about the gstreamer-devel
mailing list