homebridge-plugin-utils 1.35.0 → 2.0.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/README.md +130 -2
- package/build/eslint-plugin/README.md +164 -0
- package/build/eslint-plugin/config.mjs +308 -0
- package/build/eslint-plugin/index.mjs +7 -0
- package/build/eslint-plugin/plugin.mjs +46 -0
- package/build/eslint-plugin/rules/blank-line-after-open-brace.mjs +137 -0
- package/build/eslint-plugin/rules/blank-line-after-open-brace.test.mjs +112 -0
- package/build/eslint-plugin/rules/comment-style.mjs +190 -0
- package/build/eslint-plugin/rules/comment-style.test.mjs +190 -0
- package/build/eslint-plugin/rules/enforce-node-protocol.mjs +114 -0
- package/build/eslint-plugin/rules/enforce-node-protocol.test.mjs +116 -0
- package/build/eslint-plugin/rules/paren-comparisons-in-logical.mjs +94 -0
- package/build/eslint-plugin/rules/paren-comparisons-in-logical.test.mjs +107 -0
- package/build/eslint-plugin/rules/split-type-imports.mjs +354 -0
- package/build/eslint-plugin/rules/split-type-imports.test.mjs +268 -0
- package/build/eslint-plugin/test-setup.mjs +21 -0
- package/build/fs-ops.mjs +184 -0
- package/build/tsconfig.json +18 -3
- package/dist/backpressure.d.ts +94 -45
- package/dist/backpressure.js +229 -93
- package/dist/backpressure.js.map +1 -1
- package/dist/cli/index.d.ts +95 -0
- package/dist/cli/index.js +355 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/clock-double.d.ts +93 -0
- package/dist/clock-double.js +141 -0
- package/dist/clock-double.js.map +1 -0
- package/dist/clock.d.ts +39 -0
- package/dist/clock.js +34 -0
- package/dist/clock.js.map +1 -0
- package/dist/eslint-plugin/config.d.mts +193 -0
- package/dist/eslint-plugin/index.d.mts +2 -0
- package/dist/eslint-plugin/plugin.d.mts +87 -0
- package/dist/eslint-plugin/rules/blank-line-after-open-brace.d.mts +19 -0
- package/dist/eslint-plugin/rules/comment-style.d.mts +15 -0
- package/dist/eslint-plugin/rules/enforce-node-protocol.d.mts +18 -0
- package/dist/eslint-plugin/rules/paren-comparisons-in-logical.d.mts +15 -0
- package/dist/eslint-plugin/rules/split-type-imports.d.mts +16 -0
- package/dist/featureOptions-docs.d.ts +96 -0
- package/dist/featureOptions-docs.js +193 -0
- package/dist/featureOptions-docs.js.map +1 -0
- package/dist/featureOptions.d.ts +674 -0
- package/dist/featureOptions.js +870 -0
- package/dist/featureOptions.js.map +1 -0
- package/dist/ffmpeg/codecs.d.ts +256 -72
- package/dist/ffmpeg/codecs.js +477 -262
- package/dist/ffmpeg/codecs.js.map +1 -1
- package/dist/ffmpeg/dgram-util.d.ts +46 -0
- package/dist/ffmpeg/dgram-util.js +38 -0
- package/dist/ffmpeg/dgram-util.js.map +1 -0
- package/dist/ffmpeg/exec.d.ts +83 -64
- package/dist/ffmpeg/exec.js +77 -86
- package/dist/ffmpeg/exec.js.map +1 -1
- package/dist/ffmpeg/fmp4.d.ts +49 -2
- package/dist/ffmpeg/fmp4.js +47 -11
- package/dist/ffmpeg/fmp4.js.map +1 -1
- package/dist/ffmpeg/hap-enums.d.ts +214 -0
- package/dist/ffmpeg/hap-enums.js +92 -0
- package/dist/ffmpeg/hap-enums.js.map +1 -0
- package/dist/ffmpeg/index.d.ts +16 -9
- package/dist/ffmpeg/index.js +6 -0
- package/dist/ffmpeg/index.js.map +1 -1
- package/dist/ffmpeg/mp4-assembler.d.ts +120 -0
- package/dist/ffmpeg/mp4-assembler.js +387 -0
- package/dist/ffmpeg/mp4-assembler.js.map +1 -0
- package/dist/ffmpeg/mp4-parser.d.ts +94 -0
- package/dist/ffmpeg/mp4-parser.js +130 -0
- package/dist/ffmpeg/mp4-parser.js.map +1 -0
- package/dist/ffmpeg/options.d.ts +62 -149
- package/dist/ffmpeg/options.js +608 -499
- package/dist/ffmpeg/options.js.map +1 -1
- package/dist/ffmpeg/process.d.ts +142 -96
- package/dist/ffmpeg/process.js +406 -278
- package/dist/ffmpeg/process.js.map +1 -1
- package/dist/ffmpeg/record.d.ts +302 -188
- package/dist/ffmpeg/record.js +408 -567
- package/dist/ffmpeg/record.js.map +1 -1
- package/dist/ffmpeg/recording-process-double.d.ts +144 -0
- package/dist/ffmpeg/recording-process-double.js +168 -0
- package/dist/ffmpeg/recording-process-double.js.map +1 -0
- package/dist/ffmpeg/rtp-parser.d.ts +70 -0
- package/dist/ffmpeg/rtp-parser.js +77 -0
- package/dist/ffmpeg/rtp-parser.js.map +1 -0
- package/dist/ffmpeg/rtp.d.ts +198 -141
- package/dist/ffmpeg/rtp.js +473 -251
- package/dist/ffmpeg/rtp.js.map +1 -1
- package/dist/ffmpeg/settings.d.ts +5 -2
- package/dist/ffmpeg/settings.js +20 -5
- package/dist/ffmpeg/settings.js.map +1 -1
- package/dist/ffmpeg/stream.d.ts +57 -107
- package/dist/ffmpeg/stream.js +121 -150
- package/dist/ffmpeg/stream.js.map +1 -1
- package/dist/formatters.d.ts +106 -0
- package/dist/formatters.js +174 -0
- package/dist/formatters.js.map +1 -0
- package/dist/homebridge-enums.d.ts +30 -0
- package/dist/homebridge-enums.js +17 -0
- package/dist/homebridge-enums.js.map +1 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/logclient/auth.d.ts +114 -0
- package/dist/logclient/auth.js +199 -0
- package/dist/logclient/auth.js.map +1 -0
- package/dist/logclient/cli-run.d.ts +76 -0
- package/dist/logclient/cli-run.js +639 -0
- package/dist/logclient/cli-run.js.map +1 -0
- package/dist/logclient/cli.d.ts +3 -0
- package/dist/logclient/cli.js +97 -0
- package/dist/logclient/cli.js.map +1 -0
- package/dist/logclient/client.d.ts +145 -0
- package/dist/logclient/client.js +600 -0
- package/dist/logclient/client.js.map +1 -0
- package/dist/logclient/config.d.ts +173 -0
- package/dist/logclient/config.js +199 -0
- package/dist/logclient/config.js.map +1 -0
- package/dist/logclient/endpoints.d.ts +54 -0
- package/dist/logclient/endpoints.js +73 -0
- package/dist/logclient/endpoints.js.map +1 -0
- package/dist/logclient/filter.d.ts +45 -0
- package/dist/logclient/filter.js +51 -0
- package/dist/logclient/filter.js.map +1 -0
- package/dist/logclient/frame.d.ts +93 -0
- package/dist/logclient/frame.js +203 -0
- package/dist/logclient/frame.js.map +1 -0
- package/dist/logclient/index.d.ts +31 -0
- package/dist/logclient/index.js +12 -0
- package/dist/logclient/index.js.map +1 -0
- package/dist/logclient/parser.d.ts +211 -0
- package/dist/logclient/parser.js +393 -0
- package/dist/logclient/parser.js.map +1 -0
- package/dist/logclient/rest.d.ts +41 -0
- package/dist/logclient/rest.js +111 -0
- package/dist/logclient/rest.js.map +1 -0
- package/dist/logclient/settings.d.ts +15 -0
- package/dist/logclient/settings.js +64 -0
- package/dist/logclient/settings.js.map +1 -0
- package/dist/logclient/socket-double.d.ts +201 -0
- package/dist/logclient/socket-double.js +384 -0
- package/dist/logclient/socket-double.js.map +1 -0
- package/dist/logclient/socket.d.ts +257 -0
- package/dist/logclient/socket.js +620 -0
- package/dist/logclient/socket.js.map +1 -0
- package/dist/logclient/stitch.d.ts +83 -0
- package/dist/logclient/stitch.js +146 -0
- package/dist/logclient/stitch.js.map +1 -0
- package/dist/logclient/time-expression.d.ts +42 -0
- package/dist/logclient/time-expression.js +181 -0
- package/dist/logclient/time-expression.js.map +1 -0
- package/dist/logclient/time-window.d.ts +38 -0
- package/dist/logclient/time-window.js +53 -0
- package/dist/logclient/time-window.js.map +1 -0
- package/dist/logclient/types.d.ts +107 -0
- package/dist/logclient/types.js +6 -0
- package/dist/logclient/types.js.map +1 -0
- package/dist/mqttClient.d.ts +287 -0
- package/dist/mqttClient.js +433 -0
- package/dist/mqttClient.js.map +1 -0
- package/dist/service.d.ts +64 -15
- package/dist/service.js +93 -66
- package/dist/service.js.map +1 -1
- package/dist/ui/featureOptions.js +870 -0
- package/dist/ui/featureOptions.js.map +1 -0
- package/dist/ui/formatters.js +174 -0
- package/dist/ui/formatters.js.map +1 -0
- package/dist/ui/pluginConfigSession.mjs +141 -0
- package/dist/ui/webUi-featureOptions/categoryState.mjs +135 -0
- package/dist/ui/webUi-featureOptions/effects/keyboard.mjs +61 -0
- package/dist/ui/webUi-featureOptions/effects/persist.mjs +226 -0
- package/dist/ui/webUi-featureOptions/effects/theme.mjs +398 -0
- package/dist/ui/webUi-featureOptions/effects/tokens.mjs +152 -0
- package/dist/ui/webUi-featureOptions/rendering.mjs +431 -0
- package/dist/ui/webUi-featureOptions/selectors.mjs +360 -0
- package/dist/ui/webUi-featureOptions/state.mjs +319 -0
- package/dist/ui/webUi-featureOptions/store.mjs +181 -0
- package/dist/ui/webUi-featureOptions/utils.mjs +200 -0
- package/dist/ui/webUi-featureOptions/views/connectionError.mjs +152 -0
- package/dist/ui/webUi-featureOptions/views/deviceInfo.mjs +80 -0
- package/dist/ui/webUi-featureOptions/views/header.mjs +77 -0
- package/dist/ui/webUi-featureOptions/views/nav.mjs +327 -0
- package/dist/ui/webUi-featureOptions/views/options.mjs +521 -0
- package/dist/ui/webUi-featureOptions/views/search.mjs +395 -0
- package/dist/ui/webUi-featureOptions.mjs +677 -0
- package/dist/ui/webUi.mjs +192 -87
- package/dist/util.d.ts +602 -45
- package/dist/util.js +783 -78
- package/dist/util.js.map +1 -1
- package/package.json +33 -15
- package/build/eslint-rules.mjs +0 -511
- package/dist/featureoptions.d.ts +0 -264
- package/dist/featureoptions.js +0 -480
- package/dist/featureoptions.js.map +0 -1
- package/dist/mqttclient.d.ts +0 -178
- package/dist/mqttclient.js +0 -310
- package/dist/mqttclient.js.map +0 -1
- package/dist/ui/featureoptions.js +0 -480
- package/dist/ui/featureoptions.js.map +0 -1
- package/dist/ui/webUi-featureoptions.mjs +0 -3765
package/dist/ffmpeg/rtp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtp.js","sourceRoot":"","sources":["../../src/ffmpeg/rtp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG
|
|
1
|
+
{"version":3,"file":"rtp.js","sourceRoot":"","sources":["../../src/ffm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KSV_TIMEOUT = 4500;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const STREAM_HEALTH_TIMEOUT = 5000;
|
|
7
|
+
export declare const RTCP_HEARTBEAT_INTERVAL = 3000;
|
|
8
|
+
export declare const RPI4_GPU_MINIMUM = 128;
|
|
9
|
+
export declare const RPI4_HW_TRANSCODE_MAX_PIXELS: number;
|
|
10
|
+
//# sourceMappingURL=settings.d.ts.map
|
package/dist/ffmpeg/settings.js
CHANGED
|
@@ -12,9 +12,24 @@ export const HKSV_FRAGMENT_LENGTH = 4000;
|
|
|
12
12
|
export const HKSV_IDR_INTERVAL = 4;
|
|
13
13
|
// HomeKit Secure Video communication timeout threshold, in milliseconds. HKSV has a strict 5 second threshold for communication, so we set this a little below that.
|
|
14
14
|
export const HKSV_TIMEOUT = 4500;
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
// Default inactivity window, in milliseconds, for the streaming return-port health watchdog (ffmpeg/stream.ts): once a live stream is flowing, the HomeKit client sends
|
|
16
|
+
// RTCP receiver reports back to the return port, and if no inbound packet arrives within this window the watchdog aborts the process. This is the watchdog's own
|
|
17
|
+
// cadence, not an FFmpeg input timeout - FFmpeg reading from a stdin pipe has none.
|
|
18
|
+
export const STREAM_HEALTH_TIMEOUT = 5000;
|
|
19
|
+
// RTCP-replay heartbeat cadence for {@link RtpDemuxer}, in milliseconds. On the two-way-audio backchannel, RtpDemuxer replays the last observed RTCP packet to the RTP
|
|
20
|
+
// destination port at this cadence whenever inbound RTCP stalls, keeping that input alive during legitimate quiet periods - see ffmpeg/rtp.ts, which owns the contract.
|
|
21
|
+
// 3000 ms leaves comfortable headroom for transient scheduling jitter without producing unnecessary traffic in healthy sessions where RTCP arrives more frequently than
|
|
22
|
+
// the cadence. Exported so plugin authors that pass this value verbatim document their intent at the call site, and so a future timeout adjustment propagates from one
|
|
23
|
+
// place to every consumer.
|
|
24
|
+
export const RTCP_HEARTBEAT_INTERVAL = 3000;
|
|
25
|
+
// Minimum GPU memory (in MB) a Raspberry Pi 4 must allocate via the legacy VideoCore gpu_mem split (read with `vcgencmd get_mem gpu`) to enable hardware acceleration;
|
|
26
|
+
// below this floor, decoding and transcoding fall back to software. This is the Pi 4 floor - we do not support anything earlier, and the Pi 5 (not a currently-supported
|
|
27
|
+
// target) uses a different memory model where the gpu_mem split does not apply. The hostSystem === "raspbian" detection does not distinguish Pi models, so adding Pi 5
|
|
28
|
+
// support would make this gate model-aware.
|
|
29
|
+
export const RPI4_GPU_MINIMUM = 128;
|
|
30
|
+
// The maximum source pixel count the Raspberry Pi 4 GPU hardware-transcode pipeline (h264_v4l2m2m) can ingest; a source above 1080p must be fed from a lower channel.
|
|
31
|
+
// This is the Pi 4 ceiling specifically - the Pi 5 (not a currently-supported target) has different GPU constraints. The hostSystem === "raspbian" detection does not
|
|
32
|
+
// distinguish Pi models, so this cap currently applies to every Raspberry Pi host, which is correct while the Pi 4 is the supported target; adding Pi 5 support would
|
|
33
|
+
// make this value model-aware. Distinct from RPI4_GPU_MINIMUM (GPU memory, in MB) - do not overload them.
|
|
34
|
+
export const RPI4_HW_TRANSCODE_MAX_PIXELS = 1920 * 1080;
|
|
20
35
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/ffmpeg/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,+IAA+I;AAC/I,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,qKAAqK;AACrK,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAEjC,
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/ffmpeg/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAEtC,+IAA+I;AAC/I,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,qGAAqG;AACrG,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,qKAAqK;AACrK,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAEjC,wKAAwK;AACxK,iKAAiK;AACjK,oFAAoF;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAE1C,uKAAuK;AACvK,wKAAwK;AACxK,wKAAwK;AACxK,uKAAuK;AACvK,2BAA2B;AAC3B,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,uKAAuK;AACvK,yKAAyK;AACzK,uKAAuK;AACvK,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC,sKAAsK;AACtK,sKAAsK;AACtK,sKAAsK;AACtK,0GAA0G;AAC1G,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
package/dist/ffmpeg/stream.d.ts
CHANGED
|
@@ -1,143 +1,93 @@
|
|
|
1
|
+
import type { FfmpegOptions } from "./options.ts";
|
|
2
|
+
import { FfmpegProcess } from "./process.ts";
|
|
3
|
+
import type { FfmpegProcessInit } from "./process.ts";
|
|
4
|
+
import type { IpFamily } from "./dgram-util.ts";
|
|
1
5
|
/**
|
|
2
|
-
*
|
|
6
|
+
* UDP return-port descriptor for the stream-health monitor.
|
|
3
7
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
8
|
+
* @property ipFamily - The IP family: `"ipv4"` binds to `127.0.0.1`, `"ipv6"` binds to `::1`. Shares the {@link IpFamily} alias with `RtpDemuxerInit`,
|
|
9
|
+
* `PortReservationInit`, and `PortReservation` so every UDP-aware init type in the FFmpeg subsystem reads from the same vocabulary.
|
|
10
|
+
* @property port - The UDP port to bind to. Pass `0` to request kernel-assigned ephemeral allocation: the bind succeeds atomically against whichever port
|
|
11
|
+
* the kernel hands out, eliminating the reserve-then-rebind race that a separate reservation step would carry. The assigned port is then
|
|
12
|
+
* observable via {@link FfmpegStreamingProcess.returnPort} once {@link FfmpegStreamingProcess.ready} resolves.
|
|
7
13
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* - Automated start, monitoring, and termination of HomeKit-compatible FFmpeg video streams.
|
|
11
|
-
* - Integration with Homebridge’s CameraStreamingDelegate for custom error hooks and lifecycle control.
|
|
12
|
-
* - UDP socket creation and management for realtime video stream liveness detection.
|
|
13
|
-
* - Intelligent error handling, including automatic tuning for FFmpeg’s stream probing requirements.
|
|
14
|
-
* - Exposes access to the underlying FFmpeg child process for advanced scenarios.
|
|
15
|
-
*
|
|
16
|
-
* Designed for plugin developers and advanced users who require fine-grained control and diagnostics for HomeKit livestreaming, with seamless Homebridge integration.
|
|
17
|
-
*
|
|
18
|
-
* @module
|
|
14
|
+
* @category FFmpeg
|
|
19
15
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import type { Nullable } from "../util.js";
|
|
16
|
+
export interface FfmpegStreamingReturnPort {
|
|
17
|
+
ipFamily: IpFamily;
|
|
18
|
+
port: number;
|
|
19
|
+
}
|
|
25
20
|
/**
|
|
26
|
-
*
|
|
21
|
+
* Construction-time options for {@link FfmpegStreamingProcess}.
|
|
27
22
|
*
|
|
28
|
-
* @property
|
|
29
|
-
*
|
|
30
|
-
* @
|
|
31
|
-
* @property
|
|
23
|
+
* @property healthTimeout - Optional inactivity window, in milliseconds, between inbound packets on the return port (the HomeKit client's RTCP receiver reports).
|
|
24
|
+
* The watchdog arms on the first such packet, then aborts with `HbpuAbortError("timeout")` if a later window elapses with no packet.
|
|
25
|
+
* Defaults to {@link STREAM_HEALTH_TIMEOUT} (5 seconds). This is the watchdog's own cadence, not an FFmpeg input timeout.
|
|
26
|
+
* @property returnPort - Optional UDP return-port descriptor. When provided, the subclass binds a UDP socket to the port and enforces the liveness watchdog on
|
|
27
|
+
* inbound traffic. Omit for two-way-audio sessions where packet flow is demuxed externally (e.g., via `RtpDemuxer`).
|
|
32
28
|
*
|
|
33
|
-
* @see
|
|
34
|
-
* @see CameraStreamingDelegate
|
|
29
|
+
* @see FfmpegProcessInit
|
|
35
30
|
*
|
|
36
31
|
* @category FFmpeg
|
|
37
32
|
*/
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
ffmpegErrorCheck?: (logEntry: string[]) => string | undefined;
|
|
42
|
-
stopStream?: (sessionId: string) => void;
|
|
33
|
+
export interface FfmpegStreamingInit extends FfmpegProcessInit {
|
|
34
|
+
healthTimeout?: number;
|
|
35
|
+
returnPort?: FfmpegStreamingReturnPort;
|
|
43
36
|
}
|
|
44
37
|
/**
|
|
45
|
-
*
|
|
38
|
+
* FFmpeg process specialization for HomeKit livestreaming. Extends {@link FfmpegProcess} directly and composes an internal stream-health UDP socket when a return port
|
|
39
|
+
* is configured.
|
|
46
40
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
41
|
+
* Lifecycle is entirely signal-driven: construction spawns the child and (optionally) binds the health socket; the socket watches for inbound packets and aborts the
|
|
42
|
+
* process with `"timeout"` if the window lapses; the inherited teardown path closes the socket and clears the watchdog timer as part of its signal-abort listener
|
|
43
|
+
* fan-out. The subclass adds no new public verbs beyond what {@link FfmpegProcess} provides.
|
|
49
44
|
*
|
|
50
45
|
* @example
|
|
51
46
|
*
|
|
52
47
|
* ```ts
|
|
53
|
-
*
|
|
48
|
+
* await using proc = new FfmpegStreamingProcess(ffmpegOptions, {
|
|
54
49
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
50
|
+
* args: commandLineArgs,
|
|
51
|
+
* returnPort: { ipFamily: "ipv4", port: 50000 },
|
|
52
|
+
* signal: session.controller.signal
|
|
53
|
+
* });
|
|
58
54
|
*
|
|
59
|
-
*
|
|
55
|
+
* await proc.ready;
|
|
60
56
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* { addressVersion: "ipv4", port: 5000 }
|
|
66
|
-
* );
|
|
57
|
+
* // Observe the process from the session's own control flow. When the health socket detects a stall, proc.signal fires
|
|
58
|
+
* // with reason "timeout" and proc.exited resolves with the kill-driven exit context. Surface crashes via the owning
|
|
59
|
+
* // session's error path.
|
|
60
|
+
* proc.exited.catch((error) => session.onStreamingError(error));
|
|
67
61
|
* ```
|
|
68
62
|
*
|
|
69
|
-
* @see HomebridgeStreamingDelegate
|
|
70
63
|
* @see FfmpegProcess
|
|
71
64
|
*
|
|
72
65
|
* @category FFmpeg
|
|
73
66
|
*/
|
|
74
67
|
export declare class FfmpegStreamingProcess extends FfmpegProcess {
|
|
75
|
-
private
|
|
76
|
-
/**
|
|
77
|
-
* The unique session identifier for this streaming process.
|
|
78
|
-
*/
|
|
79
|
-
private sessionId;
|
|
80
|
-
/**
|
|
81
|
-
* The timeout reference used to monitor UDP stream health.
|
|
82
|
-
*/
|
|
83
|
-
private streamTimeout?;
|
|
84
|
-
/**
|
|
85
|
-
* Constructs a new FFmpeg streaming process for a HomeKit session.
|
|
86
|
-
*
|
|
87
|
-
* Sets up required delegate hooks, creates UDP return sockets if needed, and starts the FFmpeg process. Automatically handles FFmpeg process errors and cleans up on
|
|
88
|
-
* failures.
|
|
89
|
-
*
|
|
90
|
-
* @param delegate - The Homebridge streaming delegate for this session.
|
|
91
|
-
* @param sessionId - The HomeKit session identifier for this stream.
|
|
92
|
-
* @param ffmpegOptions - The FFmpeg configuration options.
|
|
93
|
-
* @param commandLineArgs - FFmpeg command-line arguments.
|
|
94
|
-
* @param returnPort - Optional. UDP port info for talkback support (used for two-way audio in HomeKit for cameras that support it).
|
|
95
|
-
* @param callback - Optional. Callback invoked when the stream is ready or errors occur.
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
*
|
|
99
|
-
* ```ts
|
|
100
|
-
* const process = new FfmpegStreamingProcess(delegate, sessionId, ffmpegOptions, commandLineArgs, { addressVersion: "ipv6", port: 6000 });
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
constructor(delegate: HomebridgeStreamingDelegate, sessionId: string, ffmpegOptions: FfmpegOptions, commandLineArgs: string[], returnPort?: {
|
|
104
|
-
addressVersion: string;
|
|
105
|
-
port: number;
|
|
106
|
-
}, callback?: StreamRequestCallback);
|
|
68
|
+
#private;
|
|
107
69
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* Listens for UDP "message" events, sets and clears timeouts, and handles error/cleanup scenarios. If no messages are received within 5 seconds, forcibly stops the
|
|
111
|
-
* stream and informs the delegate.
|
|
112
|
-
*
|
|
113
|
-
* @param portInfo - Object containing the address version ("ipv4" or "ipv6") and port number.
|
|
114
|
-
*/
|
|
115
|
-
private createSocket;
|
|
116
|
-
/**
|
|
117
|
-
* Returns the underlying FFmpeg child process, or null if the process is not running.
|
|
118
|
-
*
|
|
119
|
-
* @returns The current FFmpeg process, or `null` if not running.
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
*
|
|
123
|
-
* ```ts
|
|
124
|
-
* const ffmpeg = process.ffmpegProcess;
|
|
70
|
+
* Construct and spawn a new streaming FFmpeg process.
|
|
125
71
|
*
|
|
126
|
-
*
|
|
72
|
+
* Spawning happens synchronously as part of construction. When `init.returnPort` is supplied, the subclass binds a UDP socket and enforces the liveness watchdog; the
|
|
73
|
+
* socket closes and the watchdog clears as part of the inherited teardown when the signal aborts for any reason.
|
|
127
74
|
*
|
|
128
|
-
*
|
|
129
|
-
* }
|
|
130
|
-
* ```
|
|
75
|
+
* @param options - Shared {@link FfmpegOptions} configuration (codec support, logger, debug flag, name).
|
|
76
|
+
* @param init - Optional init options. See {@link FfmpegStreamingInit}.
|
|
131
77
|
*/
|
|
132
|
-
|
|
78
|
+
constructor(options: FfmpegOptions, init?: FfmpegStreamingInit);
|
|
133
79
|
/**
|
|
134
|
-
*
|
|
80
|
+
* The UDP return-port descriptor the health socket is bound to, or `undefined` when no return port was configured. For a specific-port construction
|
|
81
|
+
* (`init.returnPort.port` non-zero), this descriptor equals `init.returnPort` from the moment the constructor returns; for an ephemeral construction
|
|
82
|
+
* (`init.returnPort.port === 0`), the `port` field is `0` until the kernel completes the bind, then the kernel-assigned port. Consumers that need the assigned
|
|
83
|
+
* ephemeral port `await proc.ready` before reading it; in practice the health-socket bind completes well before the FFmpeg child reaches the `ready` signal, so a
|
|
84
|
+
* post-`ready` read always observes the kernel's pick.
|
|
135
85
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
86
|
+
* Returns a fresh descriptor on every read; callers must treat the result as read-only. The `ipFamily` field is the verbatim value passed at construction; the
|
|
87
|
+
* `port` field reads from the live socket-address projection once captured (specific and ephemeral binds converge on a single read path).
|
|
138
88
|
*
|
|
139
|
-
* @
|
|
140
|
-
* @param signal - The signal, if any, used to terminate the process.
|
|
89
|
+
* @returns The bound return-port descriptor, or `undefined` when no return port was configured.
|
|
141
90
|
*/
|
|
142
|
-
|
|
91
|
+
get returnPort(): FfmpegStreamingReturnPort | undefined;
|
|
143
92
|
}
|
|
93
|
+
//# sourceMappingURL=stream.d.ts.map
|