gstreamer: baseparse: add getcaps function
sebastian.droege at collabora.co.uk
Wed Nov 16 14:33:16 PST 2011
On Mi, 2011-11-16 at 19:28 -0300, Thiago Sousa Santos wrote:
> > > >
> > > > 2) Consider a parser and downstream requests parsed=true on the caps.
> > > > gst_pad_proxy_getcaps() will propagate the parsed=true field to the
> > > > sinkpad caps and if upstream provides unparsed input negotiation will
> > > > fail again.
> > >
> > > I guess removing parsed/framed entries on caps can be added as a default
> > > handling on baseparse.
> > >
> > >
> > > The other option is to revert that patch and add a getcaps to all
> > > parsers as the default getcaps gets the templatecaps. Template caps
> > > won't have any other downstream restrictions on width/height/framerate
> > > propagated.
> > I think to be really backwards compatible we have to always return the
> > template caps if the subclass didn't implement a getcaps function
> > (instead of using gst_pad_proxy_getcaps()). In 0.11 we could change that
> > to do something more clever and requiring subclasses to implement the
> > getcaps function though.
> > Nonetheless it makes sense to implement the getcaps function in 0.10 for
> > all existing parsers to propagate the downstream caps.
> I agree, let's revert that patch and add getcaps manually to our
> parsers. Maybe we could add a generic getcaps convenience function on
> baseparse that parsers could point to for a default implementation to
> avoid replicating code. Might be enough for the ones that won't do
I'd leave the ::get_sink_caps() vfunc in baseparse but change the code
to not call gst_pad_proxy_getcaps() if it isn't implemented but instead
just return the template caps.
No need to revert anything anywhere... I hope :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel