@camstack/types 1.2.322 → 1.2.323
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/addon.js +3 -14
- package/dist/addon.mjs +3 -14
- package/dist/capabilities/decoder.cap.d.ts +0 -211
- package/dist/capabilities/index.d.ts +6 -6
- package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
- package/dist/capabilities/llm.cap.d.ts +4 -4
- package/dist/capabilities/local-network.cap.d.ts +11 -11
- package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +9 -13
- package/dist/capabilities/pipeline-runner.cap.d.ts +0 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +9 -79
- package/dist/capabilities/stream-broker.cap.d.ts +0 -85
- package/dist/capabilities/webrtc-session.cap.d.ts +0 -2
- package/dist/client.js +2 -80
- package/dist/client.mjs +2 -80
- package/dist/enums/event-category.d.ts +0 -9
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-BGmz_oxW.mjs → event-category-B_0XEcLF.mjs} +0 -9
- package/dist/{event-category-DmS_tLsU.js → event-category-CtBAl88K.js} +0 -9
- package/dist/ffmpeg/hwaccel.d.ts +1 -1
- package/dist/generated/addon-api.d.ts +0 -105
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +22 -291
- package/dist/index.mjs +23 -283
- package/dist/interfaces/api-responses.d.ts +0 -19
- package/dist/interfaces/capability.d.ts +1 -2
- package/dist/interfaces/event-bus.d.ts +0 -13
- package/dist/interfaces/pipeline-runner-capability.d.ts +0 -1
- package/dist/interfaces/stream-broker.d.ts +2 -67
- package/dist/{sleep-DAJ9Er57.mjs → sleep-BNeXenvr.mjs} +11 -86
- package/dist/{sleep-AalHiRYL.js → sleep-DPar9AHl.js} +10 -115
- package/package.json +1 -1
- package/dist/interfaces/decoder.d.ts +0 -89
|
@@ -491,7 +491,6 @@ declare const RunnerLocalLoadSchema: z.ZodObject<{
|
|
|
491
491
|
deviceKey: z.ZodString;
|
|
492
492
|
backend: z.ZodString;
|
|
493
493
|
attachedCameras: z.ZodNumber;
|
|
494
|
-
queueDepthTotal: z.ZodNumber;
|
|
495
494
|
}, z.core.$strip>>>;
|
|
496
495
|
hardware: z.ZodObject<{
|
|
497
496
|
hasGpu: z.ZodBoolean;
|
|
@@ -818,7 +817,6 @@ export declare const pipelineRunnerCapability: {
|
|
|
818
817
|
deviceKey: z.ZodString;
|
|
819
818
|
backend: z.ZodString;
|
|
820
819
|
attachedCameras: z.ZodNumber;
|
|
821
|
-
queueDepthTotal: z.ZodNumber;
|
|
822
820
|
}, z.core.$strip>>>;
|
|
823
821
|
hardware: z.ZodObject<{
|
|
824
822
|
hasGpu: z.ZodBoolean;
|
|
@@ -170,35 +170,12 @@ export declare const StreamSourceSchema: z.ZodObject<{
|
|
|
170
170
|
audioCodec: z.ZodOptional<z.ZodString>;
|
|
171
171
|
metadata: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
172
172
|
}, z.core.$strip>;
|
|
173
|
-
export declare const EncodedPacketSchema: z.ZodObject<{
|
|
174
|
-
type: z.ZodEnum<{
|
|
175
|
-
audio: "audio";
|
|
176
|
-
video: "video";
|
|
177
|
-
}>;
|
|
178
|
-
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
179
|
-
pts: z.ZodNumber;
|
|
180
|
-
dts: z.ZodNumber;
|
|
181
|
-
keyframe: z.ZodBoolean;
|
|
182
|
-
codec: z.ZodString;
|
|
183
|
-
}, z.core.$strip>;
|
|
184
|
-
export declare const DecodedFrameSchema: z.ZodObject<{
|
|
185
|
-
data: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
186
|
-
width: z.ZodNumber;
|
|
187
|
-
height: z.ZodNumber;
|
|
188
|
-
format: z.ZodEnum<{
|
|
189
|
-
jpeg: "jpeg";
|
|
190
|
-
rgb: "rgb";
|
|
191
|
-
bgr: "bgr";
|
|
192
|
-
yuv420: "yuv420";
|
|
193
|
-
gray: "gray";
|
|
194
|
-
}>;
|
|
195
|
-
timestamp: z.ZodNumber;
|
|
196
|
-
}, z.core.$strip>;
|
|
197
173
|
/**
|
|
198
174
|
* Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
|
|
199
175
|
* frame in a shared-memory ring (Phase 5 / D9). Mirrors the `FrameHandle` TS
|
|
200
|
-
* interface in `interfaces/frame-handle.ts` field-for-field so a
|
|
201
|
-
*
|
|
176
|
+
* interface in `interfaces/frame-handle.ts` field-for-field so a cap method
|
|
177
|
+
* (the runner's native-crop and pipeline-executor inputs) can carry handles
|
|
178
|
+
* over tRPC / Moleculer.
|
|
202
179
|
*
|
|
203
180
|
* The `satisfies` assertion below pins this schema to the interface: if a
|
|
204
181
|
* field is added to / removed from `FrameHandle` without a matching schema
|
|
@@ -223,49 +200,6 @@ export declare const FrameHandleSchema: z.ZodObject<{
|
|
|
223
200
|
nodeId: z.ZodString;
|
|
224
201
|
slotCount: z.ZodNumber;
|
|
225
202
|
}, z.core.$strip>;
|
|
226
|
-
/**
|
|
227
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
228
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
229
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
230
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
231
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
232
|
-
*/
|
|
233
|
-
export declare const FrameHandleFormatSchema: z.ZodEnum<{
|
|
234
|
-
rgb: "rgb";
|
|
235
|
-
bgr: "bgr";
|
|
236
|
-
yuv420: "yuv420";
|
|
237
|
-
gray: "gray";
|
|
238
|
-
}>;
|
|
239
|
-
export type FrameHandleFormat = z.infer<typeof FrameHandleFormatSchema>;
|
|
240
|
-
/**
|
|
241
|
-
* Input for `stream-broker.subscribeFrames` (Phase 5 / D9). A consumer asks the
|
|
242
|
-
* broker for a `FrameHandle` stream of one `format`; the broker maintains one
|
|
243
|
-
* shared-memory ring per `(brokerId, format)` actually requested, so a `gray`
|
|
244
|
-
* subscriber (motion) and an `rgb` subscriber (detection) each read the format
|
|
245
|
-
* they asked for with no broker-side conversion.
|
|
246
|
-
*/
|
|
247
|
-
export declare const SubscribeFramesInputSchema: z.ZodObject<{
|
|
248
|
-
brokerId: z.ZodString;
|
|
249
|
-
format: z.ZodEnum<{
|
|
250
|
-
rgb: "rgb";
|
|
251
|
-
bgr: "bgr";
|
|
252
|
-
yuv420: "yuv420";
|
|
253
|
-
gray: "gray";
|
|
254
|
-
}>;
|
|
255
|
-
maxFps: z.ZodOptional<z.ZodNumber>;
|
|
256
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
257
|
-
}, z.core.$strip>;
|
|
258
|
-
export type SubscribeFramesInput = z.infer<typeof SubscribeFramesInputSchema>;
|
|
259
|
-
/**
|
|
260
|
-
* Result of `stream-broker.subscribeFrames`. The consumer then polls
|
|
261
|
-
* `pullFrameHandles({ subscriptionId, maxCount })` and feeds each returned
|
|
262
|
-
* `FrameHandle` to a `FrameRingReader`.
|
|
263
|
-
*/
|
|
264
|
-
export declare const SubscribeFramesResultSchema: z.ZodObject<{
|
|
265
|
-
subscriptionId: z.ZodString;
|
|
266
|
-
maxFps: z.ZodNumber;
|
|
267
|
-
}, z.core.$strip>;
|
|
268
|
-
export type SubscribeFramesResult = z.infer<typeof SubscribeFramesResultSchema>;
|
|
269
203
|
/**
|
|
270
204
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
271
205
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
@@ -274,8 +208,8 @@ export type SubscribeFramesResult = z.infer<typeof SubscribeFramesResultSchema>;
|
|
|
274
208
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
275
209
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
276
210
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
277
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
278
|
-
*
|
|
211
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
212
|
+
* it.
|
|
279
213
|
*/
|
|
280
214
|
export declare const AudioChunkFormatSchema: z.ZodEnum<{
|
|
281
215
|
f32le: "f32le";
|
|
@@ -295,11 +229,10 @@ export declare const DecodedAudioChunkSchema: z.ZodObject<{
|
|
|
295
229
|
}, z.core.$strip>;
|
|
296
230
|
export type DecodedAudioChunkWire = z.infer<typeof DecodedAudioChunkSchema>;
|
|
297
231
|
/**
|
|
298
|
-
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9).
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
* `pullAudioChunks`.
|
|
232
|
+
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). Audio ships
|
|
233
|
+
* its bytes inline: a consumer asks the broker for the decoded audio-chunk
|
|
234
|
+
* stream of one broker; the broker keeps a per-subscription bounded FIFO queue
|
|
235
|
+
* the consumer drains via `pullAudioChunks`.
|
|
303
236
|
*/
|
|
304
237
|
export declare const SubscribeAudioChunksInputSchema: z.ZodObject<{
|
|
305
238
|
brokerId: z.ZodString;
|
|
@@ -332,9 +265,7 @@ export declare const BrokerStatsSchema: z.ZodObject<{
|
|
|
332
265
|
stopped: "stopped";
|
|
333
266
|
}>;
|
|
334
267
|
inputFps: z.ZodNumber;
|
|
335
|
-
decodeFps: z.ZodNumber;
|
|
336
268
|
encodedSubscribers: z.ZodNumber;
|
|
337
|
-
decodedSubscribers: z.ZodNumber;
|
|
338
269
|
uptimeMs: z.ZodNumber;
|
|
339
270
|
bitrateKbps: z.ZodNumber;
|
|
340
271
|
idrIntervalMs: z.ZodNumber;
|
|
@@ -346,7 +277,6 @@ export declare const BrokerStatsSchema: z.ZodObject<{
|
|
|
346
277
|
preBufferSec: z.ZodNumber;
|
|
347
278
|
preBufferMs: z.ZodNumber;
|
|
348
279
|
preBufferPackets: z.ZodNumber;
|
|
349
|
-
decoderNodeId: z.ZodNullable<z.ZodString>;
|
|
350
280
|
audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
351
281
|
codec: z.ZodString;
|
|
352
282
|
sampleRate: z.ZodNumber;
|
|
@@ -110,13 +110,6 @@ export declare const BrokerRtspClientSchema: z.ZodObject<{
|
|
|
110
110
|
lastRtpAt: z.ZodNumber;
|
|
111
111
|
bytesSent: z.ZodNumber;
|
|
112
112
|
}, z.core.$strip>;
|
|
113
|
-
export declare const BrokerDecodedClientSchema: z.ZodObject<{
|
|
114
|
-
tag: z.ZodString;
|
|
115
|
-
subscribedAt: z.ZodNumber;
|
|
116
|
-
maxFps: z.ZodNumber;
|
|
117
|
-
framesDelivered: z.ZodNumber;
|
|
118
|
-
framesDropped: z.ZodNumber;
|
|
119
|
-
}, z.core.$strip>;
|
|
120
113
|
export declare const BrokerAudioClientSchema: z.ZodObject<{
|
|
121
114
|
tag: z.ZodString;
|
|
122
115
|
subscribedAt: z.ZodNumber;
|
|
@@ -232,13 +225,6 @@ export declare const BrokerClientsSchema: z.ZodObject<{
|
|
|
232
225
|
lastRtpAt: z.ZodNumber;
|
|
233
226
|
bytesSent: z.ZodNumber;
|
|
234
227
|
}, z.core.$strip>>>;
|
|
235
|
-
decoded: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
236
|
-
tag: z.ZodString;
|
|
237
|
-
subscribedAt: z.ZodNumber;
|
|
238
|
-
maxFps: z.ZodNumber;
|
|
239
|
-
framesDelivered: z.ZodNumber;
|
|
240
|
-
framesDropped: z.ZodNumber;
|
|
241
|
-
}, z.core.$strip>>>;
|
|
242
228
|
audio: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
243
229
|
tag: z.ZodString;
|
|
244
230
|
subscribedAt: z.ZodNumber;
|
|
@@ -290,7 +276,6 @@ export declare const BrokerClientsSchema: z.ZodObject<{
|
|
|
290
276
|
encodedSubscribers: z.ZodNumber;
|
|
291
277
|
}, z.core.$strip>;
|
|
292
278
|
export type BrokerRtspClient = z.infer<typeof BrokerRtspClientSchema>;
|
|
293
|
-
export type BrokerDecodedClient = z.infer<typeof BrokerDecodedClientSchema>;
|
|
294
279
|
export type BrokerAudioClient = z.infer<typeof BrokerAudioClientSchema>;
|
|
295
280
|
export type BrokerClients = z.infer<typeof BrokerClientsSchema>;
|
|
296
281
|
export declare const PlaceholderReasonSchema: z.ZodEnum<{
|
|
@@ -914,9 +899,7 @@ export declare const streamBrokerCapability: {
|
|
|
914
899
|
stopped: "stopped";
|
|
915
900
|
}>;
|
|
916
901
|
inputFps: z.ZodNumber;
|
|
917
|
-
decodeFps: z.ZodNumber;
|
|
918
902
|
encodedSubscribers: z.ZodNumber;
|
|
919
|
-
decodedSubscribers: z.ZodNumber;
|
|
920
903
|
uptimeMs: z.ZodNumber;
|
|
921
904
|
bitrateKbps: z.ZodNumber;
|
|
922
905
|
idrIntervalMs: z.ZodNumber;
|
|
@@ -928,7 +911,6 @@ export declare const streamBrokerCapability: {
|
|
|
928
911
|
preBufferSec: z.ZodNumber;
|
|
929
912
|
preBufferMs: z.ZodNumber;
|
|
930
913
|
preBufferPackets: z.ZodNumber;
|
|
931
|
-
decoderNodeId: z.ZodNullable<z.ZodString>;
|
|
932
914
|
audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
933
915
|
codec: z.ZodString;
|
|
934
916
|
sampleRate: z.ZodNumber;
|
|
@@ -965,13 +947,6 @@ export declare const streamBrokerCapability: {
|
|
|
965
947
|
lastRtpAt: z.ZodNumber;
|
|
966
948
|
bytesSent: z.ZodNumber;
|
|
967
949
|
}, z.core.$strip>>>;
|
|
968
|
-
decoded: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
969
|
-
tag: z.ZodString;
|
|
970
|
-
subscribedAt: z.ZodNumber;
|
|
971
|
-
maxFps: z.ZodNumber;
|
|
972
|
-
framesDelivered: z.ZodNumber;
|
|
973
|
-
framesDropped: z.ZodNumber;
|
|
974
|
-
}, z.core.$strip>>>;
|
|
975
950
|
audio: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
976
951
|
tag: z.ZodString;
|
|
977
952
|
subscribedAt: z.ZodNumber;
|
|
@@ -1027,7 +1002,6 @@ export declare const streamBrokerCapability: {
|
|
|
1027
1002
|
channel: z.ZodEnum<{
|
|
1028
1003
|
audio: "audio";
|
|
1029
1004
|
rtsp: "rtsp";
|
|
1030
|
-
decoded: "decoded";
|
|
1031
1005
|
}>;
|
|
1032
1006
|
handle: z.ZodString;
|
|
1033
1007
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1293,65 +1267,6 @@ export declare const streamBrokerCapability: {
|
|
|
1293
1267
|
}, z.core.$strip>, z.ZodObject<{
|
|
1294
1268
|
released: z.ZodBoolean;
|
|
1295
1269
|
}, z.core.$strip>, "mutation">;
|
|
1296
|
-
/**
|
|
1297
|
-
* ── Shared-memory frame plane (Phase 5 / D9) ──────────────────────
|
|
1298
|
-
*
|
|
1299
|
-
* The handle-based replacement for the live-object `IStreamBroker.
|
|
1300
|
-
* onDecodedFrame` callback path. A consumer:
|
|
1301
|
-
*
|
|
1302
|
-
* 1. `subscribeFrames({ brokerId, format })` — the broker spins up
|
|
1303
|
-
* (or reuses) a `frameSink: 'shm'` decoder session producing that
|
|
1304
|
-
* `format` and returns a `subscriptionId`.
|
|
1305
|
-
* 2. polls `pullFrameHandles({ subscriptionId, maxCount })` — drains
|
|
1306
|
-
* zero-pixel `FrameHandle[]`; each handle is fed to a
|
|
1307
|
-
* `FrameRingReader` that opens the named shm segment and reads the
|
|
1308
|
-
* pixels back zero-copy.
|
|
1309
|
-
* 3. `unsubscribeFrames({ subscriptionId })` on teardown.
|
|
1310
|
-
*
|
|
1311
|
-
* The broker keeps one shm ring per `(brokerId, format)` actually
|
|
1312
|
-
* requested — no broker-side `sharp` conversion. fps throttling is
|
|
1313
|
-
* implicit (latest-wins ring reads drop frames for a slow consumer).
|
|
1314
|
-
*/
|
|
1315
|
-
readonly subscribeFrames: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1316
|
-
brokerId: z.ZodString;
|
|
1317
|
-
format: z.ZodEnum<{
|
|
1318
|
-
rgb: "rgb";
|
|
1319
|
-
bgr: "bgr";
|
|
1320
|
-
yuv420: "yuv420";
|
|
1321
|
-
gray: "gray";
|
|
1322
|
-
}>;
|
|
1323
|
-
maxFps: z.ZodOptional<z.ZodNumber>;
|
|
1324
|
-
tag: z.ZodOptional<z.ZodString>;
|
|
1325
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1326
|
-
subscriptionId: z.ZodString;
|
|
1327
|
-
maxFps: z.ZodNumber;
|
|
1328
|
-
}, z.core.$strip>, "mutation">;
|
|
1329
|
-
readonly pullFrameHandles: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1330
|
-
subscriptionId: z.ZodString;
|
|
1331
|
-
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
1332
|
-
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
1333
|
-
shmId: z.ZodString;
|
|
1334
|
-
slot: z.ZodNumber;
|
|
1335
|
-
seq: z.ZodNumber;
|
|
1336
|
-
width: z.ZodNumber;
|
|
1337
|
-
height: z.ZodNumber;
|
|
1338
|
-
format: z.ZodEnum<{
|
|
1339
|
-
jpeg: "jpeg";
|
|
1340
|
-
rgb: "rgb";
|
|
1341
|
-
bgr: "bgr";
|
|
1342
|
-
yuv420: "yuv420";
|
|
1343
|
-
gray: "gray";
|
|
1344
|
-
}>;
|
|
1345
|
-
pts: z.ZodNumber;
|
|
1346
|
-
byteLength: z.ZodNumber;
|
|
1347
|
-
nodeId: z.ZodString;
|
|
1348
|
-
slotCount: z.ZodNumber;
|
|
1349
|
-
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
1350
|
-
readonly unsubscribeFrames: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1351
|
-
subscriptionId: z.ZodString;
|
|
1352
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1353
|
-
released: z.ZodBoolean;
|
|
1354
|
-
}, z.core.$strip>, "mutation">;
|
|
1355
1270
|
readonly setPreBufferDuration: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
1356
1271
|
brokerId: z.ZodString;
|
|
1357
1272
|
seconds: z.ZodNumber;
|
|
@@ -73,7 +73,6 @@ export declare const WebrtcStreamChoiceSchema: z.ZodObject<{
|
|
|
73
73
|
stopped: "stopped";
|
|
74
74
|
}>>;
|
|
75
75
|
inputFps: z.ZodNullable<z.ZodNumber>;
|
|
76
|
-
decodeFps: z.ZodNullable<z.ZodNumber>;
|
|
77
76
|
bitrateKbps: z.ZodNullable<z.ZodNumber>;
|
|
78
77
|
}, z.core.$strip>;
|
|
79
78
|
export type WebrtcStreamChoice = z.infer<typeof WebrtcStreamChoiceSchema>;
|
|
@@ -336,7 +335,6 @@ export declare const webrtcSessionCapability: {
|
|
|
336
335
|
stopped: "stopped";
|
|
337
336
|
}>>;
|
|
338
337
|
inputFps: z.ZodNullable<z.ZodNumber>;
|
|
339
|
-
decodeFps: z.ZodNullable<z.ZodNumber>;
|
|
340
338
|
bitrateKbps: z.ZodNullable<z.ZodNumber>;
|
|
341
339
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
342
340
|
/**
|
package/dist/client.js
CHANGED
|
@@ -228,27 +228,6 @@ zod.z.object({
|
|
|
228
228
|
audioCodec: zod.z.string().optional(),
|
|
229
229
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).readonly().optional()
|
|
230
230
|
});
|
|
231
|
-
zod.z.object({
|
|
232
|
-
type: zod.z.enum(["video", "audio"]),
|
|
233
|
-
data: zod.z.instanceof(Uint8Array),
|
|
234
|
-
pts: zod.z.number(),
|
|
235
|
-
dts: zod.z.number(),
|
|
236
|
-
keyframe: zod.z.boolean(),
|
|
237
|
-
codec: zod.z.string()
|
|
238
|
-
});
|
|
239
|
-
zod.z.object({
|
|
240
|
-
data: zod.z.instanceof(Uint8Array),
|
|
241
|
-
width: zod.z.number(),
|
|
242
|
-
height: zod.z.number(),
|
|
243
|
-
format: zod.z.enum([
|
|
244
|
-
"jpeg",
|
|
245
|
-
"rgb",
|
|
246
|
-
"bgr",
|
|
247
|
-
"yuv420",
|
|
248
|
-
"gray"
|
|
249
|
-
]),
|
|
250
|
-
timestamp: zod.z.number()
|
|
251
|
-
});
|
|
252
231
|
zod.z.object({
|
|
253
232
|
shmId: zod.z.string(),
|
|
254
233
|
slot: zod.z.number().int().nonnegative(),
|
|
@@ -268,38 +247,6 @@ zod.z.object({
|
|
|
268
247
|
slotCount: zod.z.number().int().positive()
|
|
269
248
|
});
|
|
270
249
|
/**
|
|
271
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
272
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
273
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
274
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
275
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
276
|
-
*/
|
|
277
|
-
var FrameHandleFormatSchema = zod.z.enum([
|
|
278
|
-
"rgb",
|
|
279
|
-
"bgr",
|
|
280
|
-
"yuv420",
|
|
281
|
-
"gray"
|
|
282
|
-
]);
|
|
283
|
-
zod.z.object({
|
|
284
|
-
brokerId: zod.z.string(),
|
|
285
|
-
format: FrameHandleFormatSchema,
|
|
286
|
-
/**
|
|
287
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
288
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
289
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
290
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
291
|
-
*/
|
|
292
|
-
maxFps: zod.z.number().positive().optional(),
|
|
293
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
294
|
-
tag: zod.z.string().optional()
|
|
295
|
-
});
|
|
296
|
-
zod.z.object({
|
|
297
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
298
|
-
subscriptionId: zod.z.string(),
|
|
299
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
300
|
-
maxFps: zod.z.number().nonnegative()
|
|
301
|
-
});
|
|
302
|
-
/**
|
|
303
250
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
304
251
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
305
252
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -307,8 +254,8 @@ zod.z.object({
|
|
|
307
254
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
308
255
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
309
256
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
310
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
311
|
-
*
|
|
257
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
258
|
+
* it.
|
|
312
259
|
*/
|
|
313
260
|
var AudioChunkFormatSchema = zod.z.enum(AUDIO_CHUNK_FORMATS);
|
|
314
261
|
zod.z.object({
|
|
@@ -354,9 +301,7 @@ var BrokerStatusSchema = zod.z.enum([
|
|
|
354
301
|
zod.z.object({
|
|
355
302
|
status: BrokerStatusSchema,
|
|
356
303
|
inputFps: zod.z.number(),
|
|
357
|
-
decodeFps: zod.z.number(),
|
|
358
304
|
encodedSubscribers: zod.z.number(),
|
|
359
|
-
decodedSubscribers: zod.z.number(),
|
|
360
305
|
uptimeMs: zod.z.number(),
|
|
361
306
|
bitrateKbps: zod.z.number(),
|
|
362
307
|
idrIntervalMs: zod.z.number(),
|
|
@@ -369,14 +314,6 @@ zod.z.object({
|
|
|
369
314
|
preBufferMs: zod.z.number(),
|
|
370
315
|
preBufferPackets: zod.z.number(),
|
|
371
316
|
/**
|
|
372
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
373
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
374
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
375
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
376
|
-
* a separate cap call per broker.
|
|
377
|
-
*/
|
|
378
|
-
decoderNodeId: zod.z.string().nullable(),
|
|
379
|
-
/**
|
|
380
317
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
381
318
|
* when the stream has no audio track or the broker is in cold start.
|
|
382
319
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7152,19 +7089,7 @@ function createSystemProxy(api) {
|
|
|
7152
7089
|
validateComposition: (input) => dispatch("coreBlocks", "validateComposition", "mutation", input)
|
|
7153
7090
|
},
|
|
7154
7091
|
decoder: {
|
|
7155
|
-
supportsCodec: (input) => dispatch("decoder", "supportsCodec", "query", input),
|
|
7156
7092
|
getInfo: (input) => dispatch("decoder", "getInfo", "query", input),
|
|
7157
|
-
createSession: (input) => dispatch("decoder", "createSession", "query", input),
|
|
7158
|
-
destroySession: (input) => dispatch("decoder", "destroySession", "query", input),
|
|
7159
|
-
pushPacket: (input) => dispatch("decoder", "pushPacket", "query", input),
|
|
7160
|
-
openStream: (input) => dispatch("decoder", "openStream", "query", input),
|
|
7161
|
-
pullFrames: (input) => dispatch("decoder", "pullFrames", "query", input),
|
|
7162
|
-
pullHandles: (input) => dispatch("decoder", "pullHandles", "query", input),
|
|
7163
|
-
getFrame: (input) => dispatch("decoder", "getFrame", "query", input),
|
|
7164
|
-
getShmStats: (input) => dispatch("decoder", "getShmStats", "query", input),
|
|
7165
|
-
updateConfig: (input) => dispatch("decoder", "updateConfig", "query", input),
|
|
7166
|
-
getStats: (input) => dispatch("decoder", "getStats", "query", input),
|
|
7167
|
-
listActiveSessions: (input) => dispatch("decoder", "listActiveSessions", "query", input),
|
|
7168
7093
|
reprobeHwaccel: (input) => dispatch("decoder", "reprobeHwaccel", "mutation", input)
|
|
7169
7094
|
},
|
|
7170
7095
|
deviceAdoption: {
|
|
@@ -7641,9 +7566,6 @@ function createSystemProxy(api) {
|
|
|
7641
7566
|
subscribeAudioChunks: (input) => dispatch("streamBroker", "subscribeAudioChunks", "mutation", input),
|
|
7642
7567
|
pullAudioChunks: (input) => dispatch("streamBroker", "pullAudioChunks", "query", input),
|
|
7643
7568
|
unsubscribeAudioChunks: (input) => dispatch("streamBroker", "unsubscribeAudioChunks", "mutation", input),
|
|
7644
|
-
subscribeFrames: (input) => dispatch("streamBroker", "subscribeFrames", "mutation", input),
|
|
7645
|
-
pullFrameHandles: (input) => dispatch("streamBroker", "pullFrameHandles", "query", input),
|
|
7646
|
-
unsubscribeFrames: (input) => dispatch("streamBroker", "unsubscribeFrames", "mutation", input),
|
|
7647
7569
|
setPreBufferDuration: (input) => dispatch("streamBroker", "setPreBufferDuration", "mutation", input),
|
|
7648
7570
|
getPreBufferInfo: (input) => dispatch("streamBroker", "getPreBufferInfo", "query", input),
|
|
7649
7571
|
getRtspPort: (input) => dispatch("streamBroker", "getRtspPort", "query", input),
|
package/dist/client.mjs
CHANGED
|
@@ -227,27 +227,6 @@ z.object({
|
|
|
227
227
|
audioCodec: z.string().optional(),
|
|
228
228
|
metadata: z.record(z.string(), z.unknown()).readonly().optional()
|
|
229
229
|
});
|
|
230
|
-
z.object({
|
|
231
|
-
type: z.enum(["video", "audio"]),
|
|
232
|
-
data: z.instanceof(Uint8Array),
|
|
233
|
-
pts: z.number(),
|
|
234
|
-
dts: z.number(),
|
|
235
|
-
keyframe: z.boolean(),
|
|
236
|
-
codec: z.string()
|
|
237
|
-
});
|
|
238
|
-
z.object({
|
|
239
|
-
data: z.instanceof(Uint8Array),
|
|
240
|
-
width: z.number(),
|
|
241
|
-
height: z.number(),
|
|
242
|
-
format: z.enum([
|
|
243
|
-
"jpeg",
|
|
244
|
-
"rgb",
|
|
245
|
-
"bgr",
|
|
246
|
-
"yuv420",
|
|
247
|
-
"gray"
|
|
248
|
-
]),
|
|
249
|
-
timestamp: z.number()
|
|
250
|
-
});
|
|
251
230
|
z.object({
|
|
252
231
|
shmId: z.string(),
|
|
253
232
|
slot: z.number().int().nonnegative(),
|
|
@@ -267,38 +246,6 @@ z.object({
|
|
|
267
246
|
slotCount: z.number().int().positive()
|
|
268
247
|
});
|
|
269
248
|
/**
|
|
270
|
-
* Pixel format a frame-handle subscriber can request from the broker
|
|
271
|
-
* (Phase 5 / D9). The packed, raster subset of `FrameFormat` — the formats a
|
|
272
|
-
* `frameSink: 'shm'` decoder session can write into a `FrameRing` slot.
|
|
273
|
-
* `jpeg` is excluded: a variable-length stream is not a fixed-stride ring
|
|
274
|
-
* payload, and no decoded-frame consumer requests it over the shm plane.
|
|
275
|
-
*/
|
|
276
|
-
var FrameHandleFormatSchema = z.enum([
|
|
277
|
-
"rgb",
|
|
278
|
-
"bgr",
|
|
279
|
-
"yuv420",
|
|
280
|
-
"gray"
|
|
281
|
-
]);
|
|
282
|
-
z.object({
|
|
283
|
-
brokerId: z.string(),
|
|
284
|
-
format: FrameHandleFormatSchema,
|
|
285
|
-
/**
|
|
286
|
-
* Optional reader-side cadence hint in frames per second. The broker does
|
|
287
|
-
* NOT throttle — latest-wins ring reads drop frames implicitly for a slow
|
|
288
|
-
* consumer. The value is echoed back in `SubscribeFramesResult.maxFps` so
|
|
289
|
-
* the consumer can pace its own `pullFrameHandles` polling.
|
|
290
|
-
*/
|
|
291
|
-
maxFps: z.number().positive().optional(),
|
|
292
|
-
/** Short caller-identity tag (`motion`, `detection`, …) for diagnostics. */
|
|
293
|
-
tag: z.string().optional()
|
|
294
|
-
});
|
|
295
|
-
z.object({
|
|
296
|
-
/** Opaque id the consumer passes to `pullFrameHandles` / `unsubscribeFrames`. */
|
|
297
|
-
subscriptionId: z.string(),
|
|
298
|
-
/** Reader-side cadence hint (frames/s) — echoes `SubscribeFramesInput.maxFps`. */
|
|
299
|
-
maxFps: z.number().nonnegative()
|
|
300
|
-
});
|
|
301
|
-
/**
|
|
302
249
|
* Wire schema for a decoded audio chunk (Phase 5 / D9). Mirrors the
|
|
303
250
|
* `DecodedAudioChunk` TS interface in `interfaces/stream-broker.ts`: PCM
|
|
304
251
|
* sample bytes plus the track parameters a consumer needs to interpret them.
|
|
@@ -306,8 +253,8 @@ z.object({
|
|
|
306
253
|
* Audio chunks are tiny (a ~500ms AudioCodecSession window is a few KB of
|
|
307
254
|
* Float32 PCM), so unlike video frames they ship their bytes INLINE over
|
|
308
255
|
* tRPC / Moleculer — no shared-memory plane. `data` is typed `Uint8Array`
|
|
309
|
-
* (the wire-serialisable supertype of `Buffer`)
|
|
310
|
-
*
|
|
256
|
+
* (the wire-serialisable supertype of `Buffer`); a `Buffer` is assignable to
|
|
257
|
+
* it.
|
|
311
258
|
*/
|
|
312
259
|
var AudioChunkFormatSchema = z.enum(AUDIO_CHUNK_FORMATS);
|
|
313
260
|
z.object({
|
|
@@ -353,9 +300,7 @@ var BrokerStatusSchema = z.enum([
|
|
|
353
300
|
z.object({
|
|
354
301
|
status: BrokerStatusSchema,
|
|
355
302
|
inputFps: z.number(),
|
|
356
|
-
decodeFps: z.number(),
|
|
357
303
|
encodedSubscribers: z.number(),
|
|
358
|
-
decodedSubscribers: z.number(),
|
|
359
304
|
uptimeMs: z.number(),
|
|
360
305
|
bitrateKbps: z.number(),
|
|
361
306
|
idrIntervalMs: z.number(),
|
|
@@ -368,14 +313,6 @@ z.object({
|
|
|
368
313
|
preBufferMs: z.number(),
|
|
369
314
|
preBufferPackets: z.number(),
|
|
370
315
|
/**
|
|
371
|
-
* Moleculer node id of the decoder provider currently servicing this
|
|
372
|
-
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
373
|
-
* created (no decoded clients yet, or codec not detected). Surfaces the
|
|
374
|
-
* runtime decoder placement so the UI can show "Decoder: <agent>" without
|
|
375
|
-
* a separate cap call per broker.
|
|
376
|
-
*/
|
|
377
|
-
decoderNodeId: z.string().nullable(),
|
|
378
|
-
/**
|
|
379
316
|
* Detected audio track parameters from the RTSP DESCRIBE / SDP. `null`
|
|
380
317
|
* when the stream has no audio track or the broker is in cold start.
|
|
381
318
|
* `supported = false` means the codec was detected but the local
|
|
@@ -7151,19 +7088,7 @@ function createSystemProxy(api) {
|
|
|
7151
7088
|
validateComposition: (input) => dispatch("coreBlocks", "validateComposition", "mutation", input)
|
|
7152
7089
|
},
|
|
7153
7090
|
decoder: {
|
|
7154
|
-
supportsCodec: (input) => dispatch("decoder", "supportsCodec", "query", input),
|
|
7155
7091
|
getInfo: (input) => dispatch("decoder", "getInfo", "query", input),
|
|
7156
|
-
createSession: (input) => dispatch("decoder", "createSession", "query", input),
|
|
7157
|
-
destroySession: (input) => dispatch("decoder", "destroySession", "query", input),
|
|
7158
|
-
pushPacket: (input) => dispatch("decoder", "pushPacket", "query", input),
|
|
7159
|
-
openStream: (input) => dispatch("decoder", "openStream", "query", input),
|
|
7160
|
-
pullFrames: (input) => dispatch("decoder", "pullFrames", "query", input),
|
|
7161
|
-
pullHandles: (input) => dispatch("decoder", "pullHandles", "query", input),
|
|
7162
|
-
getFrame: (input) => dispatch("decoder", "getFrame", "query", input),
|
|
7163
|
-
getShmStats: (input) => dispatch("decoder", "getShmStats", "query", input),
|
|
7164
|
-
updateConfig: (input) => dispatch("decoder", "updateConfig", "query", input),
|
|
7165
|
-
getStats: (input) => dispatch("decoder", "getStats", "query", input),
|
|
7166
|
-
listActiveSessions: (input) => dispatch("decoder", "listActiveSessions", "query", input),
|
|
7167
7092
|
reprobeHwaccel: (input) => dispatch("decoder", "reprobeHwaccel", "mutation", input)
|
|
7168
7093
|
},
|
|
7169
7094
|
deviceAdoption: {
|
|
@@ -7640,9 +7565,6 @@ function createSystemProxy(api) {
|
|
|
7640
7565
|
subscribeAudioChunks: (input) => dispatch("streamBroker", "subscribeAudioChunks", "mutation", input),
|
|
7641
7566
|
pullAudioChunks: (input) => dispatch("streamBroker", "pullAudioChunks", "query", input),
|
|
7642
7567
|
unsubscribeAudioChunks: (input) => dispatch("streamBroker", "unsubscribeAudioChunks", "mutation", input),
|
|
7643
|
-
subscribeFrames: (input) => dispatch("streamBroker", "subscribeFrames", "mutation", input),
|
|
7644
|
-
pullFrameHandles: (input) => dispatch("streamBroker", "pullFrameHandles", "query", input),
|
|
7645
|
-
unsubscribeFrames: (input) => dispatch("streamBroker", "unsubscribeFrames", "mutation", input),
|
|
7646
7568
|
setPreBufferDuration: (input) => dispatch("streamBroker", "setPreBufferDuration", "mutation", input),
|
|
7647
7569
|
getPreBufferInfo: (input) => dispatch("streamBroker", "getPreBufferInfo", "query", input),
|
|
7648
7570
|
getRtspPort: (input) => dispatch("streamBroker", "getRtspPort", "query", input),
|
|
@@ -498,15 +498,6 @@ export declare enum EventCategory {
|
|
|
498
498
|
AgentWsDisconnected = "agent.ws.disconnected",
|
|
499
499
|
AgentBackupActivated = "agent.backup.activated",
|
|
500
500
|
OrchestrationSettingsUpdated = "orchestration.settings-updated",
|
|
501
|
-
/**
|
|
502
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
503
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
504
|
-
* `createSession`, so running sessions keep their current backend until
|
|
505
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
506
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
507
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
508
|
-
*/
|
|
509
|
-
PipelineAgentHwaccelChanged = "pipeline.agent-hwaccel-changed",
|
|
510
501
|
MotionAnalysis = "detection.motion-analysis",
|
|
511
502
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
512
503
|
MotionZonesRaw = "detection.motion-zones-raw",
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_event_category = require("./event-category-CtBAl88K.js");
|
|
3
3
|
//#region src/enums/event-source-type.ts
|
|
4
4
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
5
5
|
EventSourceType["Addon"] = "addon";
|
package/dist/enums.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-B_0XEcLF.mjs";
|
|
2
2
|
//#region src/enums/event-source-type.ts
|
|
3
3
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
4
4
|
EventSourceType["Addon"] = "addon";
|
|
@@ -499,15 +499,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
499
499
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
500
500
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
501
501
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
502
|
-
/**
|
|
503
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
504
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
505
|
-
* `createSession`, so running sessions keep their current backend until
|
|
506
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
507
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
508
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
509
|
-
*/
|
|
510
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
511
502
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
512
503
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
513
504
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
|
@@ -499,15 +499,6 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
499
499
|
EventCategory["AgentWsDisconnected"] = "agent.ws.disconnected";
|
|
500
500
|
EventCategory["AgentBackupActivated"] = "agent.backup.activated";
|
|
501
501
|
EventCategory["OrchestrationSettingsUpdated"] = "orchestration.settings-updated";
|
|
502
|
-
/**
|
|
503
|
-
* Per-agent hwaccel preference changed (user override set, cleared, or
|
|
504
|
-
* re-probed). Observability event — decoders pull the current pref at
|
|
505
|
-
* `createSession`, so running sessions keep their current backend until
|
|
506
|
-
* they rotate naturally (camera add/remove, stream restart). Future
|
|
507
|
-
* work can wire a listener in stream-broker that force-rotates live
|
|
508
|
-
* sessions; for now this event powers logs + admin-UI toast feedback.
|
|
509
|
-
*/
|
|
510
|
-
EventCategory["PipelineAgentHwaccelChanged"] = "pipeline.agent-hwaccel-changed";
|
|
511
502
|
EventCategory["MotionAnalysis"] = "detection.motion-analysis";
|
|
512
503
|
/** All raw motion zones from CCL before minArea filter — for UI debug overlay. */
|
|
513
504
|
EventCategory["MotionZonesRaw"] = "detection.motion-zones-raw";
|
package/dist/ffmpeg/hwaccel.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* - the raw kernel resolver (`ctx.kernel.hwaccel.resolve()`) returns
|
|
11
11
|
* `['qsv','vaapi']` for an Intel host — qsv FIRST;
|
|
12
|
-
* -
|
|
12
|
+
* - the decoder addon's `DECODE_HWACCEL_RANK` (`addon-decoder-nodeav`) puts **vaapi above qsv on
|
|
13
13
|
* purpose**, because on this exact hub a qsv decode child exits `code=171`
|
|
14
14
|
* producing no frames, while vaapi decodes 8 MP h264 at ~50 fps.
|
|
15
15
|
*
|