summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-27 00:05:54 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-27 00:05:54 +0200
commitc372b52a77b20b454c49d5368a7d1afbc1a23188 (patch)
tree7d4bd448fba9ad54676749d644b1ecc6cb4640bb /src/pulsecore
parentcab48d48d12b26ef5651a5dc829fc7296395ef0a (diff)
protocol-native: print more volume change debug messages to easy tracking down of feedback loops
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/protocol-native.c26
-rw-r--r--src/pulsecore/protocol-native.h2
2 files changed, 21 insertions, 7 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 98ff407c..956767ad 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -3386,10 +3386,10 @@ static void command_set_volume(
pa_log_debug("Client %s changes volume of sink %s.", client_name, sink->name);
pa_sink_set_volume(sink, &volume, TRUE, TRUE);
} else if (source) {
- pa_log_debug("Client %s changes volume of sink %s.", client_name, source->name);
+ pa_log_debug("Client %s changes volume of source %s.", client_name, source->name);
pa_source_set_volume(source, &volume, TRUE);
} else if (si) {
- pa_log_debug("Client %s changes volume of sink %s.",
+ pa_log_debug("Client %s changes volume of sink input %s.",
client_name,
pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
pa_sink_input_set_volume(si, &volume, TRUE, TRUE);
@@ -3411,7 +3411,7 @@ static void command_set_mute(
pa_sink *sink = NULL;
pa_source *source = NULL;
pa_sink_input *si = NULL;
- const char *name = NULL;
+ const char *name = NULL, *client_name;
pa_native_connection_assert_ref(c);
pa_assert(t);
@@ -3460,12 +3460,20 @@ static void command_set_mute(
CHECK_VALIDITY(c->pstream, si || sink || source, tag, PA_ERR_NOENTITY);
- if (sink)
+ client_name = pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_PROCESS_BINARY));
+
+ if (sink) {
+ pa_log_debug("Client %s changes mute of sink %s.", client_name, sink->name);
pa_sink_set_mute(sink, mute, TRUE);
- else if (source)
+ } else if (source) {
+ pa_log_debug("Client %s changes mute of source %s.", client_name, source->name);
pa_source_set_mute(source, mute, TRUE);
- else if (si)
+ } else if (si) {
+ pa_log_debug("Client %s changes mute of sink input %s.",
+ client_name,
+ pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
pa_sink_input_set_mute(si, mute, TRUE);
+ }
pa_pstream_send_simple_ack(c->pstream, tag);
}
@@ -4843,3 +4851,9 @@ pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c) {
return c->pstream;
}
+
+pa_client* pa_native_connection_get_client(pa_native_connection *c) {
+ pa_native_connection_assert_ref(c);
+
+ return c->client;
+}
diff --git a/src/pulsecore/protocol-native.h b/src/pulsecore/protocol-native.h
index 8a8d601c..97126274 100644
--- a/src/pulsecore/protocol-native.h
+++ b/src/pulsecore/protocol-native.h
@@ -47,7 +47,6 @@ typedef struct pa_native_options {
char *auth_group;
pa_ip_acl *auth_ip_acl;
pa_auth_cookie *auth_cookie;
-
} pa_native_options;
typedef enum pa_native_hook {
@@ -80,6 +79,7 @@ int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_nativ
void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m);
pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c);
+pa_client* pa_native_connection_get_client(pa_native_connection *c);
pa_native_options* pa_native_options_new(void);
pa_native_options* pa_native_options_ref(pa_native_options *o);