[gst-devel] Re: [gst-cvs] company gstreamer: gstreamer/ gstreamer/gst/elements/
ds at schleef.org
Tue Dec 23 12:25:01 CET 2003
On Tue, Dec 23, 2003 at 10:02:49AM +0100, Ronald Bultje wrote:
> On Mon, 2003-12-22 at 20:10, Benjamin Otte wrote:
> > * gst/elements/gstshaper.c: (gst_shaper_getcaps):
> > Fix proxying to new CAPS stuff. Don't call get_allowed_caps but
> > gst_caps (peer).
> Talking about this, I had to apply the same change to ffcolorspace some
> time ago. Is this right? I mean, isn't get_allowed_caps (pad) supposed
> to automate get_caps (peer) without us checking for peer != NULL etc.?
> Shouldn't we fix get_allowed_caps (pad)?
Elements should call gst_pad_get_allowed_caps(pad) to determine what
formats "pad" can be set to. This takes into account the pad's
template/getcaps, the peer's template/getcaps, and the filter caps
for the link. I can't think of a reason why an element should ever
call gst_pad_get_caps() on a peer's pad. (It might be slightly useful
on its own pad, and would be useful on a child's pad.)
There should be very few cases where an element needs to know about
the peer pad. If you see such usage, let me know so we can discuss
whether this is appropriate. Bufferpools was one such example, but
that's fixed now.
More information about the gstreamer-devel