From fe4ec03a4b44c97befdafebd20e00c62b6698a26 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 22 Aug 2021 00:33:58 +0900 Subject: d3d11bufferpool: Hide buffer_size field from header User can get the required buffer size by using buffer pool config. Since d3d11 implementation is a candidate for public library in the future, we need to hide everything from header as much as possible. Note that the total size of allocated d3d11 texture memory by GPU is not controllable factor. It depends on hardware specific alignment/padding requirement. So, GstD3D11 implementation updates actual buffer size by allocating D3D11 texture, since there's no way to get CPU accessible memory size without allocating real D3D11 texture. Part-of: --- gst-libs/gst/d3d11/gstd3d11bufferpool.cpp | 4 +--- gst-libs/gst/d3d11/gstd3d11bufferpool.h | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'gst-libs') diff --git a/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp b/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp index 903fb17fd..64336a14c 100644 --- a/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp +++ b/gst-libs/gst/d3d11/gstd3d11bufferpool.cpp @@ -307,10 +307,8 @@ gst_d3d11_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) priv->offset[1] = priv->stride[0] * desc[0].Height; } - self->buffer_size = offset; - gst_buffer_pool_config_set_params (config, - caps, self->buffer_size, min_buffers, max_buffers); + caps, offset, min_buffers, max_buffers); return GST_BUFFER_POOL_CLASS (parent_class)->set_config (pool, config) && ret; diff --git a/gst-libs/gst/d3d11/gstd3d11bufferpool.h b/gst-libs/gst/d3d11/gstd3d11bufferpool.h index e809000ea..114288ccf 100644 --- a/gst-libs/gst/d3d11/gstd3d11bufferpool.h +++ b/gst-libs/gst/d3d11/gstd3d11bufferpool.h @@ -41,9 +41,6 @@ struct _GstD3D11BufferPool GstD3D11Device *device; - /* re-calculated buffer size based on d3d11 pitch and stride */ - guint buffer_size; - /*< private >*/ GstD3D11BufferPoolPrivate *priv; -- cgit v1.2.1