@ceralive/cerastream 2026.7.5 → 2026.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +3 -3
- package/dist/client.js +39 -42
- package/dist/config.d.ts +1 -1
- package/dist/config.js +8 -10
- package/dist/constants.d.ts +14 -14
- package/dist/constants.js +18 -18
- package/dist/envelope.d.ts +1 -1
- package/dist/envelope.js +4 -4
- package/dist/errors.d.ts +13 -13
- package/dist/errors.js +43 -43
- package/dist/events.d.ts +183 -94
- package/dist/events.js +56 -31
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/messages.d.ts +117 -99
- package/dist/messages.js +55 -40
- package/dist/paths.d.ts +2 -2
- package/dist/paths.js +9 -11
- package/dist/transport.js +7 -7
- package/dist/types.d.ts +48 -36
- package/dist/types.js +42 -36
- package/package.json +44 -39
package/dist/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* The engine's RESOLVED runtime encode state (0.4.0, additive), reported on the
|
|
4
4
|
* `status` event as `active_encode`. Engine = reporter of record: this is the
|
|
@@ -20,6 +20,37 @@ export declare const activeEncodeSchema: z.ZodObject<{
|
|
|
20
20
|
pipeline_playing: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
export type ActiveEncode = z.infer<typeof activeEncodeSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* What this session's PREVIEW branch is actually encoding with (additive),
|
|
25
|
+
* reported on the `status` event as `preview_encoder_realized`. A separate
|
|
26
|
+
* realized fact from {@link activeEncodeSchema}, which describes the EGRESS
|
|
27
|
+
* encode — the two are different graph branches and are independently absent.
|
|
28
|
+
*
|
|
29
|
+
* Present only while a session has a preview branch spliced into its graph (the
|
|
30
|
+
* branch exists for the life of the session even while its valve is closed).
|
|
31
|
+
* ABSENT means "no preview branch, or a legacy emitter" — which is NOT
|
|
32
|
+
* `mode: "software"` (a branch exists and encodes in software) and NOT
|
|
33
|
+
* `preview.preview_hw_capability === false` (the board publishes no preview
|
|
34
|
+
* encoder at all). Those three states must never be defaulted into each other.
|
|
35
|
+
*
|
|
36
|
+
* `mode` is the ACTIVE mode. The REQUESTED mode is deliberately not an engine
|
|
37
|
+
* fact: it lives in CeraUI's persisted config.
|
|
38
|
+
*/
|
|
39
|
+
export declare const previewEncoderRealizedSchema: z.ZodObject<{
|
|
40
|
+
selected_element: z.ZodOptional<z.ZodString>;
|
|
41
|
+
realized_element: z.ZodString;
|
|
42
|
+
mode: z.ZodEnum<{
|
|
43
|
+
hardware: "hardware";
|
|
44
|
+
software: "software";
|
|
45
|
+
}>;
|
|
46
|
+
fallback_reason: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
code: z.ZodLiteral<"factory-missing">;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
code: z.ZodLiteral<"property-failure">;
|
|
50
|
+
property: z.ZodString;
|
|
51
|
+
}, z.core.$strip>], "code">>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type PreviewEncoderRealized = z.infer<typeof previewEncoderRealizedSchema>;
|
|
23
54
|
/**
|
|
24
55
|
* `status` event — stream state change + heartbeat. The trailing fields are
|
|
25
56
|
* additive: the `buffering*` / `spooled_bytes` / `data_headroom_bytes` /
|
|
@@ -28,7 +59,9 @@ export type ActiveEncode = z.infer<typeof activeEncodeSchema>;
|
|
|
28
59
|
* `active_profile` (srt-receive-profiles) reports the profile/config the stream is
|
|
29
60
|
* running under and is absent on a legacy emitter or a bare state-only heartbeat;
|
|
30
61
|
* `active_encode` (0.4.0) reports the resolved runtime encode and is absent on a
|
|
31
|
-
* legacy emitter or a bare state-only heartbeat
|
|
62
|
+
* legacy emitter or a bare state-only heartbeat; `preview_encoder_realized`
|
|
63
|
+
* reports the PREVIEW branch's own encoder and is absent when the session has no
|
|
64
|
+
* preview branch.
|
|
32
65
|
*/
|
|
33
66
|
export declare const statusEventSchema: z.ZodObject<{
|
|
34
67
|
type: z.ZodLiteral<"status">;
|
|
@@ -36,8 +69,8 @@ export declare const statusEventSchema: z.ZodObject<{
|
|
|
36
69
|
state: z.ZodEnum<{
|
|
37
70
|
idle: "idle";
|
|
38
71
|
starting: "starting";
|
|
39
|
-
streaming: "streaming";
|
|
40
72
|
stopping: "stopping";
|
|
73
|
+
streaming: "streaming";
|
|
41
74
|
}>;
|
|
42
75
|
streaming: z.ZodBoolean;
|
|
43
76
|
active_input: z.ZodOptional<z.ZodString>;
|
|
@@ -59,6 +92,20 @@ export declare const statusEventSchema: z.ZodObject<{
|
|
|
59
92
|
frames_emitted: z.ZodOptional<z.ZodNumber>;
|
|
60
93
|
pipeline_playing: z.ZodOptional<z.ZodBoolean>;
|
|
61
94
|
}, z.core.$strip>>;
|
|
95
|
+
preview_encoder_realized: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
selected_element: z.ZodOptional<z.ZodString>;
|
|
97
|
+
realized_element: z.ZodString;
|
|
98
|
+
mode: z.ZodEnum<{
|
|
99
|
+
hardware: "hardware";
|
|
100
|
+
software: "software";
|
|
101
|
+
}>;
|
|
102
|
+
fallback_reason: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
|
+
code: z.ZodLiteral<"factory-missing">;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
code: z.ZodLiteral<"property-failure">;
|
|
106
|
+
property: z.ZodString;
|
|
107
|
+
}, z.core.$strip>], "code">>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
62
109
|
}, z.core.$strip>;
|
|
63
110
|
/** Payload of a {@link statusEventSchema} event. */
|
|
64
111
|
export type StatusEvent = z.infer<typeof statusEventSchema>;
|
|
@@ -72,13 +119,13 @@ export declare const switchEventSchema: z.ZodObject<{
|
|
|
72
119
|
seq: z.ZodNumber;
|
|
73
120
|
active_input: z.ZodString;
|
|
74
121
|
mode: z.ZodEnum<{
|
|
75
|
-
manual: "manual";
|
|
76
122
|
auto: "auto";
|
|
123
|
+
manual: "manual";
|
|
77
124
|
}>;
|
|
78
125
|
reason: z.ZodOptional<z.ZodString>;
|
|
79
126
|
media_class: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
video: "video";
|
|
81
127
|
audio: "audio";
|
|
128
|
+
video: "video";
|
|
82
129
|
}>>;
|
|
83
130
|
}, z.core.$strip>;
|
|
84
131
|
/** Payload of a {@link switchEventSchema} event. */
|
|
@@ -96,8 +143,8 @@ export declare const deviceEventSchema: z.ZodObject<{
|
|
|
96
143
|
device_path: z.ZodString;
|
|
97
144
|
display_name: z.ZodString;
|
|
98
145
|
media_class: z.ZodEnum<{
|
|
99
|
-
video: "video";
|
|
100
146
|
audio: "audio";
|
|
147
|
+
video: "video";
|
|
101
148
|
}>;
|
|
102
149
|
caps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
150
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -107,25 +154,25 @@ export declare const deviceEventSchema: z.ZodObject<{
|
|
|
107
154
|
}, z.core.$strip>>>;
|
|
108
155
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
109
156
|
audio: "audio";
|
|
157
|
+
camlink: "camlink";
|
|
110
158
|
hdmi: "hdmi";
|
|
111
|
-
uvc_h264: "uvc_h264";
|
|
112
|
-
uvc_h265: "uvc_h265";
|
|
113
159
|
mjpeg: "mjpeg";
|
|
114
|
-
camlink: "camlink";
|
|
115
|
-
test: "test";
|
|
116
160
|
network: "network";
|
|
161
|
+
test: "test";
|
|
162
|
+
uvc_h264: "uvc_h264";
|
|
163
|
+
uvc_h265: "uvc_h265";
|
|
117
164
|
}>>;
|
|
118
165
|
modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
119
166
|
media_type: z.ZodString;
|
|
120
167
|
pipeline_kind: z.ZodEnum<{
|
|
121
168
|
audio: "audio";
|
|
169
|
+
camlink: "camlink";
|
|
122
170
|
hdmi: "hdmi";
|
|
123
|
-
uvc_h264: "uvc_h264";
|
|
124
|
-
uvc_h265: "uvc_h265";
|
|
125
171
|
mjpeg: "mjpeg";
|
|
126
|
-
camlink: "camlink";
|
|
127
|
-
test: "test";
|
|
128
172
|
network: "network";
|
|
173
|
+
test: "test";
|
|
174
|
+
uvc_h264: "uvc_h264";
|
|
175
|
+
uvc_h265: "uvc_h265";
|
|
129
176
|
}>;
|
|
130
177
|
caps: z.ZodArray<z.ZodObject<{
|
|
131
178
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -137,10 +184,10 @@ export declare const deviceEventSchema: z.ZodObject<{
|
|
|
137
184
|
alsa_card_id: z.ZodOptional<z.ZodString>;
|
|
138
185
|
product_name: z.ZodOptional<z.ZodString>;
|
|
139
186
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
140
|
-
hdmi: "hdmi";
|
|
141
|
-
usb: "usb";
|
|
142
187
|
bluetooth: "bluetooth";
|
|
188
|
+
hdmi: "hdmi";
|
|
143
189
|
onboard: "onboard";
|
|
190
|
+
usb: "usb";
|
|
144
191
|
}>>;
|
|
145
192
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
146
193
|
physical_group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -176,18 +223,18 @@ export declare const runtimeErrorEventSchema: z.ZodObject<{
|
|
|
176
223
|
type: z.ZodLiteral<"error">;
|
|
177
224
|
seq: z.ZodNumber;
|
|
178
225
|
code: z.ZodEnum<{
|
|
179
|
-
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
180
|
-
srtla_no_connections: "srtla_no_connections";
|
|
181
226
|
capture_audio_error: "capture_audio_error";
|
|
227
|
+
capture_unrecoverable: "capture_unrecoverable";
|
|
182
228
|
capture_video_error: "capture_video_error";
|
|
183
229
|
pipeline_stall: "pipeline_stall";
|
|
184
230
|
srt_connect_failed: "srt_connect_failed";
|
|
185
231
|
srt_connection_lost: "srt_connection_lost";
|
|
186
|
-
|
|
232
|
+
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
233
|
+
srtla_no_connections: "srtla_no_connections";
|
|
187
234
|
}>;
|
|
188
235
|
source: z.ZodEnum<{
|
|
189
|
-
srtla: "srtla";
|
|
190
236
|
engine: "engine";
|
|
237
|
+
srtla: "srtla";
|
|
191
238
|
}>;
|
|
192
239
|
reason: z.ZodOptional<z.ZodString>;
|
|
193
240
|
selected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -219,8 +266,8 @@ export declare const audioLevelEventSchema: z.ZodObject<{
|
|
|
219
266
|
source: z.ZodOptional<z.ZodObject<{
|
|
220
267
|
identity: z.ZodOptional<z.ZodString>;
|
|
221
268
|
owner: z.ZodEnum<{
|
|
222
|
-
streaming: "streaming";
|
|
223
269
|
sidecar: "sidecar";
|
|
270
|
+
streaming: "streaming";
|
|
224
271
|
}>;
|
|
225
272
|
}, z.core.$strip>>;
|
|
226
273
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
@@ -230,9 +277,9 @@ export declare const audioLevelEventSchema: z.ZodObject<{
|
|
|
230
277
|
unavailable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
231
278
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
232
279
|
device_busy: "device_busy";
|
|
233
|
-
no_device: "no_device";
|
|
234
|
-
mode_none: "mode_none";
|
|
235
280
|
handoff: "handoff";
|
|
281
|
+
mode_none: "mode_none";
|
|
282
|
+
no_device: "no_device";
|
|
236
283
|
}>>;
|
|
237
284
|
}, z.core.$strip>;
|
|
238
285
|
/** Payload of a {@link audioLevelEventSchema} event. */
|
|
@@ -250,8 +297,8 @@ export declare const configChangeEventSchema: z.ZodObject<{
|
|
|
250
297
|
seq: z.ZodNumber;
|
|
251
298
|
attempt_id: z.ZodString;
|
|
252
299
|
phase: z.ZodEnum<{
|
|
253
|
-
applying: "applying";
|
|
254
300
|
applied: "applied";
|
|
301
|
+
applying: "applying";
|
|
255
302
|
reverted: "reverted";
|
|
256
303
|
rollback_failed: "rollback_failed";
|
|
257
304
|
}>;
|
|
@@ -266,8 +313,8 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
266
313
|
state: z.ZodEnum<{
|
|
267
314
|
idle: "idle";
|
|
268
315
|
starting: "starting";
|
|
269
|
-
streaming: "streaming";
|
|
270
316
|
stopping: "stopping";
|
|
317
|
+
streaming: "streaming";
|
|
271
318
|
}>;
|
|
272
319
|
streaming: z.ZodBoolean;
|
|
273
320
|
active_input: z.ZodOptional<z.ZodString>;
|
|
@@ -289,18 +336,32 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
289
336
|
frames_emitted: z.ZodOptional<z.ZodNumber>;
|
|
290
337
|
pipeline_playing: z.ZodOptional<z.ZodBoolean>;
|
|
291
338
|
}, z.core.$strip>>;
|
|
339
|
+
preview_encoder_realized: z.ZodOptional<z.ZodObject<{
|
|
340
|
+
selected_element: z.ZodOptional<z.ZodString>;
|
|
341
|
+
realized_element: z.ZodString;
|
|
342
|
+
mode: z.ZodEnum<{
|
|
343
|
+
hardware: "hardware";
|
|
344
|
+
software: "software";
|
|
345
|
+
}>;
|
|
346
|
+
fallback_reason: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
347
|
+
code: z.ZodLiteral<"factory-missing">;
|
|
348
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
349
|
+
code: z.ZodLiteral<"property-failure">;
|
|
350
|
+
property: z.ZodString;
|
|
351
|
+
}, z.core.$strip>], "code">>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
292
353
|
}, z.core.$strip>, z.ZodObject<{
|
|
293
354
|
type: z.ZodLiteral<"switch">;
|
|
294
355
|
seq: z.ZodNumber;
|
|
295
356
|
active_input: z.ZodString;
|
|
296
357
|
mode: z.ZodEnum<{
|
|
297
|
-
manual: "manual";
|
|
298
358
|
auto: "auto";
|
|
359
|
+
manual: "manual";
|
|
299
360
|
}>;
|
|
300
361
|
reason: z.ZodOptional<z.ZodString>;
|
|
301
362
|
media_class: z.ZodOptional<z.ZodEnum<{
|
|
302
|
-
video: "video";
|
|
303
363
|
audio: "audio";
|
|
364
|
+
video: "video";
|
|
304
365
|
}>>;
|
|
305
366
|
}, z.core.$strip>, z.ZodObject<{
|
|
306
367
|
type: z.ZodLiteral<"device">;
|
|
@@ -314,8 +375,8 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
314
375
|
device_path: z.ZodString;
|
|
315
376
|
display_name: z.ZodString;
|
|
316
377
|
media_class: z.ZodEnum<{
|
|
317
|
-
video: "video";
|
|
318
378
|
audio: "audio";
|
|
379
|
+
video: "video";
|
|
319
380
|
}>;
|
|
320
381
|
caps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
321
382
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -325,25 +386,25 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
325
386
|
}, z.core.$strip>>>;
|
|
326
387
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
327
388
|
audio: "audio";
|
|
389
|
+
camlink: "camlink";
|
|
328
390
|
hdmi: "hdmi";
|
|
329
|
-
uvc_h264: "uvc_h264";
|
|
330
|
-
uvc_h265: "uvc_h265";
|
|
331
391
|
mjpeg: "mjpeg";
|
|
332
|
-
camlink: "camlink";
|
|
333
|
-
test: "test";
|
|
334
392
|
network: "network";
|
|
393
|
+
test: "test";
|
|
394
|
+
uvc_h264: "uvc_h264";
|
|
395
|
+
uvc_h265: "uvc_h265";
|
|
335
396
|
}>>;
|
|
336
397
|
modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
337
398
|
media_type: z.ZodString;
|
|
338
399
|
pipeline_kind: z.ZodEnum<{
|
|
339
400
|
audio: "audio";
|
|
401
|
+
camlink: "camlink";
|
|
340
402
|
hdmi: "hdmi";
|
|
341
|
-
uvc_h264: "uvc_h264";
|
|
342
|
-
uvc_h265: "uvc_h265";
|
|
343
403
|
mjpeg: "mjpeg";
|
|
344
|
-
camlink: "camlink";
|
|
345
|
-
test: "test";
|
|
346
404
|
network: "network";
|
|
405
|
+
test: "test";
|
|
406
|
+
uvc_h264: "uvc_h264";
|
|
407
|
+
uvc_h265: "uvc_h265";
|
|
347
408
|
}>;
|
|
348
409
|
caps: z.ZodArray<z.ZodObject<{
|
|
349
410
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -355,10 +416,10 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
355
416
|
alsa_card_id: z.ZodOptional<z.ZodString>;
|
|
356
417
|
product_name: z.ZodOptional<z.ZodString>;
|
|
357
418
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
358
|
-
hdmi: "hdmi";
|
|
359
|
-
usb: "usb";
|
|
360
419
|
bluetooth: "bluetooth";
|
|
420
|
+
hdmi: "hdmi";
|
|
361
421
|
onboard: "onboard";
|
|
422
|
+
usb: "usb";
|
|
362
423
|
}>>;
|
|
363
424
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
364
425
|
physical_group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -379,18 +440,18 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
379
440
|
type: z.ZodLiteral<"error">;
|
|
380
441
|
seq: z.ZodNumber;
|
|
381
442
|
code: z.ZodEnum<{
|
|
382
|
-
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
383
|
-
srtla_no_connections: "srtla_no_connections";
|
|
384
443
|
capture_audio_error: "capture_audio_error";
|
|
444
|
+
capture_unrecoverable: "capture_unrecoverable";
|
|
385
445
|
capture_video_error: "capture_video_error";
|
|
386
446
|
pipeline_stall: "pipeline_stall";
|
|
387
447
|
srt_connect_failed: "srt_connect_failed";
|
|
388
448
|
srt_connection_lost: "srt_connection_lost";
|
|
389
|
-
|
|
449
|
+
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
450
|
+
srtla_no_connections: "srtla_no_connections";
|
|
390
451
|
}>;
|
|
391
452
|
source: z.ZodEnum<{
|
|
392
|
-
srtla: "srtla";
|
|
393
453
|
engine: "engine";
|
|
454
|
+
srtla: "srtla";
|
|
394
455
|
}>;
|
|
395
456
|
reason: z.ZodOptional<z.ZodString>;
|
|
396
457
|
selected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -405,8 +466,8 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
405
466
|
source: z.ZodOptional<z.ZodObject<{
|
|
406
467
|
identity: z.ZodOptional<z.ZodString>;
|
|
407
468
|
owner: z.ZodEnum<{
|
|
408
|
-
streaming: "streaming";
|
|
409
469
|
sidecar: "sidecar";
|
|
470
|
+
streaming: "streaming";
|
|
410
471
|
}>;
|
|
411
472
|
}, z.core.$strip>>;
|
|
412
473
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
@@ -416,17 +477,17 @@ export declare const eventParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
416
477
|
unavailable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
417
478
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
418
479
|
device_busy: "device_busy";
|
|
419
|
-
no_device: "no_device";
|
|
420
|
-
mode_none: "mode_none";
|
|
421
480
|
handoff: "handoff";
|
|
481
|
+
mode_none: "mode_none";
|
|
482
|
+
no_device: "no_device";
|
|
422
483
|
}>>;
|
|
423
484
|
}, z.core.$strip>, z.ZodObject<{
|
|
424
485
|
type: z.ZodLiteral<"config-change">;
|
|
425
486
|
seq: z.ZodNumber;
|
|
426
487
|
attempt_id: z.ZodString;
|
|
427
488
|
phase: z.ZodEnum<{
|
|
428
|
-
applying: "applying";
|
|
429
489
|
applied: "applied";
|
|
490
|
+
applying: "applying";
|
|
430
491
|
reverted: "reverted";
|
|
431
492
|
rollback_failed: "rollback_failed";
|
|
432
493
|
}>;
|
|
@@ -443,8 +504,8 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
443
504
|
state: z.ZodEnum<{
|
|
444
505
|
idle: "idle";
|
|
445
506
|
starting: "starting";
|
|
446
|
-
streaming: "streaming";
|
|
447
507
|
stopping: "stopping";
|
|
508
|
+
streaming: "streaming";
|
|
448
509
|
}>;
|
|
449
510
|
streaming: z.ZodBoolean;
|
|
450
511
|
active_input: z.ZodOptional<z.ZodString>;
|
|
@@ -466,18 +527,32 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
466
527
|
frames_emitted: z.ZodOptional<z.ZodNumber>;
|
|
467
528
|
pipeline_playing: z.ZodOptional<z.ZodBoolean>;
|
|
468
529
|
}, z.core.$strip>>;
|
|
530
|
+
preview_encoder_realized: z.ZodOptional<z.ZodObject<{
|
|
531
|
+
selected_element: z.ZodOptional<z.ZodString>;
|
|
532
|
+
realized_element: z.ZodString;
|
|
533
|
+
mode: z.ZodEnum<{
|
|
534
|
+
hardware: "hardware";
|
|
535
|
+
software: "software";
|
|
536
|
+
}>;
|
|
537
|
+
fallback_reason: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
538
|
+
code: z.ZodLiteral<"factory-missing">;
|
|
539
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
540
|
+
code: z.ZodLiteral<"property-failure">;
|
|
541
|
+
property: z.ZodString;
|
|
542
|
+
}, z.core.$strip>], "code">>;
|
|
543
|
+
}, z.core.$strip>>;
|
|
469
544
|
}, z.core.$strip>, z.ZodObject<{
|
|
470
545
|
type: z.ZodLiteral<"switch">;
|
|
471
546
|
seq: z.ZodNumber;
|
|
472
547
|
active_input: z.ZodString;
|
|
473
548
|
mode: z.ZodEnum<{
|
|
474
|
-
manual: "manual";
|
|
475
549
|
auto: "auto";
|
|
550
|
+
manual: "manual";
|
|
476
551
|
}>;
|
|
477
552
|
reason: z.ZodOptional<z.ZodString>;
|
|
478
553
|
media_class: z.ZodOptional<z.ZodEnum<{
|
|
479
|
-
video: "video";
|
|
480
554
|
audio: "audio";
|
|
555
|
+
video: "video";
|
|
481
556
|
}>>;
|
|
482
557
|
}, z.core.$strip>, z.ZodObject<{
|
|
483
558
|
type: z.ZodLiteral<"device">;
|
|
@@ -491,8 +566,8 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
491
566
|
device_path: z.ZodString;
|
|
492
567
|
display_name: z.ZodString;
|
|
493
568
|
media_class: z.ZodEnum<{
|
|
494
|
-
video: "video";
|
|
495
569
|
audio: "audio";
|
|
570
|
+
video: "video";
|
|
496
571
|
}>;
|
|
497
572
|
caps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
498
573
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -502,25 +577,25 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
502
577
|
}, z.core.$strip>>>;
|
|
503
578
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
504
579
|
audio: "audio";
|
|
580
|
+
camlink: "camlink";
|
|
505
581
|
hdmi: "hdmi";
|
|
506
|
-
uvc_h264: "uvc_h264";
|
|
507
|
-
uvc_h265: "uvc_h265";
|
|
508
582
|
mjpeg: "mjpeg";
|
|
509
|
-
camlink: "camlink";
|
|
510
|
-
test: "test";
|
|
511
583
|
network: "network";
|
|
584
|
+
test: "test";
|
|
585
|
+
uvc_h264: "uvc_h264";
|
|
586
|
+
uvc_h265: "uvc_h265";
|
|
512
587
|
}>>;
|
|
513
588
|
modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
514
589
|
media_type: z.ZodString;
|
|
515
590
|
pipeline_kind: z.ZodEnum<{
|
|
516
591
|
audio: "audio";
|
|
592
|
+
camlink: "camlink";
|
|
517
593
|
hdmi: "hdmi";
|
|
518
|
-
uvc_h264: "uvc_h264";
|
|
519
|
-
uvc_h265: "uvc_h265";
|
|
520
594
|
mjpeg: "mjpeg";
|
|
521
|
-
camlink: "camlink";
|
|
522
|
-
test: "test";
|
|
523
595
|
network: "network";
|
|
596
|
+
test: "test";
|
|
597
|
+
uvc_h264: "uvc_h264";
|
|
598
|
+
uvc_h265: "uvc_h265";
|
|
524
599
|
}>;
|
|
525
600
|
caps: z.ZodArray<z.ZodObject<{
|
|
526
601
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -532,10 +607,10 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
532
607
|
alsa_card_id: z.ZodOptional<z.ZodString>;
|
|
533
608
|
product_name: z.ZodOptional<z.ZodString>;
|
|
534
609
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
535
|
-
hdmi: "hdmi";
|
|
536
|
-
usb: "usb";
|
|
537
610
|
bluetooth: "bluetooth";
|
|
611
|
+
hdmi: "hdmi";
|
|
538
612
|
onboard: "onboard";
|
|
613
|
+
usb: "usb";
|
|
539
614
|
}>>;
|
|
540
615
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
541
616
|
physical_group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -556,18 +631,18 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
556
631
|
type: z.ZodLiteral<"error">;
|
|
557
632
|
seq: z.ZodNumber;
|
|
558
633
|
code: z.ZodEnum<{
|
|
559
|
-
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
560
|
-
srtla_no_connections: "srtla_no_connections";
|
|
561
634
|
capture_audio_error: "capture_audio_error";
|
|
635
|
+
capture_unrecoverable: "capture_unrecoverable";
|
|
562
636
|
capture_video_error: "capture_video_error";
|
|
563
637
|
pipeline_stall: "pipeline_stall";
|
|
564
638
|
srt_connect_failed: "srt_connect_failed";
|
|
565
639
|
srt_connection_lost: "srt_connection_lost";
|
|
566
|
-
|
|
640
|
+
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
641
|
+
srtla_no_connections: "srtla_no_connections";
|
|
567
642
|
}>;
|
|
568
643
|
source: z.ZodEnum<{
|
|
569
|
-
srtla: "srtla";
|
|
570
644
|
engine: "engine";
|
|
645
|
+
srtla: "srtla";
|
|
571
646
|
}>;
|
|
572
647
|
reason: z.ZodOptional<z.ZodString>;
|
|
573
648
|
selected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -582,8 +657,8 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
582
657
|
source: z.ZodOptional<z.ZodObject<{
|
|
583
658
|
identity: z.ZodOptional<z.ZodString>;
|
|
584
659
|
owner: z.ZodEnum<{
|
|
585
|
-
streaming: "streaming";
|
|
586
660
|
sidecar: "sidecar";
|
|
661
|
+
streaming: "streaming";
|
|
587
662
|
}>;
|
|
588
663
|
}, z.core.$strip>>;
|
|
589
664
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
@@ -593,17 +668,17 @@ export declare const cerastreamEventSchema: z.ZodObject<{
|
|
|
593
668
|
unavailable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
594
669
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
595
670
|
device_busy: "device_busy";
|
|
596
|
-
no_device: "no_device";
|
|
597
|
-
mode_none: "mode_none";
|
|
598
671
|
handoff: "handoff";
|
|
672
|
+
mode_none: "mode_none";
|
|
673
|
+
no_device: "no_device";
|
|
599
674
|
}>>;
|
|
600
675
|
}, z.core.$strip>, z.ZodObject<{
|
|
601
676
|
type: z.ZodLiteral<"config-change">;
|
|
602
677
|
seq: z.ZodNumber;
|
|
603
678
|
attempt_id: z.ZodString;
|
|
604
679
|
phase: z.ZodEnum<{
|
|
605
|
-
applying: "applying";
|
|
606
680
|
applied: "applied";
|
|
681
|
+
applying: "applying";
|
|
607
682
|
reverted: "reverted";
|
|
608
683
|
rollback_failed: "rollback_failed";
|
|
609
684
|
}>;
|
|
@@ -614,7 +689,7 @@ export type CerastreamEvent = z.infer<typeof cerastreamEventSchema>;
|
|
|
614
689
|
/** The nine event topics (schema.md "Events" table) — count-assertion source.
|
|
615
690
|
* `audio-level` (Todo 21) and `config-change` (Todo 9) are additive and appended
|
|
616
691
|
* last, preserving the order of every prior topic. */
|
|
617
|
-
export declare const EVENT_TOPICS: readonly [
|
|
692
|
+
export declare const EVENT_TOPICS: readonly ['status', 'switch', 'device', 'bitrate', 'srt-stats', 'error', 'preview', 'audio-level', 'config-change'];
|
|
618
693
|
export type EventTopicName = (typeof EVENT_TOPICS)[number];
|
|
619
694
|
/** topic → payload Zod schema. Tests assert every topic is represented here. */
|
|
620
695
|
export declare const eventSchemas: {
|
|
@@ -624,8 +699,8 @@ export declare const eventSchemas: {
|
|
|
624
699
|
state: z.ZodEnum<{
|
|
625
700
|
idle: "idle";
|
|
626
701
|
starting: "starting";
|
|
627
|
-
streaming: "streaming";
|
|
628
702
|
stopping: "stopping";
|
|
703
|
+
streaming: "streaming";
|
|
629
704
|
}>;
|
|
630
705
|
streaming: z.ZodBoolean;
|
|
631
706
|
active_input: z.ZodOptional<z.ZodString>;
|
|
@@ -647,19 +722,33 @@ export declare const eventSchemas: {
|
|
|
647
722
|
frames_emitted: z.ZodOptional<z.ZodNumber>;
|
|
648
723
|
pipeline_playing: z.ZodOptional<z.ZodBoolean>;
|
|
649
724
|
}, z.core.$strip>>;
|
|
725
|
+
preview_encoder_realized: z.ZodOptional<z.ZodObject<{
|
|
726
|
+
selected_element: z.ZodOptional<z.ZodString>;
|
|
727
|
+
realized_element: z.ZodString;
|
|
728
|
+
mode: z.ZodEnum<{
|
|
729
|
+
hardware: "hardware";
|
|
730
|
+
software: "software";
|
|
731
|
+
}>;
|
|
732
|
+
fallback_reason: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
733
|
+
code: z.ZodLiteral<"factory-missing">;
|
|
734
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
735
|
+
code: z.ZodLiteral<"property-failure">;
|
|
736
|
+
property: z.ZodString;
|
|
737
|
+
}, z.core.$strip>], "code">>;
|
|
738
|
+
}, z.core.$strip>>;
|
|
650
739
|
}, z.core.$strip>;
|
|
651
740
|
readonly switch: z.ZodObject<{
|
|
652
741
|
type: z.ZodLiteral<"switch">;
|
|
653
742
|
seq: z.ZodNumber;
|
|
654
743
|
active_input: z.ZodString;
|
|
655
744
|
mode: z.ZodEnum<{
|
|
656
|
-
manual: "manual";
|
|
657
745
|
auto: "auto";
|
|
746
|
+
manual: "manual";
|
|
658
747
|
}>;
|
|
659
748
|
reason: z.ZodOptional<z.ZodString>;
|
|
660
749
|
media_class: z.ZodOptional<z.ZodEnum<{
|
|
661
|
-
video: "video";
|
|
662
750
|
audio: "audio";
|
|
751
|
+
video: "video";
|
|
663
752
|
}>>;
|
|
664
753
|
}, z.core.$strip>;
|
|
665
754
|
readonly device: z.ZodObject<{
|
|
@@ -674,8 +763,8 @@ export declare const eventSchemas: {
|
|
|
674
763
|
device_path: z.ZodString;
|
|
675
764
|
display_name: z.ZodString;
|
|
676
765
|
media_class: z.ZodEnum<{
|
|
677
|
-
video: "video";
|
|
678
766
|
audio: "audio";
|
|
767
|
+
video: "video";
|
|
679
768
|
}>;
|
|
680
769
|
caps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
681
770
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -685,25 +774,25 @@ export declare const eventSchemas: {
|
|
|
685
774
|
}, z.core.$strip>>>;
|
|
686
775
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
687
776
|
audio: "audio";
|
|
777
|
+
camlink: "camlink";
|
|
688
778
|
hdmi: "hdmi";
|
|
689
|
-
uvc_h264: "uvc_h264";
|
|
690
|
-
uvc_h265: "uvc_h265";
|
|
691
779
|
mjpeg: "mjpeg";
|
|
692
|
-
camlink: "camlink";
|
|
693
|
-
test: "test";
|
|
694
780
|
network: "network";
|
|
781
|
+
test: "test";
|
|
782
|
+
uvc_h264: "uvc_h264";
|
|
783
|
+
uvc_h265: "uvc_h265";
|
|
695
784
|
}>>;
|
|
696
785
|
modes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
697
786
|
media_type: z.ZodString;
|
|
698
787
|
pipeline_kind: z.ZodEnum<{
|
|
699
788
|
audio: "audio";
|
|
789
|
+
camlink: "camlink";
|
|
700
790
|
hdmi: "hdmi";
|
|
701
|
-
uvc_h264: "uvc_h264";
|
|
702
|
-
uvc_h265: "uvc_h265";
|
|
703
791
|
mjpeg: "mjpeg";
|
|
704
|
-
camlink: "camlink";
|
|
705
|
-
test: "test";
|
|
706
792
|
network: "network";
|
|
793
|
+
test: "test";
|
|
794
|
+
uvc_h264: "uvc_h264";
|
|
795
|
+
uvc_h265: "uvc_h265";
|
|
707
796
|
}>;
|
|
708
797
|
caps: z.ZodArray<z.ZodObject<{
|
|
709
798
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -715,10 +804,10 @@ export declare const eventSchemas: {
|
|
|
715
804
|
alsa_card_id: z.ZodOptional<z.ZodString>;
|
|
716
805
|
product_name: z.ZodOptional<z.ZodString>;
|
|
717
806
|
transport: z.ZodOptional<z.ZodEnum<{
|
|
718
|
-
hdmi: "hdmi";
|
|
719
|
-
usb: "usb";
|
|
720
807
|
bluetooth: "bluetooth";
|
|
808
|
+
hdmi: "hdmi";
|
|
721
809
|
onboard: "onboard";
|
|
810
|
+
usb: "usb";
|
|
722
811
|
}>>;
|
|
723
812
|
stable_id: z.ZodOptional<z.ZodString>;
|
|
724
813
|
physical_group_id: z.ZodOptional<z.ZodString>;
|
|
@@ -731,7 +820,7 @@ export declare const eventSchemas: {
|
|
|
731
820
|
current_bitrate: z.ZodNumber;
|
|
732
821
|
max_bitrate: z.ZodNumber;
|
|
733
822
|
}, z.core.$strip>;
|
|
734
|
-
readonly
|
|
823
|
+
readonly 'srt-stats': z.ZodObject<{
|
|
735
824
|
type: z.ZodLiteral<"srt-stats">;
|
|
736
825
|
seq: z.ZodNumber;
|
|
737
826
|
rtt_ms: z.ZodNumber;
|
|
@@ -742,18 +831,18 @@ export declare const eventSchemas: {
|
|
|
742
831
|
type: z.ZodLiteral<"error">;
|
|
743
832
|
seq: z.ZodNumber;
|
|
744
833
|
code: z.ZodEnum<{
|
|
745
|
-
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
746
|
-
srtla_no_connections: "srtla_no_connections";
|
|
747
834
|
capture_audio_error: "capture_audio_error";
|
|
835
|
+
capture_unrecoverable: "capture_unrecoverable";
|
|
748
836
|
capture_video_error: "capture_video_error";
|
|
749
837
|
pipeline_stall: "pipeline_stall";
|
|
750
838
|
srt_connect_failed: "srt_connect_failed";
|
|
751
839
|
srt_connection_lost: "srt_connection_lost";
|
|
752
|
-
|
|
840
|
+
srtla_initial_connect_failed: "srtla_initial_connect_failed";
|
|
841
|
+
srtla_no_connections: "srtla_no_connections";
|
|
753
842
|
}>;
|
|
754
843
|
source: z.ZodEnum<{
|
|
755
|
-
srtla: "srtla";
|
|
756
844
|
engine: "engine";
|
|
845
|
+
srtla: "srtla";
|
|
757
846
|
}>;
|
|
758
847
|
reason: z.ZodOptional<z.ZodString>;
|
|
759
848
|
selected: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -764,14 +853,14 @@ export declare const eventSchemas: {
|
|
|
764
853
|
session_id: z.ZodString;
|
|
765
854
|
phase: z.ZodString;
|
|
766
855
|
}, z.core.$strip>;
|
|
767
|
-
readonly
|
|
856
|
+
readonly 'audio-level': z.ZodObject<{
|
|
768
857
|
type: z.ZodLiteral<"audio-level">;
|
|
769
858
|
seq: z.ZodNumber;
|
|
770
859
|
source: z.ZodOptional<z.ZodObject<{
|
|
771
860
|
identity: z.ZodOptional<z.ZodString>;
|
|
772
861
|
owner: z.ZodEnum<{
|
|
773
|
-
streaming: "streaming";
|
|
774
862
|
sidecar: "sidecar";
|
|
863
|
+
streaming: "streaming";
|
|
775
864
|
}>;
|
|
776
865
|
}, z.core.$strip>>;
|
|
777
866
|
channels: z.ZodOptional<z.ZodNumber>;
|
|
@@ -781,18 +870,18 @@ export declare const eventSchemas: {
|
|
|
781
870
|
unavailable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
782
871
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
783
872
|
device_busy: "device_busy";
|
|
784
|
-
no_device: "no_device";
|
|
785
|
-
mode_none: "mode_none";
|
|
786
873
|
handoff: "handoff";
|
|
874
|
+
mode_none: "mode_none";
|
|
875
|
+
no_device: "no_device";
|
|
787
876
|
}>>;
|
|
788
877
|
}, z.core.$strip>;
|
|
789
|
-
readonly
|
|
878
|
+
readonly 'config-change': z.ZodObject<{
|
|
790
879
|
type: z.ZodLiteral<"config-change">;
|
|
791
880
|
seq: z.ZodNumber;
|
|
792
881
|
attempt_id: z.ZodString;
|
|
793
882
|
phase: z.ZodEnum<{
|
|
794
|
-
applying: "applying";
|
|
795
883
|
applied: "applied";
|
|
884
|
+
applying: "applying";
|
|
796
885
|
reverted: "reverted";
|
|
797
886
|
rollback_failed: "rollback_failed";
|
|
798
887
|
}>;
|