mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
pipewiresink: trigger process() manually when in driver mode
When in driver mode (mode=provide), the process() function is never called. It needs to be triggered manually every now and then. This fixes starting a mode=provide sink, but it doesn't fix re-starting it... if the client disconnects while streaming, all buffers are getting filled up and the pool blocks in aqcuiring one more; when the client connects again, even if we signal the cond to unblock the pool, it still can't acquire any more buffers and deadlocks. Relates to: #1980
This commit is contained in:
parent
b6aeb1310c
commit
bf0ff347c1
1 changed files with 6 additions and 0 deletions
|
|
@ -495,7 +495,10 @@ on_state_changed (void *data, enum pw_stream_state old, enum pw_stream_state sta
|
||||||
case PW_STREAM_STATE_UNCONNECTED:
|
case PW_STREAM_STATE_UNCONNECTED:
|
||||||
case PW_STREAM_STATE_CONNECTING:
|
case PW_STREAM_STATE_CONNECTING:
|
||||||
case PW_STREAM_STATE_PAUSED:
|
case PW_STREAM_STATE_PAUSED:
|
||||||
|
break;
|
||||||
case PW_STREAM_STATE_STREAMING:
|
case PW_STREAM_STATE_STREAMING:
|
||||||
|
if (pw_stream_is_driving (pwsink->stream))
|
||||||
|
pw_stream_trigger_process (pwsink->stream);
|
||||||
break;
|
break;
|
||||||
case PW_STREAM_STATE_ERROR:
|
case PW_STREAM_STATE_ERROR:
|
||||||
GST_ELEMENT_ERROR (pwsink, RESOURCE, FAILED,
|
GST_ELEMENT_ERROR (pwsink, RESOURCE, FAILED,
|
||||||
|
|
@ -679,6 +682,9 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
if (unref_buffer)
|
if (unref_buffer)
|
||||||
gst_buffer_unref (buffer);
|
gst_buffer_unref (buffer);
|
||||||
|
|
||||||
|
if (pw_stream_is_driving (pwsink->stream))
|
||||||
|
pw_stream_trigger_process (pwsink->stream);
|
||||||
|
|
||||||
done_unlock:
|
done_unlock:
|
||||||
pw_thread_loop_unlock (pwsink->core->loop);
|
pw_thread_loop_unlock (pwsink->core->loop);
|
||||||
done:
|
done:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue