vaapidecode: use caps to check the features
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Wed, 14 Oct 2015 18:30:30 +0000 (20:30 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 20 Oct 2015 10:32:44 +0000 (12:32 +0200)
commit6d9f31e305d2c395bafd11c07d5a015f92bcd1b8
tree0e5e3fb34e37b2c400034525e361c3e65d6c8eed
parent45487fe87cc4dcc0c319701af0516ef6973794ec
vaapidecode: use caps to check the features

Instead of calling gst_vaapi_find_preferred_caps_feature(), which is
expensive, we check the caps from the allocation query, to check the
negotiated feature.

In order to do this verification a new utility function has been implemented:
gst_vaapi_caps_feature_contains().

As this new function shared its logic with gst_caps_has_vaapi_surface(), both
have been refactorized.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=756686
gst/vaapi/gstvaapidecode.c
gst/vaapi/gstvaapipluginutil.c
gst/vaapi/gstvaapipluginutil.h