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.9.2"
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  char * audioskew_orig;
77  const char *audioskew_help;
79  unsigned int help_given ;
80  unsigned int version_given ;
81  unsigned int json_given ;
82  unsigned int header_given ;
83  unsigned int parse_given ;
84  unsigned int metadata_given ;
85  unsigned int postreset_trigger_given ;
86  unsigned int ignore_first_given ;
87  unsigned int audiolevel_ext_given ;
88  unsigned int videoorient_ext_given ;
89  unsigned int debug_level_given ;
90  unsigned int debug_timestamps_given ;
91  unsigned int disable_colors_given ;
92  unsigned int format_given ;
93  unsigned int faststart_given ;
94  unsigned int audioskew_given ;
96 } ;
97 
100 {
101  int override;
106 } ;
107 
109 extern const char *gengetopt_args_info_purpose;
111 extern const char *gengetopt_args_info_usage;
113 extern const char *gengetopt_args_info_description;
115 extern const char *gengetopt_args_info_help[];
116 
124 int cmdline_parser (int argc, char **argv,
125  struct gengetopt_args_info *args_info);
126 
138 int cmdline_parser2 (int argc, char **argv,
139  struct gengetopt_args_info *args_info,
140  int override, int initialize, int check_required);
141 
150 int cmdline_parser_ext (int argc, char **argv,
151  struct gengetopt_args_info *args_info,
152  struct cmdline_parser_params *params);
153 
160 int cmdline_parser_dump(FILE *outfile,
161  struct gengetopt_args_info *args_info);
162 
170 int cmdline_parser_file_save(const char *filename,
171  struct gengetopt_args_info *args_info);
172 
176 void cmdline_parser_print_help(void);
181 
188 
195 
201 void cmdline_parser_init (struct gengetopt_args_info *args_info);
207 void cmdline_parser_free (struct gengetopt_args_info *args_info);
208 
216 int cmdline_parser_required (struct gengetopt_args_info *args_info,
217  const char *prog_name);
218 
219 extern const char *cmdline_parser_format_values[];
222 #ifdef __cplusplus
223 }
224 #endif /* __cplusplus */
225 #endif /* PP_CMDLINE_H */
char * audioskew_orig
Time threshold to trigger an audio skew compensation, disabled if 0 (default=0) original value given ...
Definition: pp-cmdline.h:76
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:102
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:93
unsigned int parse_given
Whether parse was given.
Definition: pp-cmdline.h:83
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:79
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
Definition: pp-cmdline.c:408
unsigned int format_given
Whether format was given.
Definition: pp-cmdline.h:92
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:82
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Definition: pp-cmdline.c:431
unsigned int ignore_first_given
Whether ignore-first was given.
Definition: pp-cmdline.h:86
Configuration files parsing (headers)
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:296
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:91
The additional parameters to pass to parser functions.
Definition: pp-cmdline.h:99
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Definition: pp-cmdline.c:189
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
unsigned int audioskew_given
Whether audioskew was given.
Definition: pp-cmdline.h:94
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:386
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:181
const char * audioskew_help
Time threshold to trigger an audio skew compensation, disabled if 0 (default=0) help description...
Definition: pp-cmdline.h:77
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 audioskew_arg
Time threshold to trigger an audio skew compensation, disabled if 0 (default=0).
Definition: pp-cmdline.h:75
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:202
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:345
unsigned int postreset_trigger_given
Whether postreset-trigger was given.
Definition: pp-cmdline.h:85
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:172
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:84
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:88
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
Definition: pp-cmdline.h:105
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:87
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
Definition: pp-cmdline.h:104
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:103
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:89
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:81
const char * cmdline_parser_format_values[]
Possible values for format.
Definition: pp-cmdline.c:72
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:90
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Definition: pp-cmdline.c:365
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:146
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
Definition: pp-cmdline.c:392
unsigned int version_given
Whether version was given.
Definition: pp-cmdline.h:80