]> git.sesse.net Git - nageru/blob - flags.h
Add some more command-line flags for initial audio settings. (Still not complete.)
[nageru] / flags.h
1 #ifndef _FLAGS_H
2 #define _FLAGS_H
3
4 #include <map>
5 #include <string>
6 #include <vector>
7
8 #include "defs.h"
9
10 struct Flags {
11         int num_cards = 2;
12         int num_fake_cards = 0;
13         std::string va_display;
14         bool uncompressed_video_to_http = false;
15         bool x264_video_to_http = false;
16         std::string theme_filename = "theme.lua";
17         bool locut_enabled = true;
18         bool gain_staging_auto = true;
19         float initial_gain_staging_db = 0.0f;
20         bool compressor_enabled = true;
21         bool limiter_enabled = true;
22         bool final_makeup_gain_auto = true;
23         bool flush_pbos = true;
24         std::string stream_mux_name = DEFAULT_STREAM_MUX_NAME;
25         bool stream_coarse_timebase = false;
26         std::string stream_audio_codec_name;  // Blank = use the same as for the recording.
27         int stream_audio_codec_bitrate = DEFAULT_AUDIO_OUTPUT_BIT_RATE;  // Ignored if stream_audio_codec_name is blank.
28         std::string x264_preset;  // Empty will be overridden by X264_DEFAULT_PRESET, unless speedcontrol is set.
29         std::string x264_tune = X264_DEFAULT_TUNE;
30         bool x264_speedcontrol = false;
31         bool x264_speedcontrol_verbose = false;
32         int x264_bitrate = DEFAULT_X264_OUTPUT_BIT_RATE;  // In kilobit/sec.
33         int x264_vbv_max_bitrate = -1;  // In kilobits. 0 = no limit, -1 = same as <x264_bitrate> (CBR).
34         int x264_vbv_buffer_size = -1;  // In kilobits. 0 = one-frame VBV, -1 = same as <x264_bitrate> (one-second VBV).
35         std::vector<std::string> x264_extra_param;  // In “key[,value]” format.
36         bool enable_alsa_output = true;
37         std::map<int, int> default_stream_mapping;
38 };
39 extern Flags global_flags;
40
41 void parse_flags(int argc, char * const argv[]);
42
43 #endif  // !defined(_FLAGS_H)