GNOME Bugzilla – Bug 565146
gnome-volume-control appears as input
Last modified: 2009-02-10 15:19:44 UTC
When the sound preferences are opened, the microphone appears in the notification area, because of the volume meter on the input tab. I don't think that that should count as a listening application that deserves to show the status icon.
Agree. Lennart, what is the best way to filter out monitors?
Check whether pa_source_info->monitor_of_sink is PA_INVALID_INDEX.
That doesn't help in this case. The stream that is causing this problem is a peak detect monitor created like this: s = pa_stream_new (context, _("Peak detect"), &ss, NULL); It doesn't seem like pa_stream_connect_record sets the monitor index.
Created attachment 127105 [details] [review] gvc-no-gvc-in-applet-input.patch This is pretty crude, but it works. What do you reckon?
Hmm, the stream name is supposed to be translated and stuff. Matching against that is not a good idea. In pavucontrol I set the PA_PROP_APPLICATION_ID property to "org.PulseAudio.pavucontrol" and then ignored all streams where that property is set. Use pa_context_new_with_proplist() and pass a pa_proplist object there with PA_PROP_APPLICATION_ID and PA_PROP_APPLICATION_NAME set. All streams created by a client inherit the properties of the client's context. Hence all peak detection streams will automaticlly inherit this property further on, and you you have t do is check it in pa_sink_input::proplist.
2009-02-10 Bastien Nocera <hadess@hadess.net> * src/gvc-applet.c (maybe_show_status_icons): * src/gvc-mixer-control.c (set_application_id_from_proplist), (update_sink_input), (update_source_output): * src/gvc-mixer-dialog.c (create_monitor_stream_for_source): * src/gvc-mixer-stream.c (gvc_mixer_stream_get_application_id), (gvc_mixer_stream_set_application_id), (gvc_mixer_stream_set_property), (gvc_mixer_stream_get_property), (gvc_mixer_stream_class_init), (gvc_mixer_stream_finalize): * src/gvc-mixer-stream.h: Set the org.gnome.VolumeControl application ID for the input peak monitor, and ignore it when checking whether an application is using the input. Also ignore Pavucontrol. Stops the microphone showing up in the applet when the capplet is running (Closes: #565146)