• Home
  • Raw
  • Download

Lines Matching refs:po

177     const OptionDef *po;  in show_help_options()  local
181 for (po = options; po->name; po++) { in show_help_options()
184 if (((po->flags & req_flags) != req_flags) || in show_help_options()
185 (alt_flags && !(po->flags & alt_flags)) || in show_help_options()
186 (po->flags & rej_flags)) in show_help_options()
193 av_strlcpy(buf, po->name, sizeof(buf)); in show_help_options()
194 if (po->argname) { in show_help_options()
196 av_strlcat(buf, po->argname, sizeof(buf)); in show_help_options()
198 printf("-%-17s %s\n", buf, po->help); in show_help_options()
216 static const OptionDef *find_option(const OptionDef *po, const char *name) in find_option() argument
218 while (po->name) { in find_option()
220 if (av_strstart(name, po->name, &end) && (!*end || *end == ':')) in find_option()
222 po++; in find_option()
224 return po; in find_option()
291 static int write_option(void *optctx, const OptionDef *po, const char *opt, in write_option() argument
296 void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? in write_option()
297 (uint8_t *)optctx + po->u.off : po->u.dst_ptr; in write_option()
300 if (po->flags & OPT_SPEC) { in write_option()
314 if (po->flags & OPT_STRING) { in write_option()
321 } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) { in write_option()
323 } else if (po->flags & OPT_INT64) { in write_option()
325 } else if (po->flags & OPT_TIME) { in write_option()
327 } else if (po->flags & OPT_FLOAT) { in write_option()
329 } else if (po->flags & OPT_DOUBLE) { in write_option()
331 } else if (po->u.func_arg) { in write_option()
332 int ret = po->u.func_arg(optctx, opt, arg); in write_option()
340 if (po->flags & OPT_EXIT) in write_option()
349 const OptionDef *po; in parse_option() local
352 po = find_option(options, opt); in parse_option()
353 if (!po->name && opt[0] == 'n' && opt[1] == 'o') { in parse_option()
355 po = find_option(options, opt + 2); in parse_option()
356 if ((po->name && (po->flags & OPT_BOOL))) in parse_option()
358 } else if (po->flags & OPT_BOOL) in parse_option()
361 if (!po->name) in parse_option()
362 po = find_option(options, "default"); in parse_option()
363 if (!po->name) { in parse_option()
367 if (po->flags & HAS_ARG && !arg) { in parse_option()
372 ret = write_option(optctx, po, opt, arg); in parse_option()
376 return !!(po->flags & HAS_ARG); in parse_option()
446 const OptionDef *po; in locate_option() local
455 po = find_option(options, cur_opt); in locate_option()
456 if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') in locate_option()
457 po = find_option(options, cur_opt + 2); in locate_option()
459 if ((!po->name && !strcmp(cur_opt, optname)) || in locate_option()
460 (po->name && !strcmp(optname, po->name))) in locate_option()
463 if (!po->name || po->flags & HAS_ARG) in locate_option()
493 static void check_options(const OptionDef *po) in check_options() argument
495 while (po->name) { in check_options()
496 if (po->flags & OPT_PERFILE) in check_options()
497 av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT)); in check_options()
498 po++; in check_options()
764 const OptionDef *po; in split_commandline() local
800 po = find_option(options, opt); in split_commandline()
801 if (po->name) { in split_commandline()
802 if (po->flags & OPT_EXIT) { in split_commandline()
805 } else if (po->flags & HAS_ARG) { in split_commandline()
811 add_opt(octx, po, opt, arg); in split_commandline()
813 "argument '%s'.\n", po->name, po->help, arg); in split_commandline()
834 (po = find_option(options, opt + 2)) && in split_commandline()
835 po->name && po->flags & OPT_BOOL) { in split_commandline()
836 add_opt(octx, po, opt, "0"); in split_commandline()
838 "argument 0.\n", po->name, po->help); in split_commandline()