va: allocator: create surfaces with VASurfaceAttribExternalBuffers
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 19 Aug 2020 14:45:49 +0000 (16:45 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 23 Sep 2020 16:19:22 +0000 (18:19 +0200)
commit482a7d7d7e4552488f952d456ca98df14cbddbd6
tree5d44148c246626b42aff3a8f4145c231429cb378
parentf306b1e0fec1223eb97967becf20379a43e4431f
va: allocator: create surfaces with VASurfaceAttribExternalBuffers

Add a new parameter to _create_surfaces(): a pointer to
VASurfaceAttribExternalBuffers.

If it's defined the memory type is changed to DRM_PRIME, also a new item is
added to the VASurfaceAttrib array with
VASurfaceAttribExternalBufferDescriptor.

Also, the VASurfaceAttrib for pixel format is not mandatory anymore. If fourcc
parameter is 0, is not added in the array, relying on the chroma. This is
useful when creating surfaces for uploading or downloading images.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1529>
sys/va/gstvaallocator.c