After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744406 - Enhance the GST_QUERY_CAPS handling.
Enhance the GST_QUERY_CAPS handling.
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 743569
 
 
Reported: 2015-02-12 16:36 UTC by Víctor Manuel Jáquez Leal
Modified: 2015-03-06 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapidecode: intersect filter from query caps (3.31 KB, patch)
2015-02-12 16:36 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapidecode: use the query virtual methods in 1.4 (11.87 KB, patch)
2015-02-12 16:36 UTC, Víctor Manuel Jáquez Leal
needs-work Details | Review
vaapidecode: use the query virtual methods in 1.4 (12.13 KB, patch)
2015-02-18 17:50 UTC, Víctor Manuel Jáquez Leal
none Details | Review
vaapidecode: use the query virtual methods in 1.4 (11.71 KB, patch)
2015-02-20 12:56 UTC, Víctor Manuel Jáquez Leal
none Details | Review
vaapidecode: use the query virtual methods in 1.4 (8.39 KB, patch)
2015-03-03 11:35 UTC, Víctor Manuel Jáquez Leal
accepted-commit_now Details | Review

Description Víctor Manuel Jáquez Leal 2015-02-12 16:36:47 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
Comment 1 Víctor Manuel Jáquez Leal 2015-02-12 16:36:53 UTC
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
Comment 2 Víctor Manuel Jáquez Leal 2015-02-12 16:36:58 UTC
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.
Comment 3 Víctor Manuel Jáquez Leal 2015-02-12 16:38:46 UTC
Adding slomo if he could shed a light on this :)
Comment 4 sreerenj 2015-02-17 13:50:28 UTC
Did you test it with GStreamer-1.2??
Just want to make sure that we are not breaking compatibility with older versions.
Comment 5 Víctor Manuel Jáquez Leal 2015-02-17 14:37:59 UTC
(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
Comment 6 sreerenj 2015-02-18 08:29:34 UTC
Failing in 1.2 !
Comment 7 sreerenj 2015-02-18 11:43:47 UTC
Review of attachment 296687 [details] [review]:

Pushed, thanks
Comment 8 sreerenj 2015-02-18 11:44:18 UTC
Review of attachment 296688 [details] [review]:

Failing against 1.2
Comment 9 Víctor Manuel Jáquez Leal 2015-02-18 17:50:31 UTC
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.
Comment 10 Víctor Manuel Jáquez Leal 2015-02-20 12:56:25 UTC
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.
Comment 11 Víctor Manuel Jáquez Leal 2015-02-20 12:59:43 UTC
(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.
Comment 12 Víctor Manuel Jáquez Leal 2015-03-03 11:35:26 UTC
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
Comment 13 sreerenj 2015-03-06 13:23:18 UTC
Review of attachment 298414 [details] [review]:

LGTM
Comment 14 sreerenj 2015-03-06 16:09:32 UTC
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