1 /* 2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved. 3 * 4 * This source code is subject to the terms of the BSD 2 Clause License and 5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 6 * was not distributed with this source code in the LICENSE file, you can 7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open 8 * Media Patent License 1.0 was not distributed with this source code in the 9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 10 */ 11 12 #ifndef AOM_COMMON_ARGS_H_ 13 #define AOM_COMMON_ARGS_H_ 14 #include <stdio.h> 15 16 #include "aom/aom_codec.h" 17 #include "aom/aom_encoder.h" 18 #include "common/args_helper.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 int arg_match(struct arg *arg_, const struct arg_def *def, char **argv); 25 int parse_cfg(const char *file, cfg_options_t *config); 26 const char *arg_next(struct arg *arg); 27 void arg_show_usage(FILE *fp, const struct arg_def *const *defs); 28 char **argv_dup(int argc, const char **argv); 29 30 unsigned int arg_parse_uint(const struct arg *arg); 31 int arg_parse_int(const struct arg *arg); 32 struct aom_rational arg_parse_rational(const struct arg *arg); 33 int arg_parse_enum(const struct arg *arg); 34 int arg_parse_enum_or_int(const struct arg *arg); 35 int arg_parse_list(const struct arg *arg, int *list, int n); 36 #ifdef __cplusplus 37 } // extern "C" 38 #endif 39 40 #endif // AOM_COMMON_ARGS_H_ 41