ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
display.c File Reference

Display layout and rendering options. More...

Go to the source code of this file.

Variables

const registry_entry_t g_display_entries []
 

Detailed Description

Display layout and rendering options.

Options for controlling rendering modes, palettes, color filters, framerate, and snapshot mode.

Author
Zachary Fogg me@zf.nosp@m.o.gg
Date
January 2026

Definition in file lib/options/registry/display.c.

Variable Documentation

◆ g_display_entries

const registry_entry_t g_display_entries[]

Definition at line 21 of file lib/options/registry/display.c.

21 {
22 // DISPLAY GROUP (client, mirror, discovery)
23 {"color-filter",
24 '\0',
25 OPTION_TYPE_CALLBACK,
26 offsetof(options_t, color_filter),
27 &default_color_filter_value,
28 sizeof(color_filter_t),
29 "Apply a monochromatic color tint to grayscale video. Values: none, black, white, green, magenta, fuchsia, "
30 "orange, teal, cyan, pink, red, yellow, rainbow. Using --color-filter automatically sets --color-mode to mono.",
31 "DISPLAY",
32 NULL,
33 false,
34 "ASCII_CHAT_COLOR_FILTER",
35 NULL,
37 false,
38 false,
39 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
40 {.enum_values = g_color_filter_values,
41 .enum_descriptions = g_color_filter_descs,
42 .enum_integer_values = g_color_filter_integers,
43 .input_type = OPTION_INPUT_ENUM},
44 NULL},
45 {"render-mode",
46 'M',
47 OPTION_TYPE_CALLBACK,
48 offsetof(options_t, render_mode),
49 &default_render_mode_value,
50 sizeof(render_mode_t),
51 "Render mode of text for your client to display. Values: foreground, background, half-block. Press 'r' during "
52 "rendering to cycle.",
53 "DISPLAY",
54 NULL,
55 false,
56 "ASCII_CHAT_RENDER_MODE",
57 NULL,
59 false,
60 false,
61 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
62 {.enum_values = g_render_values,
63 .enum_descriptions = g_render_descs,
64 .enum_integer_values = g_render_integers,
65 .input_type = OPTION_INPUT_ENUM},
66 NULL},
67 {"palette",
68 'P',
69 OPTION_TYPE_CALLBACK,
70 offsetof(options_t, palette_type),
71 &default_palette_type_value,
72 sizeof(palette_type_t),
73 "Palette type with which to render images to text art. Values: standard, blocks, digital, minimal, cool, "
74 "custom. All but \"custom\" are built-in presets that all look different and nice. Try them out!",
75 "DISPLAY",
76 NULL,
77 false,
78 "ASCII_CHAT_PALETTE",
79 NULL,
81 false,
82 false,
83 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
84 {.enum_values = g_palette_values,
85 .enum_descriptions = g_palette_descs,
86 .enum_integer_values = g_palette_integers,
87 .input_type = OPTION_INPUT_ENUM},
88 NULL},
89 {"palette-chars",
90 'C',
91 OPTION_TYPE_CALLBACK,
92 offsetof(options_t, palette_custom),
93 "",
94 0,
95 "Ordered sequence of characters from darkest to brightest to use with custom palette (--palette=custom) for "
96 "rendering images to text art for your client. These characters only will be used to create the rendered output. "
97 "Can be UTF-8 content (see --utf8).",
98 "DISPLAY",
99 "STRING",
100 false,
101 "ASCII_CHAT_PALETTE_CHARS",
102 NULL,
104 false,
105 false,
106 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
107 {0},
108 NULL},
109 {"stretch",
110 '\0',
111 OPTION_TYPE_BOOL,
112 offsetof(options_t, stretch),
113 &default_stretch_value,
114 sizeof(bool),
115 "Allow aspect ratio distortion of image for rendering ascii output. This can allow the rendered ascii to fill "
116 "your terminal.",
117 "DISPLAY",
118 NULL,
119 false,
120 "ASCII_CHAT_STRETCH",
121 NULL,
122 NULL,
123 false,
124 false,
125 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
126 {0},
127 NULL},
128 {"fps",
129 '\0',
130 OPTION_TYPE_INT,
131 offsetof(options_t, fps),
132 &default_fps_value,
133 sizeof(int),
134 "Target framerate for rendering (1-144).",
135 "DISPLAY",
136 NULL,
137 false,
138 "ASCII_CHAT_FPS",
139 NULL,
140 NULL,
141 false,
142 false,
143 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
144 {.numeric_range = {1, 144, 1}, .examples = g_fps_examples, .input_type = OPTION_INPUT_NUMERIC},
145 NULL},
146 {"snapshot",
147 'S',
148 OPTION_TYPE_BOOL,
149 offsetof(options_t, snapshot_mode),
150 &default_snapshot_mode_value,
151 sizeof(bool),
152 "Snapshot mode (one frame and exit).",
153 "DISPLAY",
154 NULL,
155 false,
156 "ASCII_CHAT_SNAPSHOT",
157 NULL,
158 NULL,
159 false,
160 false,
161 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
162 {0},
163 NULL},
164 {"snapshot-delay",
165 'D',
166 OPTION_TYPE_DOUBLE,
167 offsetof(options_t, snapshot_delay),
168 &default_snapshot_delay_value,
169 sizeof(double),
170 "Snapshot delay in seconds. The timer starts right before the client-side program prints the first frame. "
171 "--snapshot --snapshot-delay=0 will print the first frame and exit.",
172 "DISPLAY",
173 "SECONDS",
174 false,
175 "ASCII_CHAT_SNAPSHOT_DELAY",
176 NULL,
177 NULL,
178 false,
179 false,
180 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
181 {.numeric_range = {0, 3600, 0}, .input_type = OPTION_INPUT_NUMERIC},
182 NULL},
183 {"matrix",
184 '\0',
185 OPTION_TYPE_BOOL,
186 offsetof(options_t, matrix_rain),
187 &default_matrix_rain_value,
188 sizeof(bool),
189 "Enable Matrix-style digital rain effect. Works with --render-mode truecolor|256 and --color-filter [color].",
190 "DISPLAY",
191 NULL,
192 false,
193 "ASCII_CHAT_MATRIX",
194 NULL,
195 NULL,
196 false,
197 false,
198 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
199 {0},
200 NULL},
201 {"flip-x",
202 '\0',
203 OPTION_TYPE_BOOL,
204 offsetof(options_t, flip_x),
205 &default_flip_x_value,
206 sizeof(bool),
207 "Flip video horizontally (X-axis). Works with webcam, files, and streams. Note: Ignored for webcam on macOS "
208 "(respects platform default like FaceTime).",
209 "DISPLAY",
210 NULL,
211 false,
212 "ASCII_CHAT_FLIP_X",
213 NULL,
214 NULL,
215 false,
216 false,
217 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
218 {0},
219 NULL},
220 {"flip-y",
221 '\0',
222 OPTION_TYPE_BOOL,
223 offsetof(options_t, flip_y),
224 &default_flip_y_value,
225 sizeof(bool),
226 "Flip video vertically (Y-axis). Works with webcam, files, and streams.",
227 "DISPLAY",
228 NULL,
229 false,
230 "ASCII_CHAT_FLIP_Y",
231 NULL,
232 NULL,
233 false,
234 false,
235 OPTION_MODE_CLIENT | OPTION_MODE_MIRROR | OPTION_MODE_DISCOVERY,
236 {0},
237 NULL},
238
239 REGISTRY_TERMINATOR()};
const int g_palette_integers[]
Definition metadata.c:95
const char * g_color_filter_descs[]
Definition metadata.c:76
const char * g_palette_descs[]
Definition metadata.c:97
const char * g_color_filter_values[]
Definition metadata.c:70
const char * g_render_descs[]
Definition metadata.c:113
const int g_render_integers[]
Definition metadata.c:110
const char * g_fps_examples[]
Definition metadata.c:139
const char * g_palette_values[]
Definition metadata.c:94
const int g_color_filter_integers[]
Definition metadata.c:72
const char * g_render_values[]
Definition metadata.c:109
bool parse_render_mode(const char *arg, void *dest, char **error_msg)
Definition parsers.c:300
bool parse_palette_type(const char *arg, void *dest, char **error_msg)
Definition parsers.c:345
bool parse_color_filter(const char *arg, void *dest, char **error_msg)
Definition parsers.c:270
bool parse_palette_chars(const char *arg, void *dest, char **error_msg)
Definition parsers.c:809
#define bool
Definition stdbool.h:22