ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
Video chat in your terminal
Loading...
Searching...
No Matches
webcam.c File Reference

Webcam capture options. More...

Go to the source code of this file.

Variables

const registry_entry_t g_webcam_entries []

Detailed Description

Webcam capture options.

Options for selecting and configuring webcam devices, test patterns, and device listing.

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

Definition in file options/registry/webcam.c.

Variable Documentation

◆ g_webcam_entries

const registry_entry_t g_webcam_entries[]

Definition at line 34 of file options/registry/webcam.c.

34 {
35 // WEBCAM GROUP (client, mirror, discovery)
36 {"webcam-index",
37 'c',
39 offsetof(options_t, webcam_index),
40 &default_webcam_index_value,
41 sizeof(((options_t *)0)->webcam_index),
42 "Webcam device index to use for video input.",
43 "WEBCAM",
44 NULL,
45 false,
46 "ASCII_CHAT_WEBCAM_INDEX",
47 NULL,
48 NULL,
49 false,
50 false,
52 {.numeric_range = {0, 10, 1}, .examples = g_webcam_examples, .input_type = OPTION_INPUT_NUMERIC},
53 NULL},
54 {"test-pattern",
55 '\0',
57 offsetof(options_t, test_pattern),
58 NULL,
59 sizeof(bool),
60 "Use synthetic video: 0 = gradient and square (default), 1 = rainbow and circle.",
61 "WEBCAM",
62 "[0|1]",
63 false,
64 "WEBCAM_DISABLED",
65 NULL,
66 parse_test_pattern,
67 false,
68 true,
70 {.enum_values = pattern_values, .input_type = OPTION_INPUT_ENUM},
71 NULL},
72 {"list-webcams", '\0', OPTION_TYPE_ACTION, 0, NULL, 0, "List available webcam devices by index and exit.", "WEBCAM", NULL, false, NULL, NULL, NULL, false, false, OPTION_MODE_BINARY, {0}, NULL},
73
@ OPTION_INPUT_NUMERIC
Numeric value with optional min/max/step.
Definition builder.h:188
@ OPTION_INPUT_ENUM
Choose from fixed set of enum values.
Definition builder.h:187
@ OPTION_TYPE_INT
Integer value (–count 42).
Definition builder.h:172
@ OPTION_TYPE_ACTION
Action that executes and may exit (–list-webcams, etc.).
Definition builder.h:176
@ OPTION_TYPE_CALLBACK
Custom parser function.
Definition builder.h:175
struct options_state options_t
Immutable, RCU-published snapshot of the application's runtime configuration.
@ OPTION_MODE_BINARY
Binary-level options (parsed before mode detection).
Definition options.h:942
@ OPTION_MODE_CLIENT
Client mode (bit 1).
Definition options.h:936
@ OPTION_MODE_DISCOVERY
Discovery mode (bit 4).
Definition options.h:939
@ OPTION_MODE_MIRROR
Mirror mode (bit 2).
Definition options.h:937
#define REGISTRY_TERMINATOR()
Initialize a terminator entry (sentinel value for array end) Uses designated initializers to properly...
const char * g_webcam_examples[]
Definition metadata.c:148
test pattern is intentionally a small, concrete record. Fields such as image, rgba give callers the i...