Fork me on GitHub
pp-cmdline.h
Go to the documentation of this file.
1 
8 #ifndef PP_CMDLINE_H
9 #define PP_CMDLINE_H
10 
11 /* If we use autoconf. */
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15 
16 #include <stdio.h> /* for FILE */
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21 
22 #ifndef CMDLINE_PARSER_PACKAGE
23 
24 #define CMDLINE_PARSER_PACKAGE "janus-pp-rec"
25 #endif
26 
27 #ifndef CMDLINE_PARSER_PACKAGE_NAME
28 
29 #define CMDLINE_PARSER_PACKAGE_NAME "janus-pp-rec"
30 #endif
31 
32 #ifndef CMDLINE_PARSER_VERSION
33 
34 #define CMDLINE_PARSER_VERSION "0.7.6"
35 #endif
36 
39 {
40  const char *help_help;
41  const char *version_help;
42  int json_flag;
43  const char *json_help;
45  const char *header_help;
46  int parse_flag;
47  const char *parse_help;
48  char * metadata_arg;
49  char * metadata_orig;
50  const char *metadata_help;
53  const char *postreset_trigger_help;
56  const char *ignore_first_help;
59  const char *audiolevel_ext_help;
62  const char *videoorient_ext_help;
65  const char *debug_level_help;
67  const char *debug_timestamps_help;
69  const char *disable_colors_help;
70  char * format_arg;
71  char * format_orig;
72  const char *format_help;
74  const char *faststart_help;
76  unsigned int help_given ;
77  unsigned int version_given ;
78  unsigned int json_given ;
79  unsigned int header_given ;
80  unsigned int parse_given ;
81  unsigned int metadata_given ;
82  unsigned int postreset_trigger_given ;
83  unsigned int ignore_first_given ;
84  unsigned int audiolevel_ext_given ;
85  unsigned int videoorient_ext_given ;
86  unsigned int debug_level_given ;
87  unsigned int debug_timestamps_given ;
88  unsigned int disable_colors_given ;
89  unsigned int format_given ;
90  unsigned int faststart_given ;
92 } ;
93 
96 {
97  int override;
98  int initialize;
102 } ;
103 
105 extern const char *gengetopt_args_info_purpose;
107 extern const char *gengetopt_args_info_usage;
109 extern const char *gengetopt_args_info_description;
111 extern const char *gengetopt_args_info_help[];
112 
120 int cmdline_parser (int argc, char **argv,
121  struct gengetopt_args_info *args_info);
122 
134 int cmdline_parser2 (int argc, char **argv,
135  struct gengetopt_args_info *args_info,
136  int override, int initialize, int check_required);
137 
146 int cmdline_parser_ext (int argc, char **argv,
147  struct gengetopt_args_info *args_info,
148  struct cmdline_parser_params *params);
149 
156 int cmdline_parser_dump(FILE *outfile,
157  struct gengetopt_args_info *args_info);
158 
166 int cmdline_parser_file_save(const char *filename,
167  struct gengetopt_args_info *args_info);
168 
172 void cmdline_parser_print_help(void);
177 
184 
191 
197 void cmdline_parser_init (struct gengetopt_args_info *args_info);
203 void cmdline_parser_free (struct gengetopt_args_info *args_info);
204 
212 int cmdline_parser_required (struct gengetopt_args_info *args_info,
213  const char *prog_name);
214 
215 extern const char *cmdline_parser_format_values[];
218 #ifdef __cplusplus
219 }
220 #endif /* __cplusplus */
221 #endif /* PP_CMDLINE_H */
int postreset_trigger_arg
Number of packets needed to detect a timestamp reset (default=200).
Definition: pp-cmdline.h:51
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
Definition: pp-cmdline.h:98
Where the command line options are stored.
Definition: pp-cmdline.h:38
int disable_colors_flag
Disable color in the logging (default=off).
Definition: pp-cmdline.h:68
unsigned int faststart_given
Whether faststart was given.
Definition: pp-cmdline.h:90
unsigned int parse_given
Whether parse was given.
Definition: pp-cmdline.h:80
const char * json_help
Only print JSON header help description.
Definition: pp-cmdline.h:43
const char * gengetopt_args_info_usage
the usage string of the program
Definition: pp-cmdline.c:30
const char * postreset_trigger_help
Number of packets needed to detect a timestamp reset (default=200) help description.
Definition: pp-cmdline.h:53
unsigned int help_given
Whether help was given.
Definition: pp-cmdline.h:76
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
Definition: pp-cmdline.c:401
unsigned int format_given
Whether format was given.
Definition: pp-cmdline.h:89
const char * header_help
Only parse .mjr header help description.
Definition: pp-cmdline.h:45
unsigned int header_given
Whether header was given.
Definition: pp-cmdline.h:79
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Definition: pp-cmdline.c:424
unsigned int ignore_first_given
Whether ignore-first was given.
Definition: pp-cmdline.h:83
Configuration files parsing (headers)
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:291
int videoorient_ext_arg
ID of the video-orientation RTP extension (default=none).
Definition: pp-cmdline.h:60
const char * videoorient_ext_help
ID of the video-orientation RTP extension (default=none) help description.
Definition: pp-cmdline.h:62
unsigned int disable_colors_given
Whether disable-colors was given.
Definition: pp-cmdline.h:88
The additional parameters to pass to parser functions.
Definition: pp-cmdline.h:95
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Definition: pp-cmdline.c:185
char * metadata_arg
Save this metadata string in the target file.
Definition: pp-cmdline.h:48
int json_flag
Only print JSON header (default=off).
Definition: pp-cmdline.h:42
const char * faststart_help
For mp4 files write the MOOV atom at the head of the file help description.
Definition: pp-cmdline.h:74
const char * debug_level_help
Debug/logging level (0=disable debugging, 7=maximum debug level; default=4) help description.
Definition: pp-cmdline.h:65
const char * gengetopt_args_info_description
the description string of the program
Definition: pp-cmdline.c:34
const char * audiolevel_ext_help
ID of the audio-levels RTP extension (default=none) help description.
Definition: pp-cmdline.h:59
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:379
char * format_arg
Specifies the output format (overrides the format from the destination).
Definition: pp-cmdline.h:70
char * videoorient_ext_orig
ID of the video-orientation RTP extension (default=none) original value given at command line...
Definition: pp-cmdline.h:61
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:177
int header_flag
Only parse .mjr header (default=off).
Definition: pp-cmdline.h:44
const char * ignore_first_help
Number of first packets to ignore when processing, e.g., in case they&#39;re cause of issues (default=0) ...
Definition: pp-cmdline.h:56
int parse_flag
Only parse and re-order packets (default=off).
Definition: pp-cmdline.h:46
const char * gengetopt_args_info_purpose
the purpose string of the program
Definition: pp-cmdline.c:28
struct cmdline_parser_params * cmdline_parser_params_create(void)
Definition: pp-cmdline.c:198
char * metadata_orig
Save this metadata string in the target file original value given at command line.
Definition: pp-cmdline.h:49
const char * parse_help
Only parse and re-order packets help description.
Definition: pp-cmdline.h:47
const char * version_help
Print version and exit help description.
Definition: pp-cmdline.h:41
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:338
unsigned int postreset_trigger_given
Whether postreset-trigger was given.
Definition: pp-cmdline.h:82
int debug_level_arg
Debug/logging level (0=disable debugging, 7=maximum debug level; default=4).
Definition: pp-cmdline.h:63
int faststart_flag
For mp4 files write the MOOV atom at the head of the file (default=off).
Definition: pp-cmdline.h:73
const char * format_help
Specifies the output format (overrides the format from the destination) help description.
Definition: pp-cmdline.h:72
void cmdline_parser_print_help(void)
Definition: pp-cmdline.c:168
const char * disable_colors_help
Disable color in the logging help description.
Definition: pp-cmdline.h:69
int ignore_first_arg
Number of first packets to ignore when processing, e.g., in case they&#39;re cause of issues (default=0)...
Definition: pp-cmdline.h:54
char * ignore_first_orig
Number of first packets to ignore when processing, e.g., in case they&#39;re cause of issues (default=0) ...
Definition: pp-cmdline.h:55
const char * help_help
Print help and exit help description.
Definition: pp-cmdline.h:40
const char * debug_timestamps_help
Enable debug/logging timestamps help description.
Definition: pp-cmdline.h:67
unsigned int metadata_given
Whether metadata was given.
Definition: pp-cmdline.h:81
int audiolevel_ext_arg
ID of the audio-levels RTP extension (default=none).
Definition: pp-cmdline.h:57
unsigned int videoorient_ext_given
Whether videoorient-ext was given.
Definition: pp-cmdline.h:85
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
Definition: pp-cmdline.h:101
const char * metadata_help
Save this metadata string in the target file help description.
Definition: pp-cmdline.h:50
unsigned int audiolevel_ext_given
Whether audiolevel-ext was given.
Definition: pp-cmdline.h:84
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
Definition: pp-cmdline.h:100
char * postreset_trigger_orig
Number of packets needed to detect a timestamp reset (default=200) original value given at command li...
Definition: pp-cmdline.h:52
int check_required
whether to check that all required options were provided (default 1)
Definition: pp-cmdline.h:99
char * audiolevel_ext_orig
ID of the audio-levels RTP extension (default=none) original value given at command line...
Definition: pp-cmdline.h:58
unsigned int debug_level_given
Whether debug-level was given.
Definition: pp-cmdline.h:86
char * debug_level_orig
Debug/logging level (0=disable debugging, 7=maximum debug level; default=4) original value given at c...
Definition: pp-cmdline.h:64
unsigned int json_given
Whether json was given.
Definition: pp-cmdline.h:78
const char * cmdline_parser_format_values[]
Possible values for format.
Definition: pp-cmdline.c:71
int debug_timestamps_flag
Enable debug/logging timestamps (default=off).
Definition: pp-cmdline.h:66
char * format_orig
Specifies the output format (overrides the format from the destination) original value given at comma...
Definition: pp-cmdline.h:71
unsigned int debug_timestamps_given
Whether debug-timestamps was given.
Definition: pp-cmdline.h:87
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:358
const char * gengetopt_args_info_help[]
all the lines making the help output
Definition: pp-cmdline.c:36
void cmdline_parser_print_version(void)
Definition: pp-cmdline.c:142
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
Definition: pp-cmdline.c:385
unsigned int version_given
Whether version was given.
Definition: pp-cmdline.h:77