ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
lib/options/registry/display.c
Go to the documentation of this file.
1
15
17
18// ============================================================================
19// DISPLAY CATEGORY - Display layout options
20// ============================================================================
22 {"waveform",
23 '\0',
25 offsetof(options_t, waveform),
26 &default_waveform_value,
27 sizeof(bool),
28 "Replace the video image with a live waveform of the source selected by --audio-source.",
29 "DISPLAY",
30 NULL,
31 false,
32 "ASCII_CHAT_WAVEFORM",
33 NULL,
34 NULL,
35 false,
36 false,
38 {0},
39 NULL},
40 {"fft",
41 '\0',
43 offsetof(options_t, fft),
44 &default_fft_value,
45 sizeof(bool),
46 "Replace the video image with a live scrolling frequency display for the source selected by --audio-source.",
47 "DISPLAY",
48 NULL,
49 false,
50 "ASCII_CHAT_FFT",
51 NULL,
52 NULL,
53 false,
54 false,
56 {0},
57 NULL},
58 // DISPLAY GROUP (client, mirror, discovery)
59 {"color-filter",
60 '\0',
62 offsetof(options_t, color_filter),
63 &default_color_filter_value,
64 sizeof(color_filter_t),
65 "Apply a monochromatic color tint to grayscale video. Values: none, black, white, green, magenta, fuchsia, "
66 "orange, teal, cyan, pink, red, yellow, rainbow. Using --color-filter automatically sets --color-mode to mono.",
67 "DISPLAY",
68 NULL,
69 false,
70 "ASCII_CHAT_COLOR_FILTER",
71 NULL,
73 false,
74 false,
76 {.enum_values = g_color_filter_values,
77 .enum_descriptions = g_color_filter_descs,
78 .enum_integer_values = g_color_filter_integers,
79 .input_type = OPTION_INPUT_ENUM},
80 NULL},
81 {"render-mode",
82 'M',
84 offsetof(options_t, render_mode),
85 &default_render_mode_value,
86 sizeof(render_mode_t),
87 "Render mode of text for your client to display. Values: foreground, background, half-block. Press 'r' during "
88 "rendering to cycle.",
89 "DISPLAY",
90 NULL,
91 false,
92 "ASCII_CHAT_RENDER_MODE",
93 NULL,
95 false,
96 false,
98 {.enum_values = g_render_values,
99 .enum_descriptions = g_render_descs,
100 .enum_integer_values = g_render_integers,
101 .input_type = OPTION_INPUT_ENUM},
102 NULL},
103 {"palette",
104 'P',
106 offsetof(options_t, palette_type),
107 &default_palette_type_value,
108 sizeof(palette_type_t),
109 "Palette type with which to render images to text art. Values: standard, blocks, digital, minimal, cool, "
110 "custom. All but 'custom' are built-in presets that all look different and nice. Try them out.",
111 "DISPLAY",
112 NULL,
113 false,
114 "ASCII_CHAT_PALETTE",
115 NULL,
117 false,
118 false,
120 {.enum_values = g_palette_values,
121 .enum_descriptions = g_palette_descs,
122 .enum_integer_values = g_palette_integers,
123 .input_type = OPTION_INPUT_ENUM},
124 NULL},
125 {"palette-chars",
126 'C',
128 offsetof(options_t, palette_custom),
129 "",
130 0,
131 "Ordered sequence of characters from darkest to brightest to use with custom palette (--palette=custom) for "
132 "rendering images to text art for your client. These characters only will be used to create the rendered output. "
133 "Can be UTF-8 content (see --utf8).",
134 "DISPLAY",
135 "STRING",
136 false,
137 "ASCII_CHAT_PALETTE_CHARS",
138 NULL,
140 false,
141 false,
143 {0},
144 NULL},
145 {"stretch",
146 '\0',
148 offsetof(options_t, stretch),
149 &default_stretch_value,
150 sizeof(bool),
151 "Allow aspect ratio distortion of image for rendering ascii output. This can allow the rendered ascii to fill "
152 "your terminal.",
153 "DISPLAY",
154 NULL,
155 false,
156 "ASCII_CHAT_STRETCH",
157 NULL,
158 NULL,
159 false,
160 false,
162 {0},
163 NULL},
164 {"fps",
165 '\0',
167 offsetof(options_t, fps),
168 &default_fps_value,
169 sizeof(int),
170 "Target framerate for rendering (1-144).",
171 "DISPLAY",
172 NULL,
173 false,
174 "ASCII_CHAT_FPS",
175 NULL,
176 NULL,
177 false,
178 false,
180 {.numeric_range = {1, 144, 1}, .examples = g_fps_examples, .input_type = OPTION_INPUT_NUMERIC},
181 NULL},
182 {"snapshot",
183 'S',
185 offsetof(options_t, snapshot_mode),
186 &default_snapshot_mode_value,
187 sizeof(bool),
188 "Snapshot mode (one frame and exit).",
189 "DISPLAY",
190 NULL,
191 false,
192 "ASCII_CHAT_SNAPSHOT",
193 NULL,
194 NULL,
195 false,
196 false,
198 {0},
199 NULL},
200 {"snapshot-delay",
201 'D',
203 offsetof(options_t, snapshot_delay),
204 &default_snapshot_delay_value,
205 sizeof(double),
206 "Snapshot delay in seconds. The timer starts right before the client-side program prints the first frame. "
207 "--snapshot --snapshot-delay=0 will print the first frame and exit.",
208 "DISPLAY",
209 "SECONDS",
210 false,
211 "ASCII_CHAT_SNAPSHOT_DELAY",
212 NULL,
213 NULL,
214 false,
215 false,
217 {.numeric_range = {0, 3600, 0}, .input_type = OPTION_INPUT_NUMERIC},
218 NULL},
219 {"matrix",
220 '\0',
222 offsetof(options_t, matrix_rain),
223 &default_matrix_rain_value,
224 sizeof(bool),
225 "Enable Matrix-style digital rain effect. Works with --render-mode truecolor|256 and --color-filter [color].",
226 "DISPLAY",
227 NULL,
228 false,
229 "ASCII_CHAT_MATRIX",
230 NULL,
231 NULL,
232 false,
233 false,
235 {0},
236 NULL},
237 {"fps-counter",
238 '\0',
240 offsetof(options_t, fps_counter),
241 &default_fps_counter_value,
242 sizeof(bool),
243 "Show FPS counter overlay in top-right corner. Press '-' to toggle.",
244 "DISPLAY",
245 NULL,
246 false,
247 "ASCII_CHAT_FPS_COUNTER",
248 NULL,
249 NULL,
250 false,
251 false,
253 {0},
254 NULL},
255 {"flip-x",
256 '\0',
258 offsetof(options_t, flip_x),
259 &default_flip_x_value,
260 sizeof(bool),
261 "Flip video horizontally (X-axis). Works with webcam, files, and streams. Note: Ignored for webcam on macOS "
262 "(respects platform default like FaceTime).",
263 "DISPLAY",
264 NULL,
265 false,
266 "ASCII_CHAT_FLIP_X",
267 NULL,
268 NULL,
269 false,
270 false,
272 {0},
273 NULL},
274 {"flip-y",
275 '\0',
277 offsetof(options_t, flip_y),
278 &default_flip_y_value,
279 sizeof(bool),
280 "Flip video vertically (Y-axis). Works with webcam, files, and streams.",
281 "DISPLAY",
282 NULL,
283 false,
284 "ASCII_CHAT_FLIP_Y",
285 NULL,
286 NULL,
287 false,
288 false,
290 {0},
291 NULL},
292
@ OPTION_INPUT_NUMERIC
Numeric value with optional min/max/step.
Definition builder.h:179
@ OPTION_INPUT_ENUM
Choose from fixed set of enum values.
Definition builder.h:178
@ OPTION_TYPE_INT
Integer value (–count 42)
Definition builder.h:163
@ OPTION_TYPE_DOUBLE
Floating point (–ratio 1.5)
Definition builder.h:165
@ OPTION_TYPE_CALLBACK
Custom parser function.
Definition builder.h:166
@ OPTION_TYPE_BOOL
Boolean flag (–flag, no value)
Definition builder.h:162
@ OPTION_MODE_CLIENT
Client mode (bit 1)
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4)
@ OPTION_MODE_MIRROR
Mirror mode (bit 2)
palette_type_t
Built-in palette type enumeration.
Definition palette.h:84
const registry_entry_t g_display_entries[]
const int g_palette_integers[]
Definition metadata.c:115
const char * g_color_filter_descs[]
Definition metadata.c:89
const char * g_palette_descs[]
Definition metadata.c:117
const char * g_color_filter_values[]
Definition metadata.c:78
const char * g_render_descs[]
Definition metadata.c:134
const int g_render_integers[]
Definition metadata.c:131
const char * g_fps_examples[]
Definition metadata.c:181
const char * g_palette_values[]
Definition metadata.c:108
const int g_color_filter_integers[]
Definition metadata.c:85
const char * g_render_values[]
Definition metadata.c:129
Extern declarations for shared metadata arrays.
Shared structures and macros for registry implementation.
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
bool parse_render_mode(const char *arg, void *dest, char **error_msg)
Parse render mode option.
Definition parsers.c:299
bool parse_palette_type(const char *arg, void *dest, char **error_msg)
Parse palette type option.
Definition parsers.c:385
bool parse_color_filter(const char *arg, void *dest, char **error_msg)
Parse color filter option.
Definition parsers.c:269
bool parse_palette_chars(const char *arg, void *dest, char **error_msg)
Parse custom palette characters option.
Definition parsers.c:929
Custom option parsers for enum types.
#define bool
Definition stdbool.h:61
Consolidated options structure.
Registry entry - stores option definition with mode bitmask and metadata.
color_filter_t
Monochromatic color filter enumeration.
Definition terminal.h:599
render_mode_t
Render mode preferences.
Definition terminal.h:662