mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
d3d11convert: Passthrough allocation query on same caps
Since d3d11convert and its variant elements does not enable basetransform's passthrough, passthrough allocation query needs to be handled manually in order to respect downstream element's min/max buffer requirement. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5255>
This commit is contained in:
parent
3db2159fc4
commit
1e381dc1cc
1 changed files with 12 additions and 1 deletions
|
@ -1312,6 +1312,7 @@ static gboolean
|
||||||
gst_d3d11_base_convert_propose_allocation (GstBaseTransform * trans,
|
gst_d3d11_base_convert_propose_allocation (GstBaseTransform * trans,
|
||||||
GstQuery * decide_query, GstQuery * query)
|
GstQuery * decide_query, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
GstD3D11BaseConvert *self = GST_D3D11_BASE_CONVERT (trans);
|
||||||
GstD3D11BaseFilter *filter = GST_D3D11_BASE_FILTER (trans);
|
GstD3D11BaseFilter *filter = GST_D3D11_BASE_FILTER (trans);
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
GstBufferPool *pool = NULL;
|
GstBufferPool *pool = NULL;
|
||||||
|
@ -1328,8 +1329,18 @@ gst_d3d11_base_convert_propose_allocation (GstBaseTransform * trans,
|
||||||
ID3D11Device *device_handle;
|
ID3D11Device *device_handle;
|
||||||
|
|
||||||
if (!GST_BASE_TRANSFORM_CLASS (parent_class)->propose_allocation (trans,
|
if (!GST_BASE_TRANSFORM_CLASS (parent_class)->propose_allocation (trans,
|
||||||
decide_query, query))
|
decide_query, query)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self->same_caps) {
|
||||||
|
if (!gst_pad_peer_query (trans->srcpad, query))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
gst_query_add_allocation_meta (query,
|
||||||
|
GST_VIDEO_CROP_META_API_TYPE, nullptr);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
gst_query_parse_allocation (query, &caps, NULL);
|
gst_query_parse_allocation (query, &caps, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue