mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
kmssink: Do not drain if imported buffer are from KMS
This adds a check to avoid draining when the imported buffers are in fact own by kmssink. This happens since we export our kms buffer as DMABuf. They are not really imported back as we pre-fill the cache, but uses the same format as if they were external. This fixes performance issues seen with videocrop2-test (found in -good).
This commit is contained in:
parent
8574154cc8
commit
80b599c81b
1 changed files with 8 additions and 2 deletions
|
@ -1717,8 +1717,6 @@ gst_kms_sink_drain (GstKMSSink * self)
|
|||
{
|
||||
GstParentBufferMeta *parent_meta;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "draining");
|
||||
|
||||
if (!self->last_buffer)
|
||||
return;
|
||||
|
||||
|
@ -1728,6 +1726,14 @@ gst_kms_sink_drain (GstKMSSink * self)
|
|||
if (parent_meta) {
|
||||
GstBuffer *dumb_buf, *last_buf;
|
||||
|
||||
/* If this was imported from our dumb buffer pool we can safely skip the
|
||||
* drain */
|
||||
if (parent_meta->buffer->pool &&
|
||||
GST_IS_KMS_BUFFER_POOL (parent_meta->buffer->pool))
|
||||
return;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "draining");
|
||||
|
||||
dumb_buf = gst_kms_sink_copy_to_dumb_buffer (self, &self->last_vinfo,
|
||||
parent_meta->buffer);
|
||||
last_buf = self->last_buffer;
|
||||
|
|
Loading…
Reference in a new issue