summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-08-22 00:33:58 +0900
committerSeungha Yang <seungha@centricular.com>2021-08-22 00:46:19 +0900
commitfe4ec03a4b44c97befdafebd20e00c62b6698a26 (patch)
tree2c837bba8ad3c58f928d2d51096495716a197c23 /gst-libs
parent1874206abd484ff13226caa81335669a53fa4074 (diff)
downloadgstreamer-plugins-bad-fe4ec03a4b44c97befdafebd20e00c62b6698a26.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2482>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/d3d11/gstd3d11bufferpool.cpp4
-rw-r--r--gst-libs/gst/d3d11/gstd3d11bufferpool.h3
2 files changed, 1 insertions, 6 deletions
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;