John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 1 | /* |
James Zern | b7c05bd | 2024-06-11 19:15:10 -0700 | [diff] [blame^] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 3 | * |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 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. |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 10 | */ |
| 11 | |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 12 | #ifndef AOM_COMMON_ARGS_H_ |
| 13 | #define AOM_COMMON_ARGS_H_ |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 14 | #include <stdio.h> |
| 15 | |
Ryan | 44276df | 2019-10-29 17:11:45 -0700 | [diff] [blame] | 16 | #include "aom/aom_codec.h" |
| 17 | #include "aom/aom_encoder.h" |
Bohan Li | df1c606 | 2020-12-21 13:24:25 -0800 | [diff] [blame] | 18 | #include "common/args_helper.h" |
Ryan | 44276df | 2019-10-29 17:11:45 -0700 | [diff] [blame] | 19 | |
James Zern | 25cfd8e | 2014-01-18 12:16:11 -0800 | [diff] [blame] | 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif |
| 23 | |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 24 | int arg_match(struct arg *arg_, const struct arg_def *def, char **argv); |
Yaowu Xu | 4d5dbb1 | 2019-11-08 11:13:32 -0800 | [diff] [blame] | 25 | int parse_cfg(const char *file, cfg_options_t *config); |
John Koleszar | 0ea50ce | 2010-05-18 11:58:33 -0400 | [diff] [blame] | 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); |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 32 | struct aom_rational arg_parse_rational(const struct arg *arg); |
James Zern | 4e5a778 | 2014-10-11 11:27:23 +0200 | [diff] [blame] | 33 | int arg_parse_enum(const struct arg *arg); |
John Koleszar | b0da9b3 | 2010-12-17 09:43:39 -0500 | [diff] [blame] | 34 | int arg_parse_enum_or_int(const struct arg *arg); |
Dominic Symes | 26ad0b2 | 2017-10-01 16:35:13 +0200 | [diff] [blame] | 35 | int arg_parse_list(const struct arg *arg, int *list, int n); |
James Zern | 25cfd8e | 2014-01-18 12:16:11 -0800 | [diff] [blame] | 36 | #ifdef __cplusplus |
| 37 | } // extern "C" |
| 38 | #endif |
| 39 | |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 40 | #endif // AOM_COMMON_ARGS_H_ |