summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-11-12 10:10:14 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-11-12 10:10:14 +0100
commitd2589baa3eb4877f30eec7623b9840b89adc3f58 (patch)
tree727a2a770b02de23104d0103631b46ca2455ccb9
parent50463137844747b0ec33d1d452ea597481adf2be (diff)
downloadpjctl-d2589baa3eb4877f30eec7623b9840b89adc3f58.zip
pjctl-d2589baa3eb4877f30eec7623b9840b89adc3f58.tar.gz
pjctl-d2589baa3eb4877f30eec7623b9840b89adc3f58.tar.bz2
Implement avmute response status display
-rw-r--r--src/pjctl.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/pjctl.c b/src/pjctl.c
index 2900297..2f2d8f1 100644
--- a/src/pjctl.c
+++ b/src/pjctl.c
@@ -354,7 +354,22 @@ avmute_response(struct pjctl *pjctl, struct queue_command *cmd,
if (ret == 1) {
printf("OK\n");
} else if (ret == 0) {
- printf("%c%c\n", param[0], param[1]);
+ if (strlen(param) != 2)
+ return;
+ switch (param[0]) {
+ case '1':
+ printf("video");
+ break;
+ case '2':
+ printf("audio");
+ break;
+ case '3':
+ printf("video & audio");
+ break;
+ }
+ printf(" mute ");
+
+ printf("%s\n", param[1] == '1' ? "on" : "off");
}
}