Lines Matching defs:po

137     const OptionDef *po;
141 for (po = options; po->name; po++) {
144 if (((po->flags & req_flags) != req_flags) ||
145 (alt_flags && !(po->flags & alt_flags)) ||
146 (po->flags & rej_flags))
153 av_strlcpy(buf, po->name, sizeof(buf));
154 if (po->argname) {
156 av_strlcat(buf, po->argname, sizeof(buf));
158 printf("-%-17s %s\n", buf, po->help);
176 static const OptionDef *find_option(const OptionDef *po, const char *name)
178 while (po->name) {
180 if (av_strstart(name, po->name, &end) && (!*end || *end == ':'))
182 po++;
184 return po;
251 static int write_option(void *optctx, const OptionDef *po, const char *opt,
256 void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ?
257 (uint8_t *)optctx + po->u.off : po->u.dst_ptr;
260 if (po->flags & OPT_SPEC) {
274 if (po->flags & OPT_STRING) {
281 } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {
283 } else if (po->flags & OPT_INT64) {
285 } else if (po->flags & OPT_TIME) {
287 } else if (po->flags & OPT_FLOAT) {
289 } else if (po->flags & OPT_DOUBLE) {
291 } else if (po->u.func_arg) {
292 int ret = po->u.func_arg(optctx, opt, arg);
300 if (po->flags & OPT_EXIT)
315 const OptionDef *po;
318 po = find_option(options, opt);
319 if (!po->name && opt[0] == 'n' && opt[1] == 'o') {
321 po = find_option(options, opt + 2);
322 if ((po->name && (po->flags & OPT_BOOL)))
324 } else if (po->flags & OPT_BOOL)
327 if (!po->name)
328 po = &opt_avoptions;
329 if (!po->name) {
333 if (po->flags & HAS_ARG && !arg) {
338 ret = write_option(optctx, po, opt, arg);
342 return !!(po->flags & HAS_ARG);
412 const OptionDef *po;
421 po = find_option(options, cur_opt);
422 if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o')
423 po = find_option(options, cur_opt + 2);
425 if ((!po->name && !strcmp(cur_opt, optname)) ||
426 (po->name && !strcmp(optname, po->name)))
429 if (!po->name || po->flags & HAS_ARG)
459 static void check_options(const OptionDef *po)
461 while (po->name) {
462 if (po->flags & OPT_PERFILE)
463 av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT));
464 po++;
702 const OptionDef *po;
738 po = find_option(options, opt);
739 if (po->name) {
740 if (po->flags & OPT_EXIT) {
743 } else if (po->flags & HAS_ARG) {
749 add_opt(octx, po, opt, arg);
751 "argument '%s'.\n", po->name, po->help, arg);
772 (po = find_option(options, opt + 2)) &&
773 po->name && po->flags & OPT_BOOL) {
774 add_opt(octx, po, opt, "0");
776 "argument 0.\n", po->name, po->help);