mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
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/6345>
This commit is contained in:
parent
89041ad29d
commit
44d4eb096d
3 changed files with 1 additions and 35 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue