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
|
|
@ -115,7 +115,7 @@ static int source_set_state_in_main_thread_cb(pa_source *s, pa_source_state_t st
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(state) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return 0;
|
||||
|
||||
pa_source_output_cork(u->source_output, state == PA_SOURCE_SUSPENDED);
|
||||
|
|
@ -152,7 +152,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
|
|||
if (!PA_SOURCE_IS_LINKED(u->source->thread_info.state))
|
||||
return;
|
||||
|
||||
if (!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output))) {
|
||||
if (!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->thread_info.state)) {
|
||||
pa_log("push when no link?");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue