mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
Fix client-source negotiation and states
Avoid buffers without data. Handle stream state changes in gstpvsrc and gstpvsink Implement capabilities in v4l2 source
This commit is contained in:
parent
cbe7b52a70
commit
31cc37b6a5
5 changed files with 99 additions and 32 deletions
|
|
@ -257,6 +257,21 @@ gst_pulsevideo_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
|||
g_mutex_unlock (&pvsink->lock);
|
||||
|
||||
pv_stream_start (pvsink->stream, format, PV_STREAM_MODE_BUFFER);
|
||||
|
||||
g_mutex_lock (&pvsink->lock);
|
||||
while (TRUE) {
|
||||
PvStreamState state = pv_stream_get_state (pvsink->stream);
|
||||
|
||||
if (state == PV_STREAM_STATE_STREAMING)
|
||||
break;
|
||||
|
||||
if (state == PV_STREAM_STATE_ERROR)
|
||||
goto connect_error;
|
||||
|
||||
g_cond_wait (&pvsink->cond, &pvsink->lock);
|
||||
}
|
||||
g_mutex_unlock (&pvsink->lock);
|
||||
|
||||
pvsink->negotiated = TRUE;
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue