mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -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
|
|
@ -471,7 +471,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;
|
||||
|
||||
if (state == PA_SOURCE_RUNNING) {
|
||||
|
|
@ -496,7 +496,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
if (state == PA_SINK_RUNNING) {
|
||||
|
|
@ -598,7 +598,7 @@ static void source_set_volume_cb(pa_source *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return;
|
||||
|
||||
pa_source_output_set_volume(u->source_output, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -612,7 +612,7 @@ static void sink_set_volume_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -627,7 +627,7 @@ static void source_get_volume_cb(pa_source *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return;
|
||||
|
||||
pa_source_output_get_volume(u->source_output, &v, true);
|
||||
|
|
@ -648,7 +648,7 @@ static void source_set_mute_cb(pa_source *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return;
|
||||
|
||||
pa_source_output_set_mute(u->source_output, s->muted, s->save_muted);
|
||||
|
|
@ -662,7 +662,7 @@ static void sink_set_mute_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
|
||||
|
|
@ -902,7 +902,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ static void route_sink_input(struct userdata *u, pa_sink_input *si) {
|
|||
/* 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))
|
||||
return;
|
||||
|
||||
if (!(role = pa_proplist_gets(si->proplist, PA_PROP_MEDIA_ROLE)))
|
||||
|
|
@ -746,7 +746,7 @@ static void route_source_output(struct userdata *u, pa_source_output *so) {
|
|||
/* 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))
|
||||
return;
|
||||
|
||||
if (!(role = pa_proplist_gets(so->proplist, PA_PROP_MEDIA_ROLE)))
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
|
||||
|
|
@ -344,7 +344,7 @@ static void sink_set_volume_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -358,7 +358,7 @@ static void sink_set_mute_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
|
||||
|
|
@ -453,7 +453,7 @@ static void sink_set_mute_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static int sink_set_state_in_main_thread(pa_sink *s, pa_sink_state_t state, pa_s
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1657,7 +1657,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 (!(name = pa_proplist_get_stream_group(si->proplist, "sink-input", IDENTIFICATION_PROPERTY)))
|
||||
|
|
@ -1710,7 +1710,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 (!(name = pa_proplist_get_stream_group(so->proplist, "source-output", IDENTIFICATION_PROPERTY)))
|
||||
|
|
|
|||
|
|
@ -215,14 +215,12 @@ static pa_hook_result_t sink_input_move_start_hook_cb(pa_core *c, pa_sink_input
|
|||
|
||||
static pa_hook_result_t sink_input_move_finish_hook_cb(pa_core *c, pa_sink_input *s, struct userdata *u) {
|
||||
struct device_info *d;
|
||||
pa_sink_input_state_t state;
|
||||
|
||||
pa_assert(c);
|
||||
pa_sink_input_assert_ref(s);
|
||||
pa_assert(u);
|
||||
|
||||
state = pa_sink_input_get_state(s);
|
||||
if (state != PA_SINK_INPUT_RUNNING)
|
||||
if (s->state != PA_SINK_INPUT_RUNNING)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if ((d = pa_hashmap_get(u->device_infos, s->sink)))
|
||||
|
|
@ -259,7 +257,7 @@ static pa_hook_result_t source_output_move_finish_hook_cb(pa_core *c, pa_source_
|
|||
pa_source_output_assert_ref(s);
|
||||
pa_assert(u);
|
||||
|
||||
if (pa_source_output_get_state(s) != PA_SOURCE_OUTPUT_RUNNING)
|
||||
if (s->state != PA_SOURCE_OUTPUT_RUNNING)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (s->source->monitor_of)
|
||||
|
|
@ -275,14 +273,12 @@ static pa_hook_result_t source_output_move_finish_hook_cb(pa_core *c, pa_source_
|
|||
|
||||
static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c, pa_sink_input *s, struct userdata *u) {
|
||||
struct device_info *d;
|
||||
pa_sink_input_state_t state;
|
||||
|
||||
pa_assert(c);
|
||||
pa_sink_input_assert_ref(s);
|
||||
pa_assert(u);
|
||||
|
||||
state = pa_sink_input_get_state(s);
|
||||
if (state == PA_SINK_INPUT_RUNNING && s->sink)
|
||||
if (s->state == PA_SINK_INPUT_RUNNING && s->sink)
|
||||
if ((d = pa_hashmap_get(u->device_infos, s->sink)))
|
||||
resume(d);
|
||||
|
||||
|
|
@ -294,7 +290,7 @@ static pa_hook_result_t source_output_state_changed_hook_cb(pa_core *c, pa_sourc
|
|||
pa_source_output_assert_ref(s);
|
||||
pa_assert(u);
|
||||
|
||||
if (pa_source_output_get_state(s) == PA_SOURCE_OUTPUT_RUNNING && s->source) {
|
||||
if (s->state == PA_SOURCE_OUTPUT_RUNNING && s->source) {
|
||||
struct device_info *d;
|
||||
|
||||
if (s->source->monitor_of)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
|
||||
|
|
@ -185,7 +185,7 @@ static void sink_set_volume_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -199,7 +199,7 @@ static void sink_set_mute_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
|
||||
|
|
|
|||
|
|
@ -201,7 +201,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);
|
||||
|
|
@ -233,7 +233,7 @@ static void source_set_volume_cb(pa_source *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return;
|
||||
|
||||
pa_source_output_set_volume(u->source_output, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -247,7 +247,7 @@ static void source_set_mute_cb(pa_source *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
|
||||
!PA_SOURCE_OUTPUT_IS_LINKED(u->source_output->state))
|
||||
return;
|
||||
|
||||
pa_source_output_set_mute(u->source_output, s->muted, s->save_muted);
|
||||
|
|
@ -264,7 +264,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static int sink_set_state_in_main_thread_cb(pa_sink *s, pa_sink_state_t state, p
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(state) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return 0;
|
||||
|
||||
pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
|
||||
|
|
@ -213,7 +213,7 @@ static void sink_set_volume_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_volume(u->sink_input, &s->real_volume, s->save_volume, true);
|
||||
|
|
@ -227,7 +227,7 @@ static void sink_set_mute_cb(pa_sink *s) {
|
|||
pa_assert_se(u = s->userdata);
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)) ||
|
||||
!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
|
||||
!PA_SINK_INPUT_IS_LINKED(u->sink_input->state))
|
||||
return;
|
||||
|
||||
pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ static const char *find_trigger_stream(struct userdata *u, pa_sink *s, pa_sink_i
|
|||
continue;
|
||||
|
||||
trigger_role = get_trigger_role(u, j, g);
|
||||
if (trigger_role && !j->muted && pa_sink_input_get_state(j) != PA_SINK_INPUT_CORKED)
|
||||
if (trigger_role && !j->muted && j->state != PA_SINK_INPUT_CORKED)
|
||||
return trigger_role;
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ static inline void apply_interaction_to_sink(struct userdata *u, pa_sink *s, con
|
|||
/* the application only after sink_input_put() was called. If a new stream turns */
|
||||
/* up, act as if it was not corked. In the case of module-role-cork this will */
|
||||
/* only mute the stream because corking is reverted later by the application */
|
||||
corked = (pa_sink_input_get_state(j) == PA_SINK_INPUT_CORKED);
|
||||
corked = (j->state == PA_SINK_INPUT_CORKED);
|
||||
if (new_stream && corked)
|
||||
corked = false;
|
||||
interaction_applied = !!pa_hashmap_get(g->interaction_state, j);
|
||||
|
|
@ -227,7 +227,7 @@ static void remove_interactions(struct userdata *u, struct group *g) {
|
|||
for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx_input)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx_input))) {
|
||||
|
||||
if(!!pa_hashmap_get(g->interaction_state, j)) {
|
||||
corked = (pa_sink_input_get_state(j) == PA_SINK_INPUT_CORKED);
|
||||
corked = (j->state == PA_SINK_INPUT_CORKED);
|
||||
if (!(role = pa_proplist_gets(j->proplist, PA_PROP_MEDIA_ROLE)))
|
||||
role = "no_role";
|
||||
uncork_or_unduck(u, j, role, corked, g);
|
||||
|
|
@ -289,7 +289,7 @@ static pa_hook_result_t sink_input_state_changed_cb(pa_core *core, pa_sink_input
|
|||
pa_core_assert_ref(core);
|
||||
pa_sink_input_assert_ref(i);
|
||||
|
||||
if (PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(i)) && get_trigger_role(u, i, NULL))
|
||||
if (PA_SINK_INPUT_IS_LINKED(i->state) && get_trigger_role(u, i, NULL))
|
||||
return process(u, i, true, false);
|
||||
|
||||
return PA_HOOK_OK;
|
||||
|
|
@ -299,7 +299,7 @@ static pa_hook_result_t sink_input_mute_changed_cb(pa_core *core, pa_sink_input
|
|||
pa_core_assert_ref(core);
|
||||
pa_sink_input_assert_ref(i);
|
||||
|
||||
if (PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(i)) && get_trigger_role(u, i, NULL))
|
||||
if (PA_SINK_INPUT_IS_LINKED(i->state) && get_trigger_role(u, i, NULL))
|
||||
return process(u, i, true, false);
|
||||
|
||||
return PA_HOOK_OK;
|
||||
|
|
@ -309,7 +309,7 @@ static pa_hook_result_t sink_input_proplist_changed_cb(pa_core *core, pa_sink_in
|
|||
pa_core_assert_ref(core);
|
||||
pa_sink_input_assert_ref(i);
|
||||
|
||||
if (PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(i)))
|
||||
if (PA_SINK_INPUT_IS_LINKED(i->state))
|
||||
return process(u, i, true, false);
|
||||
|
||||
return PA_HOOK_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue