GNOME Bugzilla – Bug 744406
Enhance the GST_QUERY_CAPS handling.
Last modified: 2015-03-06 16:09:32 UTC
These two patches are sequencial. The first one (vaapidecode: intersect filter from query caps) enables the caps intersection with the received filter in the query, following the GST_QUERY_CAPS documentation, and also inspired on what is done in the v4l2videodec.c[1] The second patch is another iteration of the first patch but now using the {sink,src}_query virtual methods added in GstVideoDecoder in GStreamer 1.4 I did this in my research of bug 743687, though no change is perceived. 1. http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/sys/v4l2/gstv4l2videodec.c#n632
Created attachment 296687 [details] [review] vaapidecode: intersect filter from query caps According to documentation[1] when receiving a GST_QUERY_CAPS the return value should be all formats that this elements supports, taking into account limitations of peer elements further downstream or upstream, sorted by order of preference, highest preference first. This patch add those limitations intersecting with the received filter in the query. Also takes into account the already negotiated caps. Also adds the processing of the query on the SRC pad. 1. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-nego-getcaps.html
Created attachment 296688 [details] [review] vaapidecode: use the query virtual methods in 1.4 GstVideoDecoder, the base class of vaapidecode, added support for pad queries as virtual methods. This patch enables the use of that support, while (hopefully) keeping support for lower versions of gstreamer. This patch is important because GstVideoDecoder takes care of other queries that might be important in the pipeling managing.
Adding slomo if he could shed a light on this :)
Did you test it with GStreamer-1.2?? Just want to make sure that we are not breaking compatibility with older versions.
(In reply to sreerenj from comment #4) > Did you test it with GStreamer-1.2?? > Just want to make sure that we are not breaking compatibility with older > versions. Actually I did not. I think that the first approach (vaapidecode: intersect filter from query caps) might not break since it doesn't use new API. The second iteration certainly needs to be tested in gst-1.2
Failing in 1.2 !
Review of attachment 296687 [details] [review]: Pushed, thanks
Review of attachment 296688 [details] [review]: Failing against 1.2
Created attachment 297127 [details] [review] vaapidecode: use the query virtual methods in 1.4 GstVideoDecoder, the base class of vaapidecode, added support for pad queries as virtual methods. This patch enables the use of that support, while keeping support for lower versions of gstreamer. This patch is important because GstVideoDecoder takes care of other queries that might be important in the pipeline managing.
Created attachment 297389 [details] [review] vaapidecode: use the query virtual methods in 1.4 GstVideoDecoder, the base class of vaapidecode, added support for pad queries as virtual methods. This patch enables the use of that support, while keeping support for lower versions of gstreamer. This patch is important because GstVideoDecoder takes care of other queries that might be important in the pipeline managing.
(In reply to Víctor Manuel Jáquez Leal from comment #10) > Created attachment 297389 [details] [review] [review] > vaapidecode: use the query virtual methods in 1.4 This new upload is 1\ rebased with current master 2\ took care of 82e12a9 3\ it is tested with gstreamer 1.2 > > GstVideoDecoder, the base class of vaapidecode, added support for > pad queries as virtual methods. This patch enables the use of that > support, while keeping support for lower versions of gstreamer. > > This patch is important because GstVideoDecoder takes care of other > queries that might be important in the pipeline managing.
Created attachment 298414 [details] [review] vaapidecode: use the query virtual methods in 1.4 GstVideoDecoder, the base class of vaapidecode, added support for pad queries as virtual methods. This patch enables the use of that support, while keeping support for lower versions of gstreamer. This patch is important because GstVideoDecoder takes care of other queries that might be important in the pipeline managing. v2: 1) rebase to current master 2) fix indentation with gst-indent 3) simplify the patch layout 4) fix the context query 5) initialise the filter to NULL 6) improve the query log message for gst-1.2
Review of attachment 298414 [details] [review]: LGTM
Pushed, Thanks for the patch. commit 2f8c1159e34ee3e3215b932a87a8fc8047bbe79e Author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Date: Fri Mar 6 14:09:22 2015 +0200 vaapidecode: use the query virtual methods in 1.4 GstVideoDecoder, the base class of vaapidecode, added support for pad queries as virtual methods. This patch enables the use of that support, while keeping support for lower versions of gstreamer. This patch is important because GstVideoDecoder takes care of other queries that might be important in the pipeline managing. v2: 1) rebase to current master 2) fix indentation with gst-indent 3) simplify the patch layout 4) fix the context query 5) initialise the filter to NULL 6) improve the query log message for gst-1.2 https://bugzilla.gnome.org/show_bug.cgi?id=744406