homebridge-plugin-utils 1.35.0 → 2.1.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.
Files changed (204) hide show
  1. package/README.md +130 -2
  2. package/build/eslint-plugin/README.md +164 -0
  3. package/build/eslint-plugin/config.mjs +308 -0
  4. package/build/eslint-plugin/index.mjs +7 -0
  5. package/build/eslint-plugin/plugin.mjs +46 -0
  6. package/build/eslint-plugin/rules/blank-line-after-open-brace.mjs +137 -0
  7. package/build/eslint-plugin/rules/blank-line-after-open-brace.test.mjs +112 -0
  8. package/build/eslint-plugin/rules/comment-style.mjs +190 -0
  9. package/build/eslint-plugin/rules/comment-style.test.mjs +190 -0
  10. package/build/eslint-plugin/rules/enforce-node-protocol.mjs +114 -0
  11. package/build/eslint-plugin/rules/enforce-node-protocol.test.mjs +116 -0
  12. package/build/eslint-plugin/rules/paren-comparisons-in-logical.mjs +94 -0
  13. package/build/eslint-plugin/rules/paren-comparisons-in-logical.test.mjs +107 -0
  14. package/build/eslint-plugin/rules/split-type-imports.mjs +354 -0
  15. package/build/eslint-plugin/rules/split-type-imports.test.mjs +268 -0
  16. package/build/eslint-plugin/test-setup.mjs +21 -0
  17. package/build/fs-ops.mjs +184 -0
  18. package/build/tsconfig.json +18 -3
  19. package/dist/backpressure.d.ts +94 -45
  20. package/dist/backpressure.js +229 -93
  21. package/dist/backpressure.js.map +1 -1
  22. package/dist/cli/index.d.ts +166 -0
  23. package/dist/cli/index.js +551 -0
  24. package/dist/cli/index.js.map +1 -0
  25. package/dist/clock-double.d.ts +93 -0
  26. package/dist/clock-double.js +141 -0
  27. package/dist/clock-double.js.map +1 -0
  28. package/dist/clock.d.ts +39 -0
  29. package/dist/clock.js +34 -0
  30. package/dist/clock.js.map +1 -0
  31. package/dist/disposable-stack.d.ts +59 -0
  32. package/dist/disposable-stack.js +155 -0
  33. package/dist/disposable-stack.js.map +1 -0
  34. package/dist/docChrome.d.ts +260 -0
  35. package/dist/docChrome.js +361 -0
  36. package/dist/docChrome.js.map +1 -0
  37. package/dist/eslint-plugin/config.d.mts +193 -0
  38. package/dist/eslint-plugin/index.d.mts +2 -0
  39. package/dist/eslint-plugin/plugin.d.mts +87 -0
  40. package/dist/eslint-plugin/rules/blank-line-after-open-brace.d.mts +19 -0
  41. package/dist/eslint-plugin/rules/comment-style.d.mts +15 -0
  42. package/dist/eslint-plugin/rules/enforce-node-protocol.d.mts +18 -0
  43. package/dist/eslint-plugin/rules/paren-comparisons-in-logical.d.mts +15 -0
  44. package/dist/eslint-plugin/rules/split-type-imports.d.mts +16 -0
  45. package/dist/featureOptions-docs.d.ts +96 -0
  46. package/dist/featureOptions-docs.js +193 -0
  47. package/dist/featureOptions-docs.js.map +1 -0
  48. package/dist/featureOptions.d.ts +674 -0
  49. package/dist/featureOptions.js +870 -0
  50. package/dist/featureOptions.js.map +1 -0
  51. package/dist/ffmpeg/codecs.d.ts +256 -72
  52. package/dist/ffmpeg/codecs.js +477 -262
  53. package/dist/ffmpeg/codecs.js.map +1 -1
  54. package/dist/ffmpeg/dgram-util.d.ts +46 -0
  55. package/dist/ffmpeg/dgram-util.js +38 -0
  56. package/dist/ffmpeg/dgram-util.js.map +1 -0
  57. package/dist/ffmpeg/exec.d.ts +83 -64
  58. package/dist/ffmpeg/exec.js +77 -86
  59. package/dist/ffmpeg/exec.js.map +1 -1
  60. package/dist/ffmpeg/fmp4.d.ts +49 -2
  61. package/dist/ffmpeg/fmp4.js +47 -11
  62. package/dist/ffmpeg/fmp4.js.map +1 -1
  63. package/dist/ffmpeg/hap-enums.d.ts +214 -0
  64. package/dist/ffmpeg/hap-enums.js +92 -0
  65. package/dist/ffmpeg/hap-enums.js.map +1 -0
  66. package/dist/ffmpeg/index.d.ts +16 -9
  67. package/dist/ffmpeg/index.js +6 -0
  68. package/dist/ffmpeg/index.js.map +1 -1
  69. package/dist/ffmpeg/mp4-assembler.d.ts +161 -0
  70. package/dist/ffmpeg/mp4-assembler.js +424 -0
  71. package/dist/ffmpeg/mp4-assembler.js.map +1 -0
  72. package/dist/ffmpeg/mp4-parser.d.ts +94 -0
  73. package/dist/ffmpeg/mp4-parser.js +130 -0
  74. package/dist/ffmpeg/mp4-parser.js.map +1 -0
  75. package/dist/ffmpeg/options.d.ts +62 -149
  76. package/dist/ffmpeg/options.js +608 -499
  77. package/dist/ffmpeg/options.js.map +1 -1
  78. package/dist/ffmpeg/process.d.ts +142 -96
  79. package/dist/ffmpeg/process.js +406 -278
  80. package/dist/ffmpeg/process.js.map +1 -1
  81. package/dist/ffmpeg/record.d.ts +325 -186
  82. package/dist/ffmpeg/record.js +418 -565
  83. package/dist/ffmpeg/record.js.map +1 -1
  84. package/dist/ffmpeg/recording-process-double.d.ts +157 -0
  85. package/dist/ffmpeg/recording-process-double.js +190 -0
  86. package/dist/ffmpeg/recording-process-double.js.map +1 -0
  87. package/dist/ffmpeg/rtp-parser.d.ts +70 -0
  88. package/dist/ffmpeg/rtp-parser.js +77 -0
  89. package/dist/ffmpeg/rtp-parser.js.map +1 -0
  90. package/dist/ffmpeg/rtp.d.ts +198 -141
  91. package/dist/ffmpeg/rtp.js +474 -251
  92. package/dist/ffmpeg/rtp.js.map +1 -1
  93. package/dist/ffmpeg/settings.d.ts +5 -2
  94. package/dist/ffmpeg/settings.js +20 -5
  95. package/dist/ffmpeg/settings.js.map +1 -1
  96. package/dist/ffmpeg/stream.d.ts +57 -107
  97. package/dist/ffmpeg/stream.js +121 -150
  98. package/dist/ffmpeg/stream.js.map +1 -1
  99. package/dist/formatters.d.ts +106 -0
  100. package/dist/formatters.js +174 -0
  101. package/dist/formatters.js.map +1 -0
  102. package/dist/homebridge-enums.d.ts +30 -0
  103. package/dist/homebridge-enums.js +17 -0
  104. package/dist/homebridge-enums.js.map +1 -0
  105. package/dist/index.d.ts +13 -6
  106. package/dist/index.js +8 -2
  107. package/dist/index.js.map +1 -1
  108. package/dist/logclient/auth.d.ts +114 -0
  109. package/dist/logclient/auth.js +199 -0
  110. package/dist/logclient/auth.js.map +1 -0
  111. package/dist/logclient/cli-run.d.ts +76 -0
  112. package/dist/logclient/cli-run.js +639 -0
  113. package/dist/logclient/cli-run.js.map +1 -0
  114. package/dist/logclient/cli.d.ts +3 -0
  115. package/dist/logclient/cli.js +97 -0
  116. package/dist/logclient/cli.js.map +1 -0
  117. package/dist/logclient/client.d.ts +145 -0
  118. package/dist/logclient/client.js +600 -0
  119. package/dist/logclient/client.js.map +1 -0
  120. package/dist/logclient/config.d.ts +173 -0
  121. package/dist/logclient/config.js +199 -0
  122. package/dist/logclient/config.js.map +1 -0
  123. package/dist/logclient/endpoints.d.ts +54 -0
  124. package/dist/logclient/endpoints.js +73 -0
  125. package/dist/logclient/endpoints.js.map +1 -0
  126. package/dist/logclient/filter.d.ts +45 -0
  127. package/dist/logclient/filter.js +51 -0
  128. package/dist/logclient/filter.js.map +1 -0
  129. package/dist/logclient/frame.d.ts +93 -0
  130. package/dist/logclient/frame.js +203 -0
  131. package/dist/logclient/frame.js.map +1 -0
  132. package/dist/logclient/index.d.ts +31 -0
  133. package/dist/logclient/index.js +12 -0
  134. package/dist/logclient/index.js.map +1 -0
  135. package/dist/logclient/parser.d.ts +211 -0
  136. package/dist/logclient/parser.js +393 -0
  137. package/dist/logclient/parser.js.map +1 -0
  138. package/dist/logclient/rest.d.ts +41 -0
  139. package/dist/logclient/rest.js +111 -0
  140. package/dist/logclient/rest.js.map +1 -0
  141. package/dist/logclient/settings.d.ts +15 -0
  142. package/dist/logclient/settings.js +64 -0
  143. package/dist/logclient/settings.js.map +1 -0
  144. package/dist/logclient/socket-double.d.ts +201 -0
  145. package/dist/logclient/socket-double.js +384 -0
  146. package/dist/logclient/socket-double.js.map +1 -0
  147. package/dist/logclient/socket.d.ts +257 -0
  148. package/dist/logclient/socket.js +620 -0
  149. package/dist/logclient/socket.js.map +1 -0
  150. package/dist/logclient/stitch.d.ts +83 -0
  151. package/dist/logclient/stitch.js +146 -0
  152. package/dist/logclient/stitch.js.map +1 -0
  153. package/dist/logclient/time-expression.d.ts +42 -0
  154. package/dist/logclient/time-expression.js +181 -0
  155. package/dist/logclient/time-expression.js.map +1 -0
  156. package/dist/logclient/time-window.d.ts +38 -0
  157. package/dist/logclient/time-window.js +53 -0
  158. package/dist/logclient/time-window.js.map +1 -0
  159. package/dist/logclient/types.d.ts +107 -0
  160. package/dist/logclient/types.js +6 -0
  161. package/dist/logclient/types.js.map +1 -0
  162. package/dist/mqttClient.d.ts +287 -0
  163. package/dist/mqttClient.js +433 -0
  164. package/dist/mqttClient.js.map +1 -0
  165. package/dist/service.d.ts +64 -15
  166. package/dist/service.js +93 -66
  167. package/dist/service.js.map +1 -1
  168. package/dist/ui/featureOptions.js +870 -0
  169. package/dist/ui/featureOptions.js.map +1 -0
  170. package/dist/ui/formatters.js +174 -0
  171. package/dist/ui/formatters.js.map +1 -0
  172. package/dist/ui/pluginConfigSession.mjs +141 -0
  173. package/dist/ui/webUi-featureOptions/categoryState.mjs +135 -0
  174. package/dist/ui/webUi-featureOptions/effects/keyboard.mjs +61 -0
  175. package/dist/ui/webUi-featureOptions/effects/persist.mjs +226 -0
  176. package/dist/ui/webUi-featureOptions/effects/theme.mjs +398 -0
  177. package/dist/ui/webUi-featureOptions/effects/tokens.mjs +152 -0
  178. package/dist/ui/webUi-featureOptions/rendering.mjs +431 -0
  179. package/dist/ui/webUi-featureOptions/selectors.mjs +360 -0
  180. package/dist/ui/webUi-featureOptions/state.mjs +319 -0
  181. package/dist/ui/webUi-featureOptions/store.mjs +181 -0
  182. package/dist/ui/webUi-featureOptions/utils.mjs +213 -0
  183. package/dist/ui/webUi-featureOptions/views/connectionError.mjs +152 -0
  184. package/dist/ui/webUi-featureOptions/views/deviceInfo.mjs +80 -0
  185. package/dist/ui/webUi-featureOptions/views/header.mjs +77 -0
  186. package/dist/ui/webUi-featureOptions/views/nav.mjs +341 -0
  187. package/dist/ui/webUi-featureOptions/views/options.mjs +521 -0
  188. package/dist/ui/webUi-featureOptions/views/search.mjs +395 -0
  189. package/dist/ui/webUi-featureOptions.mjs +702 -0
  190. package/dist/ui/webUi.mjs +225 -88
  191. package/dist/util.d.ts +679 -45
  192. package/dist/util.js +830 -77
  193. package/dist/util.js.map +1 -1
  194. package/package.json +33 -15
  195. package/build/eslint-rules.mjs +0 -511
  196. package/dist/featureoptions.d.ts +0 -264
  197. package/dist/featureoptions.js +0 -480
  198. package/dist/featureoptions.js.map +0 -1
  199. package/dist/mqttclient.d.ts +0 -178
  200. package/dist/mqttclient.js +0 -310
  201. package/dist/mqttclient.js.map +0 -1
  202. package/dist/ui/featureoptions.js +0 -480
  203. package/dist/ui/featureoptions.js.map +0 -1
  204. package/dist/ui/webUi-featureoptions.mjs +0 -3765
@@ -1 +1 @@
1
- {"version":3,"file":"rtp.js","sourceRoot":"","sources":["../../src/ffmpeg/rtp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,6JAA6J;AAC7J,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,UAAW,SAAQ,YAAY;IAElC,cAAc,CAAkB;IAChC,YAAY,CAAU;IACtB,UAAU,CAAU;IACpB,GAAG,CAA2B;IAC9B,SAAS,CAAS;IACV,MAAM,CAAC;IAEvB;;;;;;;;;;;;;;OAcG;IACH,YAAY,QAA2B,EAAG,SAAiB,EAAE,QAAgB,EAAE,OAAe,EAAE,GAA4B;QAE1H,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,QA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AS;YACf,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,OAAO;SAC/B,CAAC;IACJ,CAAC;CACF"}
@@ -3,5 +3,8 @@ export declare const HOMEKIT_STREAMING_HEADROOM = 64;
3
3
  export declare const HKSV_FRAGMENT_LENGTH = 4000;
4
4
  export declare const HKSV_IDR_INTERVAL = 4;
5
5
  export declare const HKSV_TIMEOUT = 4500;
6
- export declare const FFMPEG_INPUT_TIMEOUT = 5000;
7
- export declare const RPI_GPU_MINIMUM = 128;
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
@@ -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
- // FFmpeg's default input timeout, in milliseconds. FFmpeg terminates input streams that receive no data for this duration. The SIGKILL failsafe in process.ts and the
16
- // stream health monitor in stream.ts are both coordinated with this value.
17
- export const FFMPEG_INPUT_TIMEOUT = 5000;
18
- // Minimum required GPU memory on a Raspberry Pi to enable hardware acceleration.
19
- export const RPI_GPU_MINIMUM = 128;
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,sKAAsK;AACtK,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,iFAAiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC"}
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"}
@@ -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
- * FFmpeg process management and socket handling to support HomeKit livestreaming sessions.
6
+ * UDP return-port descriptor for the stream-health monitor.
3
7
  *
4
- * This module defines the `FfmpegStreamingProcess` class and related interfaces for orchestrating and monitoring FFmpeg-powered video streams. It manages process
5
- * lifecycle, handles UDP socket creation for video health monitoring, and enables integration with Homebridge streaming delegates for robust error handling, stream
6
- * cleanup, and automatic tuning.
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
- * Key features:
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
- import type { CameraController, CameraStreamingDelegate, StreamRequestCallback } from "homebridge";
21
- import type { ChildProcessWithoutNullStreams } from "child_process";
22
- import type { FfmpegOptions } from "./options.js";
23
- import { FfmpegProcess } from "./process.js";
24
- import type { Nullable } from "../util.js";
16
+ export interface FfmpegStreamingReturnPort {
17
+ ipFamily: IpFamily;
18
+ port: number;
19
+ }
25
20
  /**
26
- * Extension of the Homebridge CameraStreamingDelegate with additional streaming controls and error handling hooks.
21
+ * Construction-time options for {@link FfmpegStreamingProcess}.
27
22
  *
28
- * @property adjustProbeSize - Optional. Invoked to adjust probe size after stream startup errors.
29
- * @property controller - The Homebridge CameraController instance managing the stream.
30
- * @property ffmpegErrorCheck - Optional. Returns a user-friendly error message for specific FFmpeg errors, if detected.
31
- * @property stopStream - Optional. Invoked to force stop a specific stream session by ID.
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 CameraController
34
- * @see CameraStreamingDelegate
29
+ * @see FfmpegProcessInit
35
30
  *
36
31
  * @category FFmpeg
37
32
  */
38
- export interface HomebridgeStreamingDelegate extends CameraStreamingDelegate {
39
- adjustProbeSize?: () => void;
40
- controller: CameraController;
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
- * Provides FFmpeg process management and socket handling to support HomeKit livestreaming sessions.
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
- * This class extends `FfmpegProcess` to create, monitor, and terminate HomeKit-compatible video streams. Additionally, it invokes delegate hooks for error processing and
48
- * stream lifecycle management.
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
- * const streamingDelegate: HomebridgeStreamingDelegate = {
48
+ * await using proc = new FfmpegStreamingProcess(ffmpegOptions, {
54
49
  *
55
- * controller,
56
- * stopStream: (sessionId) => { ... } // End-of-session cleanup code.
57
- * };
50
+ * args: commandLineArgs,
51
+ * returnPort: { ipFamily: "ipv4", port: 50000 },
52
+ * signal: session.controller.signal
53
+ * });
58
54
  *
59
- * const process = new FfmpegStreamingProcess(
55
+ * await proc.ready;
60
56
  *
61
- * streamingDelegate,
62
- * sessionId,
63
- * ffmpegOptions,
64
- * commandLineArgs,
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 delegate;
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
- * Creates and binds a UDP socket for monitoring the health of the outgoing video stream.
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
- * if(ffmpeg) {
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
- * // Interact directly with the child process if necessary.
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
- get ffmpegProcess(): Nullable<ChildProcessWithoutNullStreams>;
78
+ constructor(options: FfmpegOptions, init?: FfmpegStreamingInit);
133
79
  /**
134
- * Handle and logs FFmpeg process errors.
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
- * If a known error condition is detected by the delegate, logs the custom message and returns. For "not enough frames to estimate rate; consider increasing probesize"
137
- * errors, invokes the delegate's `adjustProbeSize` hook for automatic tuning. Otherwise, falls back to the parent class's logging.
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
- * @param exitCode - The exit code from FFmpeg.
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
- protected logFfmpegError(exitCode: Nullable<number>, signal: Nullable<NodeJS.Signals>): void;
91
+ get returnPort(): FfmpegStreamingReturnPort | undefined;
143
92
  }
93
+ //# sourceMappingURL=stream.d.ts.map