mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
maintain a list of sink inputs/source outputs as part of the pa_client object
This commit is contained in:
parent
b6deb0cc4c
commit
344c934edb
5 changed files with 27 additions and 2 deletions
|
|
@ -223,6 +223,9 @@ pa_source_output* pa_source_output_new(
|
|||
pa_assert_se(pa_idxset_put(core->source_outputs, o, &o->index) == 0);
|
||||
pa_assert_se(pa_idxset_put(o->source->outputs, pa_source_output_ref(o), NULL) == 0);
|
||||
|
||||
if (o->client)
|
||||
pa_assert_se(pa_idxset_put(o->client->source_outputs, o, NULL) >= 0);
|
||||
|
||||
if (o->direct_on_input)
|
||||
pa_assert_se(pa_idxset_put(o->direct_on_input->direct_outputs, o, NULL) == 0);
|
||||
|
||||
|
|
@ -290,6 +293,9 @@ void pa_source_output_unlink(pa_source_output*o) {
|
|||
if (pa_idxset_remove_by_data(o->source->outputs, o, NULL))
|
||||
pa_source_output_unref(o);
|
||||
|
||||
if (o->client)
|
||||
pa_idxset_remove_by_data(o->client->source_outputs, o, NULL);
|
||||
|
||||
update_n_corked(o, PA_SOURCE_OUTPUT_UNLINKED);
|
||||
o->state = PA_SOURCE_OUTPUT_UNLINKED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue