mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
va: postproc: Set one buffer in pools as minimum.
Because some elements, such as videorate check that minimum are different of maximum number of buffers in the proposed pool, since they might hold one or more buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2102>
This commit is contained in:
parent
ffa4d84e54
commit
316ddddc16
1 changed files with 5 additions and 4 deletions
|
@ -543,7 +543,7 @@ gst_va_vpp_propose_allocation (GstBaseTransform * trans,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pool = _create_sinkpad_bufferpool (caps, size, 0, 0, usage_hint, allocator,
|
pool = _create_sinkpad_bufferpool (caps, size, 1, 0, usage_hint, allocator,
|
||||||
¶ms);
|
¶ms);
|
||||||
if (!pool) {
|
if (!pool) {
|
||||||
gst_object_unref (allocator);
|
gst_object_unref (allocator);
|
||||||
|
@ -555,7 +555,7 @@ gst_va_vpp_propose_allocation (GstBaseTransform * trans,
|
||||||
else
|
else
|
||||||
gst_query_add_allocation_param (query, allocator, ¶ms);
|
gst_query_add_allocation_param (query, allocator, ¶ms);
|
||||||
|
|
||||||
gst_query_add_allocation_pool (query, pool, size, 0, 0);
|
gst_query_add_allocation_pool (query, pool, size, 1, 0);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self,
|
GST_DEBUG_OBJECT (self,
|
||||||
"proposing %" GST_PTR_FORMAT " with allocator %" GST_PTR_FORMAT,
|
"proposing %" GST_PTR_FORMAT " with allocator %" GST_PTR_FORMAT,
|
||||||
|
@ -649,7 +649,8 @@ gst_va_vpp_decide_allocation (GstBaseTransform * trans, GstQuery * query)
|
||||||
gst_video_info_init (&vinfo);
|
gst_video_info_init (&vinfo);
|
||||||
gst_video_info_from_caps (&vinfo, outcaps);
|
gst_video_info_from_caps (&vinfo, outcaps);
|
||||||
size = GST_VIDEO_INFO_SIZE (&vinfo);
|
size = GST_VIDEO_INFO_SIZE (&vinfo);
|
||||||
min = max = 0;
|
min = 1;
|
||||||
|
max = 0;
|
||||||
update_pool = FALSE;
|
update_pool = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1112,7 +1113,7 @@ _get_sinkpad_pool (GstVaVpp * self)
|
||||||
|
|
||||||
allocator = _create_allocator (self, self->incaps, usage_hint);
|
allocator = _create_allocator (self, self->incaps, usage_hint);
|
||||||
|
|
||||||
self->sinkpad_pool = _create_sinkpad_bufferpool (self->incaps, size, 0, 0,
|
self->sinkpad_pool = _create_sinkpad_bufferpool (self->incaps, size, 1, 0,
|
||||||
usage_hint, allocator, ¶ms);
|
usage_hint, allocator, ¶ms);
|
||||||
|
|
||||||
if (GST_IS_VA_DMABUF_ALLOCATOR (allocator)) {
|
if (GST_IS_VA_DMABUF_ALLOCATOR (allocator)) {
|
||||||
|
|
Loading…
Reference in a new issue