gstreamer/gst/vaapi
Víctor Manuel Jáquez Leal 71d3ce4de2 plugins: upload meta only if feature and allocation
Working on bug #743687, I realized that vaapidecode always adds to its buffer
pool the config option GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META if
the decide_allocation()'s query has GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE.

Nevertheless, there are occasions where the query has the API type, but the
last negotiated caps don't have the feature meta:GstVideoGLTextureUploadMeta.

Under this contradiction, vaapidecode adds the GLTextureUploadMeta API to its
buffer pool configuration, and adds its buffer's meta to each output buffer,
even if the negotiated caps feature is memory:SystemMemory with I420 color
format.

This kind of output buffers chokes ClutterAutoVideosSink, since it uses a map
that relates caps <-> GL upload method. If it receives a buffer with color
format I420, it assumes that it doesn't have a texture upload meta, because
only those with RGB color format has it. Our buffers, with I420 format, say
that they have the upload meta too. In that case the mapped method is a dummy
one which does nothing. I reported this issue in bug #744039 (the patch,
obviously, was rejected).

This patch workarounds the problem: the buffer pool's configuration option
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META is set if and only if the
query has the GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE *and* the negotiated
caps feature is meta:GstVideoGLTextureUploadMeta.

I have tested these patches with gst-master (1.5), gst-1.4 and gst-1.2 and
in all they seem to work correctly.

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

[adapted to fit current EGL changes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2015-02-24 15:28:26 +01:00
..
gstvaapi.c plugins: Add VP8 Encoder 2015-02-13 13:45:32 +02:00
gstvaapidecode.c plugins: add support for BGRA textures. 2015-02-24 15:20:03 +01:00
gstvaapidecode.h plugins: factor out pad caps. 2013-12-18 16:38:57 +01:00
gstvaapidownload.c download: use GstVideoInfo facilities to build output caps. 2013-12-21 12:35:24 +01:00
gstvaapidownload.h plugins: add new base object, store display in there. 2013-12-18 16:38:57 +01:00
gstvaapiencode.c encode: Attach the codec-data to out caps only based on negotiated caps 2014-10-29 15:46:12 +02:00
gstvaapiencode.h encode: Attach the codec-data to out caps only based on negotiated caps 2014-10-29 15:46:12 +02:00
gstvaapiencode_h264.c encode: Attach the codec-data to out caps only based on negotiated caps 2014-10-29 15:46:12 +02:00
gstvaapiencode_h264.h legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
gstvaapiencode_jpeg.c plugins: Add JPEG encoder element 2015-02-04 11:18:29 +02:00
gstvaapiencode_jpeg.h plugins: Add JPEG encoder element 2015-02-04 11:18:29 +02:00
gstvaapiencode_mpeg2.c legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
gstvaapiencode_mpeg2.h legal: update copyright notice dates. 2014-01-22 19:02:35 +01:00
gstvaapiencode_vp8.c plugins: Add VP8 Encoder 2015-02-13 13:45:32 +02:00
gstvaapiencode_vp8.h plugins: Add VP8 Encoder 2015-02-13 13:45:32 +02:00
gstvaapiparse.c plugins: add built-in video parsers as "vaapiparse" element. 2014-06-13 17:17:07 +02:00
gstvaapiparse.h plugins: add built-in video parsers as "vaapiparse" element. 2014-06-13 17:17:07 +02:00
gstvaapipluginbase.c plugins: upload meta only if feature and allocation 2015-02-24 15:28:26 +01:00
gstvaapipluginbase.h plugins: ensure VA display matches GL context expectations. 2015-02-24 15:20:03 +01:00
gstvaapipluginutil.c plugins: add support for BGRA textures. 2015-02-24 15:20:03 +01:00
gstvaapipluginutil.h plugins: add support for BGRA textures. 2015-02-24 15:20:03 +01:00
gstvaapipostproc.c plugins: add support for BGRA textures. 2015-02-24 15:20:03 +01:00
gstvaapipostproc.h plugins: re-indent all video processing related source code. 2014-11-24 14:11:35 +01:00
gstvaapisink.c vaapisink: Protect the X11 API invokations with proper locking 2014-11-27 11:20:10 +02:00
gstvaapisink.h vaapisink: add support for GstColorBalance interface. 2014-07-31 18:49:55 +02:00
gstvaapiupload.c plugins: factor out pad caps. 2013-12-18 16:38:57 +01:00
gstvaapiupload.h plugins: add new base object, store display in there. 2013-12-18 16:38:57 +01:00
gstvaapiuploader.c videopool: add optional flags for surface pool allocation. 2015-01-27 18:11:45 +01:00
gstvaapiuploader.h plugins: re-indent all video processing related source code. 2014-11-24 14:11:35 +01:00
gstvaapivideobuffer.c display: refine the meaning of display type. 2015-01-27 18:11:44 +01:00
gstvaapivideobuffer.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideobufferpool.c plugins: add initial support for EGL. 2015-02-24 15:20:03 +01:00
gstvaapivideobufferpool.h plugins: add support for dma_buf exports (v4l2src). 2015-01-28 17:36:21 +01:00
gstvaapivideocontext.c plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideocontext.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideoconverter_glx.c texture: move to core libgstvaapi base library. 2015-01-27 18:11:44 +01:00
gstvaapivideoconverter_glx.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideoconverter_x11.c plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideoconverter_x11.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideomemory.c Fix compiler warnings 2015-02-18 11:46:11 +02:00
gstvaapivideomemory.h plugins: drop leftover declaration. 2015-01-28 18:09:40 +01:00
gstvaapivideometa.c plugins: ensure VA surface is current prior to using it. 2014-11-21 15:29:33 +01:00
gstvaapivideometa.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
gstvaapivideometa_texture.c plugins: add support for GstVideoGLTextureOrientation. 2015-02-24 15:20:03 +01:00
gstvaapivideometa_texture.h plugins: re-indent all GstVaapiVideo* related source code. 2014-08-22 15:54:32 +02:00
Makefile.am plugins: add initial support for EGL. 2015-02-24 15:20:03 +01:00