d3d11: Implement memory pool
authorSeungha Yang <seungha@centricular.com>
Thu, 18 Mar 2021 13:31:55 +0000 (22:31 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 24 Mar 2021 15:44:42 +0000 (15:44 +0000)
commit39b9f79e11670b9628c64f3eccf41e7147ff28d0
treed0d606cdd11cd9a6ec91a7a563f7e29b9d795db3
parent4e7e390cabe4fb2724a74997d2960b1de489f21d
d3d11: Implement memory pool

Major changes:
* GstD3D11Allocator: This allocator is now device-independent object
  which can allocate GstD3D11Memory object for any GstD3D11Device.
  User can get this object via gst_allocator_find(GST_D3D11_MEMORY_NAME)
* GstD3D11PoolAllocator: A new allocator implementation for texture pool.
  From now on GstD3D11BufferPool will make use of this memory pool allocator
  to avoid frequent texture reallocation. That usually happens because
  of buffer copy (gst_buffer_make_writable for example)

In addition to that, GstD3D11BufferPool will provide GstBuffer with
GstVideoMeta, because CPU access to a GstD3D11Memory without GstVideoMeta
is almost impossible since GPU drivers needs padding for stride alignment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2097>
gst-libs/gst/d3d11/gstd3d11_fwd.h
gst-libs/gst/d3d11/gstd3d11bufferpool.c
gst-libs/gst/d3d11/gstd3d11bufferpool.h
gst-libs/gst/d3d11/gstd3d11device.c
gst-libs/gst/d3d11/gstd3d11memory.c
gst-libs/gst/d3d11/gstd3d11memory.h
sys/d3d11/gstd3d11compositor.cpp
sys/d3d11/gstd3d11decoder.cpp
sys/d3d11/gstd3d11pluginutils.cpp
sys/d3d11/gstd3d11pluginutils.h