mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-13 13:30:05 -05:00
gst: pool add support for DONT_WAIT flag
This commit is contained in:
parent
4b56574ce0
commit
0347a753c9
1 changed files with 9 additions and 0 deletions
|
|
@ -180,6 +180,9 @@ acquire_buffer (GstBufferPool * pool, GstBuffer ** buffer,
|
|||
if ((b = pw_stream_dequeue_buffer(p->stream)))
|
||||
break;
|
||||
|
||||
if (params && (params->flags & GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT))
|
||||
goto no_more_buffers;
|
||||
|
||||
GST_WARNING ("queue empty");
|
||||
g_cond_wait (&p->cond, GST_OBJECT_GET_LOCK (pool));
|
||||
}
|
||||
|
|
@ -197,6 +200,12 @@ flushing:
|
|||
GST_OBJECT_UNLOCK (pool);
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
no_more_buffers:
|
||||
{
|
||||
GST_LOG_OBJECT (pool, "no more buffers");
|
||||
GST_OBJECT_UNLOCK (pool);
|
||||
return GST_FLOW_EOS;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue