00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FFMPEG_CMDUTILS_H
00023 #define FFMPEG_CMDUTILS_H
00024
00025 #include <inttypes.h>
00026
00027 typedef struct {
00028 const char *name;
00029 int flags;
00030 #define HAS_ARG 0x0001
00031 #define OPT_BOOL 0x0002
00032 #define OPT_EXPERT 0x0004
00033 #define OPT_STRING 0x0008
00034 #define OPT_VIDEO 0x0010
00035 #define OPT_AUDIO 0x0020
00036 #define OPT_GRAB 0x0040
00037 #define OPT_INT 0x0080
00038 #define OPT_FLOAT 0x0100
00039 #define OPT_SUBTITLE 0x0200
00040 #define OPT_FUNC2 0x0400
00041 #define OPT_INT64 0x0800
00042 union {
00043 void (*func_arg)(const char *);
00044 int *int_arg;
00045 char **str_arg;
00046 float *float_arg;
00047 int (*func2_arg)(const char *, const char *);
00048 int64_t *int64_arg;
00049 } u;
00050 const char *help;
00051 const char *argname;
00052 } OptionDef;
00053
00054 void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
00055
00064 void parse_options(int argc, char **argv, const OptionDef *options,
00065 void (* parse_arg_function)(const char*));
00066
00067 void print_error(const char *filename, int err);
00068
00076 void show_banner(const char *program_name, int program_birth_year);
00077
00084 void show_version(const char *program_name);
00085
00090 void show_license(void);
00091
00092 #endif