mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
gst: remove timeouts when autoconnect=false
When we disable autoconnect, disable the timeouts as well. Otherwise the user has to connect the stream within the 30 second timeout or get a failure. With autoconnect we can reasonably assume there is a problem when the stream is not connected after 30 seconds. Fixes #3884
This commit is contained in:
parent
06f63f489a
commit
0f14cc3b13
1 changed files with 12 additions and 4 deletions
|
|
@ -793,10 +793,14 @@ wait_started (GstPipeWireSrc *this)
|
||||||
if (this->started)
|
if (this->started)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (this->autoconnect) {
|
||||||
if (pw_thread_loop_timed_wait_full (this->core->loop, &abstime) < 0) {
|
if (pw_thread_loop_timed_wait_full (this->core->loop, &abstime) < 0) {
|
||||||
state = PW_STREAM_STATE_ERROR;
|
state = PW_STREAM_STATE_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
pw_thread_loop_wait (this->core->loop);
|
||||||
|
}
|
||||||
|
|
||||||
prev_state = state;
|
prev_state = state;
|
||||||
}
|
}
|
||||||
|
|
@ -923,8 +927,12 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
||||||
if (pwsrc->negotiated)
|
if (pwsrc->negotiated)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (pwsrc->autoconnect) {
|
||||||
if (pw_thread_loop_timed_wait_full (pwsrc->core->loop, &abstime) < 0)
|
if (pw_thread_loop_timed_wait_full (pwsrc->core->loop, &abstime) < 0)
|
||||||
goto connect_error;
|
goto connect_error;
|
||||||
|
} else {
|
||||||
|
pw_thread_loop_wait (pwsrc->core->loop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
caps = pwsrc->caps;
|
caps = pwsrc->caps;
|
||||||
pwsrc->caps = NULL;
|
pwsrc->caps = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue