@camstack/types 1.2.321 → 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.
Files changed (43) hide show
  1. package/dist/addon.js +3 -14
  2. package/dist/addon.mjs +3 -14
  3. package/dist/capabilities/decoder.cap.d.ts +0 -211
  4. package/dist/capabilities/index.d.ts +8 -8
  5. package/dist/capabilities/llm-runtime.cap.d.ts +3 -3
  6. package/dist/capabilities/llm.cap.d.ts +4 -4
  7. package/dist/capabilities/local-network.cap.d.ts +11 -11
  8. package/dist/capabilities/metrics-provider.cap.d.ts +2 -2
  9. package/dist/capabilities/pipeline-executor.cap.d.ts +1 -112
  10. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +18 -303
  11. package/dist/capabilities/pipeline-runner.cap.d.ts +0 -2
  12. package/dist/capabilities/schemas/streaming-shared.d.ts +9 -79
  13. package/dist/capabilities/stream-broker.cap.d.ts +0 -85
  14. package/dist/capabilities/webrtc-session.cap.d.ts +0 -2
  15. package/dist/client.js +3 -89
  16. package/dist/client.mjs +3 -89
  17. package/dist/enums/event-category.d.ts +0 -9
  18. package/dist/enums.js +1 -1
  19. package/dist/enums.mjs +1 -1
  20. package/dist/{event-category-BGmz_oxW.mjs → event-category-B_0XEcLF.mjs} +0 -9
  21. package/dist/{event-category-DmS_tLsU.js → event-category-CtBAl88K.js} +0 -9
  22. package/dist/ffmpeg/hwaccel.d.ts +1 -1
  23. package/dist/generated/addon-api.d.ts +0 -161
  24. package/dist/generated/cap-input-defaults.d.ts +1 -1
  25. package/dist/generated/method-access-map.d.ts +1 -1
  26. package/dist/generated/method-device-selectors.d.ts +2 -2
  27. package/dist/generated/system-proxy.d.ts +4 -4
  28. package/dist/index.d.ts +2 -3
  29. package/dist/index.js +33 -425
  30. package/dist/index.mjs +34 -416
  31. package/dist/interfaces/api-responses.d.ts +0 -19
  32. package/dist/interfaces/capability.d.ts +1 -2
  33. package/dist/interfaces/event-bus.d.ts +0 -13
  34. package/dist/interfaces/pipeline-executor-capability.d.ts +1 -15
  35. package/dist/interfaces/pipeline-runner-capability.d.ts +0 -1
  36. package/dist/interfaces/stream-broker.d.ts +2 -67
  37. package/dist/{sleep-DAJ9Er57.mjs → sleep-BNeXenvr.mjs} +11 -86
  38. package/dist/{sleep-AalHiRYL.js → sleep-DPar9AHl.js} +10 -115
  39. package/dist/types/camera-pipeline.d.ts +3 -20
  40. package/dist/types/detection.d.ts +1 -1
  41. package/dist/types/pipeline-schema.d.ts +1 -8
  42. package/package.json +1 -1
  43. package/dist/interfaces/decoder.d.ts +0 -89
@@ -1,89 +0,0 @@
1
- import type { EncodedPacket, DecodedFrame, Unsubscribe } from './stream-broker.js';
2
- import type { FrameFormat } from '../types/io.js';
3
- export interface DecoderSessionConfig {
4
- readonly codec: string;
5
- readonly maxFps: number;
6
- readonly outputFormat: FrameFormat;
7
- readonly scale: number;
8
- /** Source stream width — passed to decoder so it doesn't need to probe raw pipes */
9
- readonly width?: number;
10
- /** Source stream height — passed to decoder so it doesn't need to probe raw pipes */
11
- readonly height?: number;
12
- /**
13
- * Identifier of the camera this decoder session serves. Optional —
14
- * the cap is generic, but stream-broker passes it so decoder logs
15
- * include `deviceId` for per-camera filtering.
16
- */
17
- readonly deviceId?: number;
18
- /**
19
- * Free-form tag for log scoping (e.g. `broker:5/high`). Decoder
20
- * sessions surface it on every log line so a single camera profile
21
- * can be greps cleanly out of a fleet of brokers.
22
- */
23
- readonly tag?: string;
24
- /**
25
- * Where the session delivers decoded frames (Phase 5 / D9). Mirrors
26
- * `DecoderSessionConfigSchema.frameSink`:
27
- *
28
- * - `'callback'` (default) — pixel `DecodedFrame`s drained via `pullFrames`.
29
- * - `'shm'` — decoded frames written into an OS shared-memory ring and
30
- * drained as zero-pixel `FrameHandle`s via `pullHandles`.
31
- *
32
- * Optional so existing callers (which omit it) keep the `'callback'`
33
- * default.
34
- */
35
- readonly frameSink?: 'callback' | 'shm';
36
- /**
37
- * Per-camera decoder DEBUG facility (mirrors `DecoderSessionConfigSchema.debug`).
38
- * When `true`, a pull-mode session emits a throttled (~1Hz) structured
39
- * `decoder debug` line. Off by default; the emit path pays no per-frame cost
40
- * when disabled.
41
- */
42
- readonly debug?: boolean;
43
- }
44
- export interface DecoderStats {
45
- readonly inputFps: number;
46
- readonly outputFps: number;
47
- readonly avgDecodeTimeMs: number;
48
- readonly droppedFrames: number;
49
- /**
50
- * Pull-mode adaptive-fps telemetry (optional — only pull sessions run the
51
- * lag-driven controller). `lagMs` is the EWMA of the decoder's real-time
52
- * drift (rising = falling behind live); `adaptiveFps` is the current
53
- * lag-throttled emit rate; `effectiveFps` is frames actually emitted/sec.
54
- */
55
- readonly lagMs?: number;
56
- readonly effectiveFps?: number;
57
- readonly adaptiveFps?: number;
58
- }
59
- export interface IDecoderSession {
60
- /** Push an encoded packet for decoding (push mode — used by ffmpeg decoder) */
61
- pushPacket(packet: EncodedPacket): void;
62
- /** Open an RTSP stream directly for decoding (pull mode — used by node-av decoder) */
63
- openStream?(url: string): Promise<void>;
64
- /** Whether this session uses pull mode (opens RTSP directly instead of receiving packets) */
65
- readonly isPullMode?: boolean;
66
- /** Subscribe to decoded frames */
67
- onFrame(callback: (frame: DecodedFrame) => void): Unsubscribe;
68
- updateConfig(config: Partial<DecoderSessionConfig>): void;
69
- destroy(): Promise<void>;
70
- getStats(): DecoderStats;
71
- }
72
- export interface IDecoderProvider {
73
- readonly id: string;
74
- readonly name: string;
75
- /**
76
- * Lookup priority — lower values are preferred when multiple decoders
77
- * support the same codec. Hardware-accelerated decoders (e.g. node-av
78
- * with VideoToolbox) should use a low number (e.g. 10); software
79
- * decoders (e.g. ffmpeg child process) should use a high number
80
- * (e.g. 50, the default). The broker sorts by priority ascending.
81
- */
82
- readonly priority?: number;
83
- supportsCodec(input: {
84
- codec: string;
85
- }): Promise<boolean>;
86
- createSession(config: DecoderSessionConfig): Promise<IDecoderSession>;
87
- /** Whether this provider creates pull-mode sessions (open RTSP directly) */
88
- readonly isPullMode?: boolean;
89
- }