mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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,9 +793,13 @@ wait_started (GstPipeWireSrc *this)
|
|||
if (this->started)
|
||||
break;
|
||||
|
||||
if (pw_thread_loop_timed_wait_full (this->core->loop, &abstime) < 0) {
|
||||
state = PW_STREAM_STATE_ERROR;
|
||||
break;
|
||||
if (this->autoconnect) {
|
||||
if (pw_thread_loop_timed_wait_full (this->core->loop, &abstime) < 0) {
|
||||
state = PW_STREAM_STATE_ERROR;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
pw_thread_loop_wait (this->core->loop);
|
||||
}
|
||||
|
||||
prev_state = state;
|
||||
|
|
@ -923,8 +927,12 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
|
|||
if (pwsrc->negotiated)
|
||||
break;
|
||||
|
||||
if (pw_thread_loop_timed_wait_full (pwsrc->core->loop, &abstime) < 0)
|
||||
if (pwsrc->autoconnect) {
|
||||
if (pw_thread_loop_timed_wait_full (pwsrc->core->loop, &abstime) < 0)
|
||||
goto connect_error;
|
||||
} else {
|
||||
pw_thread_loop_wait (pwsrc->core->loop);
|
||||
}
|
||||
}
|
||||
caps = pwsrc->caps;
|
||||
pwsrc->caps = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue