X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=audiod_command.c;h=da5a2dc5e882a4de2fe61152a6d0979f3dd04cf5;hb=672e27768e31a6eaa6854d4fc75ee6885db9abd8;hp=e57283cebe32a7dab6955f9d519b2752bd09e967;hpb=5440b8c0464829022a0ba5dd5daa931b15712a11;p=paraslash.git diff --git a/audiod_command.c b/audiod_command.c index e57283ce..da5a2dc5 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -16,7 +16,6 @@ #include "sched.h" #include "ggo.h" #include "filter.h" -#include "grab_client.cmdline.h" #include "grab_client.h" #include "error.h" @@ -214,68 +213,9 @@ int com_stat(int fd, int argc, char **argv) return ret; } -#if 0 -static struct filter_node *find_filter_node(int slot_num, int format, int filternum) +int com_grab(int fd, int argc, char **argv) { - int i; - - FOR_EACH_SLOT(i) { - struct slot_info *s = &slot[i]; - if (s->format < 0 || !s->fc) - continue; - if (slot_num >= 0 && slot_num != i) - continue; - if (format >= 0 && s->format != format) - continue; - if (num_filters(i) <= filternum) - continue; - /* success */ - return s->fc->filter_nodes + filternum; - } - return NULL; -} -#endif - -int com_grab(int fd, __a_unused int argc, __a_unused char **argv) -{ - client_write(fd, "grab is currently b0rken\n"); - close(fd); - return 1; -#if 0 - struct grab_client *gc; - struct filter_node *fn; - int i, err; - char *msg; - - gc = grab_client_new(fd, cmdline, &err); - if (!gc) - goto err_out; - fn = find_filter_node(gc->conf->slot_arg, gc->audio_format_num, gc->conf->filter_num_arg); - if (fn) - activate_grab_client(gc, fn); - return 1; -err_out: - if (err != -E_GC_HELP_GIVEN && err != -E_GC_VERSION_GIVEN) - return err; - if (err == -E_GC_HELP_GIVEN) { - msg = make_message("%s\n\n", grab_client_args_info_usage); - for (i = 0; grab_client_args_info_help[i]; i++) { - char *tmp = make_message("%s%s\n", msg, - grab_client_args_info_help[i]); - free(msg); - msg = tmp; - } - } else - msg = make_message("%s %s\n", - GRAB_CLIENT_CMDLINE_PARSER_PACKAGE, - GRAB_CLIENT_CMDLINE_PARSER_VERSION); - err = client_write(fd, msg); - free(msg); - if (err < 0) - return err; - close(fd); - return 1; -#endif + return grab_client_new(fd, argc, argv); } __noreturn int com_term(int fd, __a_unused int argc, __a_unused char **argv) @@ -390,6 +330,7 @@ out: } return ret; } + /** * Send the current audiod status to all connected stat clients. */