stream: don't call process() in Start in some cases

We only want to call process() from Start when we are not a driver and
not realtime.

When we are a driver, the user will need to call _trigger_process()
to kick things of.

When we are asked to schedule process from the realtime thread, we
need to wait until the RT thread is scheduled.

In all other cases we can call _process() from the mainloop so that
the RT thread has something to collect when it gets scheduled.
This commit is contained in:
Wim Taymans 2021-08-06 16:15:55 +02:00
parent b030a4e7da
commit 33d8f14e45

View file

@ -546,7 +546,7 @@ static int impl_send_command(void *object, const struct spa_command *command)
if (impl->direction == SPA_DIRECTION_INPUT) if (impl->direction == SPA_DIRECTION_INPUT)
impl->io->status = SPA_STATUS_NEED_DATA; impl->io->status = SPA_STATUS_NEED_DATA;
else else if (!impl->process_rt && !impl->driving)
call_process(impl); call_process(impl);
stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL); stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL);