#include "error.h"
#include "string.h"
-
-/** this maps the enum to the text used at the command line */
-static const char *gc_modes[] = {
- [GRAB_PEDANTIC] = "pedantic",
- [GRAB_SLOPPY] = "sloppy",
- [GRAB_AGGRESSIVE] = "aggressive",
- NULL
-};
-
/** grab clients that are not yet attached to a filter node */
struct list_head inactive_grab_client_list;
{
int i;
struct grab_client_args_info *conf = gc->conf;
+ char **mv = grab_client_cmdline_parser_mode_values;
PARA_INFO_LOG("filter_num: %d\n", gc->conf->filter_num_arg);
- for (i = 0; gc_modes[i]; i++)
- if (!strcmp(conf->mode_arg, gc_modes[i]))
+ for (i = 0; mv[i]; i++)
+ if (!strcmp(conf->mode_arg, mv[i]))
break;
- if (!gc_modes[i])
- return -E_INVALID_GRAB_MODE;
gc->mode = i;
if (conf->audio_format_given) {
gc->audio_format_num = get_audio_format_num(conf->audio_format_arg);
*err = -E_GC_HELP_GIVEN;
if (gc->conf->help_given)
goto err_out;
+ *err = -E_GC_VERSION_GIVEN;
+ if (gc->conf->version_given)
+ goto err_out;
*err = check_gc_args(gc);
if (*err < 0)
goto err_out;