cuda,d3d11,d3d12bufferpool: Disable preallocation

Do not chain up to parent's GstBufferPool::start() which will do
preallocation. We don't want it to be preallocated
since there are various cases where negotiated downstream buffer pool is
not used at all (e.g., zero-copy decoding, IPC elements).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6326>
This commit is contained in:
Seungha Yang 2024-03-12 00:45:15 +09:00 committed by GStreamer Marge Bot
parent edb7b787d8
commit c9aaf39279
3 changed files with 1 additions and 35 deletions

View file

@ -211,7 +211,7 @@ gst_cuda_buffer_pool_start (GstBufferPool * pool)
return FALSE;
}
return GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
return TRUE;
}
static gboolean

View file

@ -362,7 +362,6 @@ gst_d3d11_buffer_pool_start (GstBufferPool * pool)
GstD3D11BufferPool *self = GST_D3D11_BUFFER_POOL (pool);
GstD3D11BufferPoolPrivate *priv = self->priv;
guint i;
gboolean ret;
GST_DEBUG_OBJECT (self, "Start");
@ -378,22 +377,6 @@ gst_d3d11_buffer_pool_start (GstBufferPool * pool)
}
}
ret = GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
if (!ret) {
GST_ERROR_OBJECT (self, "Failed to start");
for (i = 0; i < G_N_ELEMENTS (priv->alloc); i++) {
GstD3D11Allocator *alloc = priv->alloc[i];
if (!alloc)
break;
gst_d3d11_allocator_set_active (alloc, FALSE);
}
return FALSE;
}
return TRUE;
}

View file

@ -324,7 +324,6 @@ gst_d3d12_buffer_pool_start (GstBufferPool * pool)
auto self = GST_D3D12_BUFFER_POOL (pool);
auto priv = self->priv;
guint i;
gboolean ret;
GST_DEBUG_OBJECT (self, "Start");
@ -340,22 +339,6 @@ gst_d3d12_buffer_pool_start (GstBufferPool * pool)
}
}
ret = GST_BUFFER_POOL_CLASS (parent_class)->start (pool);
if (!ret) {
GST_ERROR_OBJECT (self, "Failed to start");
for (i = 0; i < G_N_ELEMENTS (priv->alloc); i++) {
GstD3D12Allocator *alloc = priv->alloc[i];
if (!alloc)
break;
gst_d3d12_allocator_set_active (alloc, FALSE);
}
return FALSE;
}
return TRUE;
}