mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-01-02 11:08:39 -05:00
pactl: Separate stat and info actions
This commit is contained in:
parent
67760e3193
commit
8f25f8dc7d
1 changed files with 9 additions and 2 deletions
|
|
@ -90,6 +90,7 @@ static enum {
|
||||||
NONE,
|
NONE,
|
||||||
EXIT,
|
EXIT,
|
||||||
STAT,
|
STAT,
|
||||||
|
INFO,
|
||||||
UPLOAD_SAMPLE,
|
UPLOAD_SAMPLE,
|
||||||
PLAY_SAMPLE,
|
PLAY_SAMPLE,
|
||||||
REMOVE_SAMPLE,
|
REMOVE_SAMPLE,
|
||||||
|
|
@ -882,8 +883,10 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
||||||
case PA_CONTEXT_READY:
|
case PA_CONTEXT_READY:
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case STAT:
|
case STAT:
|
||||||
actions = 2;
|
|
||||||
pa_operation_unref(pa_context_stat(c, stat_callback, NULL));
|
pa_operation_unref(pa_context_stat(c, stat_callback, NULL));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case INFO:
|
||||||
pa_operation_unref(pa_context_get_server_info(c, get_server_info_callback, NULL));
|
pa_operation_unref(pa_context_get_server_info(c, get_server_info_callback, NULL));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1122,6 +1125,7 @@ static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flag
|
||||||
static void help(const char *argv0) {
|
static void help(const char *argv0) {
|
||||||
|
|
||||||
printf(_("%s [options] stat\n"
|
printf(_("%s [options] stat\n"
|
||||||
|
"%s [options] info\n"
|
||||||
"%s [options] list [TYPE]\n"
|
"%s [options] list [TYPE]\n"
|
||||||
"%s [options] exit\n"
|
"%s [options] exit\n"
|
||||||
"%s [options] upload-sample FILENAME [NAME]\n"
|
"%s [options] upload-sample FILENAME [NAME]\n"
|
||||||
|
|
@ -1151,7 +1155,7 @@ static void help(const char *argv0) {
|
||||||
argv0, argv0, argv0, argv0, argv0,
|
argv0, argv0, argv0, argv0, argv0,
|
||||||
argv0, argv0, argv0, argv0, argv0,
|
argv0, argv0, argv0, argv0, argv0,
|
||||||
argv0, argv0, argv0, argv0, argv0,
|
argv0, argv0, argv0, argv0, argv0,
|
||||||
argv0, argv0);
|
argv0, argv0, argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
@ -1224,6 +1228,9 @@ int main(int argc, char *argv[]) {
|
||||||
if (pa_streq(argv[optind], "stat"))
|
if (pa_streq(argv[optind], "stat"))
|
||||||
action = STAT;
|
action = STAT;
|
||||||
|
|
||||||
|
else if (pa_streq(argv[optind], "info"))
|
||||||
|
action = INFO;
|
||||||
|
|
||||||
else if (pa_streq(argv[optind], "exit"))
|
else if (pa_streq(argv[optind], "exit"))
|
||||||
action = EXIT;
|
action = EXIT;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue