@camstack/addon-provider-rtsp 0.1.14 → 0.1.15

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/index.d.mts DELETED
@@ -1,83 +0,0 @@
1
- export { RtspProviderAddon } from './addon.mjs';
2
- import { z } from 'zod';
3
- import { BaseDevice, ICameraDevice, DeviceType, DeviceContext, StreamSourceEntry, ConfigUISchemaWithValues } from '@camstack/types';
4
-
5
- declare const rtspCameraSchema: z.ZodObject<{
6
- streams: z.ZodPreprocess<z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- url: z.ZodString;
9
- profileHint: z.ZodOptional<z.ZodEnum<{
10
- high: "high";
11
- mid: "mid";
12
- low: "low";
13
- }>>;
14
- resolution: z.ZodOptional<z.ZodObject<{
15
- width: z.ZodNumber;
16
- height: z.ZodNumber;
17
- }, z.core.$strip>>;
18
- }, z.core.$strip>>>;
19
- snapshotUrl: z.ZodDefault<z.ZodString>;
20
- username: z.ZodDefault<z.ZodString>;
21
- password: z.ZodDefault<z.ZodString>;
22
- }, z.core.$strip>;
23
- declare class RtspCamera extends BaseDevice<typeof rtspCameraSchema> implements ICameraDevice {
24
- readonly type: DeviceType.Camera;
25
- features: readonly [];
26
- constructor(ctx: DeviceContext);
27
- /**
28
- * Detect legacy `{label, url}` stream shapes and reshape to
29
- * `{id, url, profileHint}`. Persists via `config.setAll` once, so
30
- * subsequent boots find the new shape and this branch is inert.
31
- *
32
- * Runs fire-and-forget — the constructor can't await. The reshape is
33
- * additive (ids are newly minted) so a failed persist is recoverable
34
- * on next boot.
35
- */
36
- private migrateLegacyStreamsIfNeeded;
37
- /**
38
- * Publish every configured stream to the system stream-broker as a
39
- * `pull-rtsp` cam stream. Idempotent — the broker's publishCameraStream
40
- * entry is keyed by `(deviceId, camStreamId)` so callers may invoke
41
- * this at will (e.g. on stream-broker restart). Fire-and-forget safe.
42
- */
43
- /**
44
- * Lifecycle hook fired by the kernel after registration. Publishes
45
- * the camera's streams to the broker — the kernel doesn't know
46
- * about the broker, but the camera does. Best-effort: if the
47
- * broker isn't ready, the provider's `system.ready-state`
48
- * subscription re-publishes on the next ready fire.
49
- */
50
- onActivate(): Promise<void>;
51
- publishToBroker(): Promise<void>;
52
- /**
53
- * Thin compat shim: reflects the stored `{id, url, profileHint?}`
54
- * streams into the legacy `StreamSourceEntry` shape so
55
- * `ICameraDevice`-aware consumers (device-manager legacy paths,
56
- * device-cap-proxy fallback) still find data. The broker itself does
57
- * NOT read this anymore — it consumes `publishCameraStream`. This
58
- * shim goes away when every consumer migrates (C5/C7).
59
- */
60
- getStreamSources(): Promise<readonly StreamSourceEntry[]>;
61
- removeDevice(): Promise<void>;
62
- getSettingsUISchema(): ConfigUISchemaWithValues;
63
- /**
64
- * Project stored config into the flat UI keys referenced by the schema.
65
- * Form only sees URLs — the internal id/profileHint/resolution stay
66
- * invisible to the operator (the broker decides profiles from probed
67
- * metadata at save time).
68
- */
69
- private collectFormValues;
70
- applySettingsPatch(patch: Record<string, unknown>): Promise<void>;
71
- /**
72
- * Probe a list of RTSP URLs through the kernel stream-probe and return
73
- * the new `{id, url, profileHint?, resolution?}` entries. Ids are
74
- * assigned `stream-1/2/3` in input order so the UI's slot ordering is
75
- * preserved across edits. The broker is in charge of the actual
76
- * (high/mid/low) profile assignment via `computeInitialAssignment`.
77
- */
78
- private probeAndClassify;
79
- private registerSnapshotProvider;
80
- private fetchHttpSnapshot;
81
- }
82
-
83
- export { RtspCamera, rtspCameraSchema };
package/dist/index.d.ts DELETED
@@ -1,83 +0,0 @@
1
- export { RtspProviderAddon } from './addon.js';
2
- import { z } from 'zod';
3
- import { BaseDevice, ICameraDevice, DeviceType, DeviceContext, StreamSourceEntry, ConfigUISchemaWithValues } from '@camstack/types';
4
-
5
- declare const rtspCameraSchema: z.ZodObject<{
6
- streams: z.ZodPreprocess<z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- url: z.ZodString;
9
- profileHint: z.ZodOptional<z.ZodEnum<{
10
- high: "high";
11
- mid: "mid";
12
- low: "low";
13
- }>>;
14
- resolution: z.ZodOptional<z.ZodObject<{
15
- width: z.ZodNumber;
16
- height: z.ZodNumber;
17
- }, z.core.$strip>>;
18
- }, z.core.$strip>>>;
19
- snapshotUrl: z.ZodDefault<z.ZodString>;
20
- username: z.ZodDefault<z.ZodString>;
21
- password: z.ZodDefault<z.ZodString>;
22
- }, z.core.$strip>;
23
- declare class RtspCamera extends BaseDevice<typeof rtspCameraSchema> implements ICameraDevice {
24
- readonly type: DeviceType.Camera;
25
- features: readonly [];
26
- constructor(ctx: DeviceContext);
27
- /**
28
- * Detect legacy `{label, url}` stream shapes and reshape to
29
- * `{id, url, profileHint}`. Persists via `config.setAll` once, so
30
- * subsequent boots find the new shape and this branch is inert.
31
- *
32
- * Runs fire-and-forget — the constructor can't await. The reshape is
33
- * additive (ids are newly minted) so a failed persist is recoverable
34
- * on next boot.
35
- */
36
- private migrateLegacyStreamsIfNeeded;
37
- /**
38
- * Publish every configured stream to the system stream-broker as a
39
- * `pull-rtsp` cam stream. Idempotent — the broker's publishCameraStream
40
- * entry is keyed by `(deviceId, camStreamId)` so callers may invoke
41
- * this at will (e.g. on stream-broker restart). Fire-and-forget safe.
42
- */
43
- /**
44
- * Lifecycle hook fired by the kernel after registration. Publishes
45
- * the camera's streams to the broker — the kernel doesn't know
46
- * about the broker, but the camera does. Best-effort: if the
47
- * broker isn't ready, the provider's `system.ready-state`
48
- * subscription re-publishes on the next ready fire.
49
- */
50
- onActivate(): Promise<void>;
51
- publishToBroker(): Promise<void>;
52
- /**
53
- * Thin compat shim: reflects the stored `{id, url, profileHint?}`
54
- * streams into the legacy `StreamSourceEntry` shape so
55
- * `ICameraDevice`-aware consumers (device-manager legacy paths,
56
- * device-cap-proxy fallback) still find data. The broker itself does
57
- * NOT read this anymore — it consumes `publishCameraStream`. This
58
- * shim goes away when every consumer migrates (C5/C7).
59
- */
60
- getStreamSources(): Promise<readonly StreamSourceEntry[]>;
61
- removeDevice(): Promise<void>;
62
- getSettingsUISchema(): ConfigUISchemaWithValues;
63
- /**
64
- * Project stored config into the flat UI keys referenced by the schema.
65
- * Form only sees URLs — the internal id/profileHint/resolution stay
66
- * invisible to the operator (the broker decides profiles from probed
67
- * metadata at save time).
68
- */
69
- private collectFormValues;
70
- applySettingsPatch(patch: Record<string, unknown>): Promise<void>;
71
- /**
72
- * Probe a list of RTSP URLs through the kernel stream-probe and return
73
- * the new `{id, url, profileHint?, resolution?}` entries. Ids are
74
- * assigned `stream-1/2/3` in input order so the UI's slot ordering is
75
- * preserved across edits. The broker is in charge of the actual
76
- * (high/mid/low) profile assignment via `computeInitialAssignment`.
77
- */
78
- private probeAndClassify;
79
- private registerSnapshotProvider;
80
- private fetchHttpSnapshot;
81
- }
82
-
83
- export { RtspCamera, rtspCameraSchema };