mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
sink-input, source-output: remove the state getters
pa_sink_input_get_state() and pa_source_output_get_state() just return the state variable. We can as well access the state variable directly. There are no behaviour changes, except that some filter sources accessed the main thread's state variable from their push() callbacks. I fixed them so that they use the thread_info.state variable instead.
This commit is contained in:
parent
64ba239f65
commit
b4a36453da
21 changed files with 57 additions and 81 deletions
|
|
@ -2456,22 +2456,18 @@ unsigned pa_sink_check_suspend(pa_sink *s, pa_sink_input *ignore_input, pa_sourc
|
|||
ret = 0;
|
||||
|
||||
PA_IDXSET_FOREACH(i, s->inputs, idx) {
|
||||
pa_sink_input_state_t st;
|
||||
|
||||
if (i == ignore_input)
|
||||
continue;
|
||||
|
||||
st = pa_sink_input_get_state(i);
|
||||
|
||||
/* We do not assert here. It is perfectly valid for a sink input to
|
||||
* be in the INIT state (i.e. created, marked done but not yet put)
|
||||
* and we should not care if it's unlinked as it won't contribute
|
||||
* towards our busy status.
|
||||
*/
|
||||
if (!PA_SINK_INPUT_IS_LINKED(st))
|
||||
if (!PA_SINK_INPUT_IS_LINKED(i->state))
|
||||
continue;
|
||||
|
||||
if (st == PA_SINK_INPUT_CORKED)
|
||||
if (i->state == PA_SINK_INPUT_CORKED)
|
||||
continue;
|
||||
|
||||
if (i->flags & PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue