Go to file
Pauli Virtanen f3806ad5df mixer-control: remove objects properly when reconnecting to PA
GvcMixerCards are not removed when reconnecting to PA server, which
causes duplicate card entries to appear on PA restart.  Moreover, the
old GvcMixerCard instances have pointers to the old already freed
pa_context, resulting to use-after-free on operations.  Duplicate
entries are also caused by sink/source removal on reconnect not sending
right signals.

Make it clean up all Gvc objects as if we got subscribe remove events
for them all:

Use remove_sink/remove_source to remove sinks/sources so that the right
signals are emitted. Remove cards using remove_card, so that also they
get cleaned up. Remove also any leftover GvcMixerUIDevices.

Move cleanup of streams etc. before pa_context unref, so that we free
the objects referring the pa_context before freeing the context.

This fixes gnome-control-center crashing when PA server is restarted,
and one e.g. tries to do something that ends up in
gvc_mixer_card_change_profile such as selecting output device with port
in different profile.  It also fixes duplicate entries appearing in the
device lists on Pipewire restart (they don't appear with Pulseaudio
since PA device IDs don't change on restart).

It should also fix similar crashes in gnome-shell.
2023-07-13 20:45:00 +03:00
.gitlab-ci ci: Use meson for CI build 2019-11-22 19:37:31 +01:00
.gitignore build: ignore .dirstamp file 2020-04-09 13:53:36 +00:00
.gitlab-ci.yml ci: Use meson for CI build 2019-11-22 19:37:31 +01:00
gvc-channel-map-private.h Initial import 2012-10-19 20:00:25 +02:00
gvc-channel-map.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-channel-map.h Initial import 2012-10-19 20:00:25 +02:00
gvc-mixer-card-private.h Initial import 2012-10-19 20:00:25 +02:00
gvc-mixer-card.c Add missing allow-none annotations 2019-03-18 10:58:36 +13:00
gvc-mixer-card.h Add a GIcon accessor for GvcMixerUIDevices 2013-02-18 14:39:54 +01:00
gvc-mixer-control-private.h Initial import 2012-10-19 20:00:25 +02:00
gvc-mixer-control.c mixer-control: remove objects properly when reconnecting to PA 2023-07-13 20:45:00 +03:00
gvc-mixer-control.h gvc: Add "what did you plug in" support API 2016-01-17 18:34:07 -02:00
gvc-mixer-event-role.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-mixer-event-role.h Initial import 2012-10-19 20:00:25 +02:00
gvc-mixer-sink-input.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-mixer-sink-input.h Fix introspection support 2012-10-19 20:00:47 +02:00
gvc-mixer-sink.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-mixer-sink.h Fix introspection support 2012-10-19 20:00:47 +02:00
gvc-mixer-source-output.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-mixer-source-output.h Fix introspection support 2012-10-19 20:00:47 +02:00
gvc-mixer-source.c avoid deprecated g_type_class_add_private 2018-09-09 00:02:41 +03:00
gvc-mixer-source.h Fix introspection support 2012-10-19 20:00:47 +02:00
gvc-mixer-stream-private.h Initial import 2012-10-19 20:00:25 +02:00
gvc-mixer-stream.c mixer-control: Expose stream state 2019-11-23 02:42:51 +01:00
gvc-mixer-stream.h mixer-control: Expose stream state 2019-11-23 02:42:51 +01:00
gvc-mixer-ui-device.c Add missing guards for inputs to functions 2019-03-18 10:58:36 +13:00
gvc-mixer-ui-device.h gvc-mixer-ui-device: make stream-id unsigned int 2015-09-09 14:14:15 +03:00
gvc-pulseaudio-fake.h build: Don't limit pulseaudio-fake header to introspection 2019-11-23 02:42:51 +01:00
libgnome-volume-control.doap Comment invalid <category> in DOAP file to pass git pre-receive hook 2018-12-16 01:22:53 +01:00
meson_options.txt build: Rename build options 2018-01-30 13:15:36 +01:00
meson.build build: Bump pulseaudio dependency 2020-04-09 12:14:25 +02:00
README.md README: Add README 2018-09-07 15:31:39 +02:00
test-audio-device-selection.c test-audio-device-selection: fix -Wdiscarded-qualifiers warnings 2020-04-09 13:53:36 +00:00

libgnome-volume-control

libgnome-volume-control is a copy library that's supposed to be used as a git sub-module. If your project uses some of libgnome-volume-control's strings in a user-facing manner, don't forget to add those files to your POTFILES.in for translation.

Projects using libgnome-volume-control