v4l2videoenc: replace custom QUERY_CAPS handling with getcaps callback
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 13 Jul 2023 14:16:44 +0000 (16:16 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 13 Jul 2023 22:07:27 +0000 (00:07 +0200)
commit2e5929abfc5f26bca3bf813918e1732f38322116
tree69a0b1abaded9e6173c93490669b03720c0a883c
parent825ac9a77e02967fd69fa8bb160547e35b8880ef
v4l2videoenc: replace custom QUERY_CAPS handling with getcaps callback

The videoencoder base class uses getcaps() to ask a subclass for the caps in its
sink_query_default() implementation.

Replace the custom handling of the QUERY_CAPS in the v4l2videoenc with an
implementation of getcaps() that returns the caps that are supported by the
v4l2videoenc to return these caps in the query.

This getcaps() implementation also calls the provided proxy_getcaps(), which
sends a caps query to downstream. This fixes the v4l2videoenc element to respect
limits of downstream elements in a sink query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5036>
subprojects/gst-plugins-good/sys/v4l2/gstv4l2videoenc.c