blob: 74cf09ce6985b1d6b5c1b367e2221359b8c290fe [file] [log] [blame]
John Koleszar0ea50ce2010-05-18 11:58:33 -04001/*
James Zernb7c05bd2024-06-11 19:15:10 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
John Koleszar0ea50ce2010-05-18 11:58:33 -04003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -07004 * 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 Koleszar0ea50ce2010-05-18 11:58:33 -040010 */
11
James Zerne1cbb132018-08-22 14:10:36 -070012#ifndef AOM_COMMON_ARGS_H_
13#define AOM_COMMON_ARGS_H_
John Koleszar0ea50ce2010-05-18 11:58:33 -040014#include <stdio.h>
15
Ryan44276df2019-10-29 17:11:45 -070016#include "aom/aom_codec.h"
17#include "aom/aom_encoder.h"
Bohan Lidf1c6062020-12-21 13:24:25 -080018#include "common/args_helper.h"
Ryan44276df2019-10-29 17:11:45 -070019
James Zern25cfd8e2014-01-18 12:16:11 -080020#ifdef __cplusplus
21extern "C" {
22#endif
23
John Koleszar0ea50ce2010-05-18 11:58:33 -040024int arg_match(struct arg *arg_, const struct arg_def *def, char **argv);
Yaowu Xu4d5dbb12019-11-08 11:13:32 -080025int parse_cfg(const char *file, cfg_options_t *config);
John Koleszar0ea50ce2010-05-18 11:58:33 -040026const char *arg_next(struct arg *arg);
27void arg_show_usage(FILE *fp, const struct arg_def *const *defs);
28char **argv_dup(int argc, const char **argv);
29
30unsigned int arg_parse_uint(const struct arg *arg);
31int arg_parse_int(const struct arg *arg);
Yaowu Xuf883b422016-08-30 14:01:10 -070032struct aom_rational arg_parse_rational(const struct arg *arg);
James Zern4e5a7782014-10-11 11:27:23 +020033int arg_parse_enum(const struct arg *arg);
John Koleszarb0da9b32010-12-17 09:43:39 -050034int arg_parse_enum_or_int(const struct arg *arg);
Dominic Symes26ad0b22017-10-01 16:35:13 +020035int arg_parse_list(const struct arg *arg, int *list, int n);
James Zern25cfd8e2014-01-18 12:16:11 -080036#ifdef __cplusplus
37} // extern "C"
38#endif
39
James Zerne1cbb132018-08-22 14:10:36 -070040#endif // AOM_COMMON_ARGS_H_