mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -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
|
|
@ -186,7 +186,7 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, struct
|
|||
/* It might happen that a stream and a sink are set up at the
|
||||
same time, in which case we want to make sure we don't
|
||||
interfere with that */
|
||||
if (!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(si)))
|
||||
if (!PA_SINK_INPUT_IS_LINKED(si->state))
|
||||
continue;
|
||||
|
||||
if (!(role = pa_proplist_gets(si->proplist, PA_PROP_MEDIA_ROLE)))
|
||||
|
|
@ -236,7 +236,7 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
|
|||
/* It might happen that a stream and a source are set up at the
|
||||
same time, in which case we want to make sure we don't
|
||||
interfere with that */
|
||||
if (!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(so)))
|
||||
if (!PA_SOURCE_OUTPUT_IS_LINKED(so->state))
|
||||
continue;
|
||||
|
||||
if (!(role = pa_proplist_gets(so->proplist, PA_PROP_MEDIA_ROLE)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue