vaapidecode: keep src caps and output state in sync
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Thu, 26 Feb 2015 10:28:02 +0000 (12:28 +0200)
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>
Thu, 26 Feb 2015 10:28:02 +0000 (12:28 +0200)
commit3d8e5e59a72aafc5d06917a3b22006278697a7d7
tree09c7be1d4c19655a6aebbc795b0cfc02e31bbf24
parente4f8d14979c4cdf18e5af5594ee02d59f3b3250b
vaapidecode: keep src caps and output state in sync

vaapidecode keeps an output state that use the format
GST_VIDEO_FORMAT_ENCODED, while it crafts a different src caps
for a correct negotiation.

I don't see the rational behind this decoupling, it looks like
unnecessary complexity. This patch simplify this logic keeping
in sync the output state and the src caps.

This patch improves the readability of the function
gst_vaapidecode_update_src_caps() and simplify its logic. Also,
the patch validates if the buffer pool has the configuration for
the GL texture upload meta, in order to set the caps feature
meta:GLTextureUpload. Otherwise, the I420 format is set back.

https://bugzilla.gnome.org/show_bug.cgi?id=744618

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
gst/vaapi/gstvaapidecode.c