homebridge-unifi-protect 7.14.0 → 7.16.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 (78) hide show
  1. package/dist/devices/protect-camera-package.d.ts +2 -2
  2. package/dist/devices/protect-camera-package.js +1 -1
  3. package/dist/devices/protect-camera-package.js.map +1 -1
  4. package/dist/devices/protect-camera.d.ts +5 -5
  5. package/dist/devices/protect-camera.js +40 -17
  6. package/dist/devices/protect-camera.js.map +1 -1
  7. package/dist/devices/protect-chime.d.ts +3 -3
  8. package/dist/devices/protect-device.d.ts +8 -7
  9. package/dist/devices/protect-device.js.map +1 -1
  10. package/dist/devices/protect-doorbell.d.ts +3 -3
  11. package/dist/devices/protect-doorbell.js +2 -2
  12. package/dist/devices/protect-doorbell.js.map +1 -1
  13. package/dist/devices/protect-light.d.ts +3 -3
  14. package/dist/devices/protect-light.js +2 -2
  15. package/dist/devices/protect-light.js.map +1 -1
  16. package/dist/devices/protect-liveviews.d.ts +1 -1
  17. package/dist/devices/protect-liveviews.js.map +1 -1
  18. package/dist/devices/protect-nvr-systeminfo.d.ts +1 -1
  19. package/dist/devices/protect-nvr-systeminfo.js.map +1 -1
  20. package/dist/devices/protect-securitysystem.d.ts +2 -2
  21. package/dist/devices/protect-sensor.d.ts +3 -3
  22. package/dist/devices/protect-viewer.d.ts +3 -3
  23. package/dist/index.d.ts +1 -1
  24. package/dist/protect-events.d.ts +4 -4
  25. package/dist/protect-events.js.map +1 -1
  26. package/dist/protect-livestream.d.ts +5 -4
  27. package/dist/protect-livestream.js +29 -15
  28. package/dist/protect-livestream.js.map +1 -1
  29. package/dist/protect-nvr.d.ts +7 -6
  30. package/dist/protect-nvr.js +7 -5
  31. package/dist/protect-nvr.js.map +1 -1
  32. package/dist/protect-options.d.ts +1 -1
  33. package/dist/protect-options.js +2 -1
  34. package/dist/protect-options.js.map +1 -1
  35. package/dist/protect-platform.d.ts +3 -7
  36. package/dist/protect-platform.js +2 -44
  37. package/dist/protect-platform.js.map +1 -1
  38. package/dist/protect-record.d.ts +5 -3
  39. package/dist/protect-record.js +11 -8
  40. package/dist/protect-record.js.map +1 -1
  41. package/dist/protect-snapshot.d.ts +4 -4
  42. package/dist/protect-snapshot.js +8 -9
  43. package/dist/protect-snapshot.js.map +1 -1
  44. package/dist/protect-stream.d.ts +6 -6
  45. package/dist/protect-stream.js +101 -58
  46. package/dist/protect-stream.js.map +1 -1
  47. package/dist/protect-timeshift.d.ts +3 -3
  48. package/dist/protect-timeshift.js +1 -1
  49. package/dist/protect-timeshift.js.map +1 -1
  50. package/dist/protect-types.d.ts +2 -2
  51. package/dist/settings.d.ts +0 -2
  52. package/dist/settings.js +0 -4
  53. package/dist/settings.js.map +1 -1
  54. package/homebridge-ui/public/lib/featureoptions.js +65 -6
  55. package/homebridge-ui/public/lib/featureoptions.js.map +1 -1
  56. package/homebridge-ui/public/lib/webUi-featureoptions.mjs +4 -4
  57. package/package.json +6 -6
  58. package/dist/ffmpeg/index.d.ts +0 -6
  59. package/dist/ffmpeg/index.js +0 -11
  60. package/dist/ffmpeg/index.js.map +0 -1
  61. package/dist/ffmpeg/protect-ffmpeg-codecs.d.ts +0 -22
  62. package/dist/ffmpeg/protect-ffmpeg-codecs.js +0 -189
  63. package/dist/ffmpeg/protect-ffmpeg-codecs.js.map +0 -1
  64. package/dist/ffmpeg/protect-ffmpeg-exec.d.ts +0 -15
  65. package/dist/ffmpeg/protect-ffmpeg-exec.js +0 -58
  66. package/dist/ffmpeg/protect-ffmpeg-exec.js.map +0 -1
  67. package/dist/ffmpeg/protect-ffmpeg-options.d.ts +0 -33
  68. package/dist/ffmpeg/protect-ffmpeg-options.js +0 -555
  69. package/dist/ffmpeg/protect-ffmpeg-options.js.map +0 -1
  70. package/dist/ffmpeg/protect-ffmpeg-record.d.ts +0 -15
  71. package/dist/ffmpeg/protect-ffmpeg-record.js +0 -246
  72. package/dist/ffmpeg/protect-ffmpeg-record.js.map +0 -1
  73. package/dist/ffmpeg/protect-ffmpeg-stream.d.ts +0 -17
  74. package/dist/ffmpeg/protect-ffmpeg-stream.js +0 -102
  75. package/dist/ffmpeg/protect-ffmpeg-stream.js.map +0 -1
  76. package/dist/ffmpeg/protect-ffmpeg.d.ts +0 -35
  77. package/dist/ffmpeg/protect-ffmpeg.js +0 -238
  78. package/dist/ffmpeg/protect-ffmpeg.js.map +0 -1
@@ -1,238 +0,0 @@
1
- /* Copyright(C) 2017-2025, HJD (https://github.com/hjdhjd). All rights reserved.
2
- *
3
- * protect-ffmpeg.ts: Base class to provide FFmpeg process control and capability introspection.
4
- *
5
- * This module is heavily inspired by the homebridge and homebridge-camera-ffmpeg source code. Thank you for your contributions to the HomeKit world.
6
- */
7
- import { spawn } from "node:child_process";
8
- import { EventEmitter } from "node:events";
9
- import os from "node:os";
10
- import util from "node:util";
11
- // Base class for all FFmpeg process management.
12
- export class FfmpegProcess extends EventEmitter {
13
- callback;
14
- commandLineArgs;
15
- ffmpegTimeout;
16
- hasError;
17
- isEnded;
18
- isLogging;
19
- isPrepared;
20
- isStarted;
21
- isVerbose;
22
- log;
23
- nvr;
24
- platform;
25
- process;
26
- protectCamera;
27
- stderrBuffer;
28
- stderrLog;
29
- // Create a new FFmpeg process instance.
30
- constructor(protectCamera, commandLineArgs, callback) {
31
- // Initialize our parent.
32
- super();
33
- this.callback = null;
34
- this.commandLineArgs = [];
35
- this.hasError = false;
36
- this.isLogging = false;
37
- this.isPrepared = false;
38
- this.isEnded = false;
39
- this.isStarted = false;
40
- this.log = protectCamera.log;
41
- this.nvr = protectCamera.nvr;
42
- this.platform = protectCamera.platform;
43
- this.process = null;
44
- this.protectCamera = protectCamera;
45
- this.stderrBuffer = "";
46
- this.stderrLog = [];
47
- // Toggle FFmpeg logging, if configured.
48
- this.isVerbose = this.platform.verboseFfmpeg || protectCamera.stream.verboseFfmpeg;
49
- // If we've specified a command line or a callback, let's save them.
50
- if (commandLineArgs) {
51
- this.commandLineArgs = commandLineArgs;
52
- }
53
- if (callback) {
54
- this.callback = callback;
55
- }
56
- }
57
- // Prepare and start our FFmpeg process.
58
- prepareProcess(commandLineArgs, callback) {
59
- // If we've specified a new command line or callback, let's save them.
60
- if (commandLineArgs) {
61
- this.commandLineArgs = commandLineArgs;
62
- }
63
- // No command line arguments - we're done.
64
- if (!this.commandLineArgs) {
65
- this.log.error("No FFmpeg command line specified.");
66
- return;
67
- }
68
- // Save the callback, if we have one.
69
- if (callback) {
70
- this.callback = callback;
71
- }
72
- // See if we should display ffmpeg command output.
73
- this.isLogging = false;
74
- // Track if we've started or ended FFmpeg.
75
- this.isStarted = false;
76
- this.isEnded = false;
77
- // If we've got a loglevel specified, ensure we display it.
78
- if (this.commandLineArgs.indexOf("-loglevel") !== -1) {
79
- this.isLogging = true;
80
- }
81
- // Inform the user, if we've been asked to do so.
82
- if (this.isLogging || this.isVerbose || this.platform.config.debugAll) {
83
- this.log.info("FFmpeg command (version: %s): %s %s", this.platform.codecSupport.ffmpegVersion, this.platform.config.videoProcessor, this.commandLineArgs.join(" "));
84
- }
85
- else {
86
- this.log.debug("FFmpeg command (version: %s): %s %s", this.platform.codecSupport.ffmpegVersion, this.platform.config.videoProcessor, this.commandLineArgs.join(" "));
87
- }
88
- this.isPrepared = true;
89
- }
90
- // Start our FFmpeg process.
91
- start(commandLineArgs, callback, errorHandler) {
92
- // If we haven't prepared our FFmpeg process, do so now.
93
- if (!this.isPrepared) {
94
- this.prepareProcess(commandLineArgs, callback);
95
- if (!this.isPrepared) {
96
- this.log.error("Error preparing to run FFmpeg.");
97
- return;
98
- }
99
- }
100
- // Execute the command line based on what we've prepared.
101
- this.process = spawn(this.platform.config.videoProcessor, this.commandLineArgs);
102
- // Configure any post-spawn listeners and other plumbing.
103
- this.configureProcess(errorHandler);
104
- }
105
- // Configure our FFmpeg process, once started.
106
- configureProcess(errorHandler) {
107
- let dataListener;
108
- let errorListener;
109
- // Handle errors emitted during process creation, such as an invalid command line.
110
- this.process?.once("error", (error) => {
111
- this.log.error("FFmpeg failed to start: %s.", error.message);
112
- // Execute our error handler, if one is provided.
113
- if (errorHandler) {
114
- void errorHandler(error.name + ": " + error.message);
115
- }
116
- });
117
- // Handle errors on stdin.
118
- this.process?.stdin?.on("error", errorListener = (error) => {
119
- if (!error.message.includes("EPIPE")) {
120
- this.log.error("FFmpeg error: %s.", error.message);
121
- }
122
- });
123
- // Handle logging output that gets sent to stderr.
124
- this.process?.stderr?.on("data", dataListener = (data) => {
125
- // Inform us when we start receiving data back from FFmpeg. We do this here because it's the only
126
- // truly reliable place we can check on FFmpeg. stdin and stdout may not be used at all, depending
127
- // on the way FFmpeg is called, but stderr will always be there.
128
- if (!this.isStarted) {
129
- this.isStarted = true;
130
- this.isEnded = false;
131
- this.log.debug("Received the first frame.");
132
- // Always remember to execute the callback once we're setup to let homebridge know we're streaming.
133
- if (this.callback) {
134
- this.callback();
135
- this.callback = null;
136
- }
137
- }
138
- // Append to the current line we've been buffering. We don't want to output not-printable characters to ensure the log output is readable.
139
- this.stderrBuffer += data.toString().replace(/\p{C}+/gu, os.EOL);
140
- // Debugging and additional logging collection.
141
- for (;;) {
142
- // Find the next newline.
143
- const lineIndex = this.stderrBuffer.indexOf(os.EOL);
144
- // If there's no newline, we're done until we get more data.
145
- if (lineIndex === -1) {
146
- return;
147
- }
148
- // Grab the next complete line, and increment our buffer.
149
- const line = this.stderrBuffer.slice(0, lineIndex);
150
- this.stderrBuffer = this.stderrBuffer.slice(lineIndex + os.EOL.length);
151
- this.stderrLog.push(line);
152
- // Show it to the user if it's been requested.
153
- if (this.isLogging || this.isVerbose || this.platform.config.debugAll) {
154
- this.log.info(line);
155
- }
156
- }
157
- });
158
- // Handle our process termination.
159
- this.process?.once("exit", (exitCode, signal) => {
160
- // Clear out our canary.
161
- if (this.ffmpegTimeout) {
162
- clearTimeout(this.ffmpegTimeout);
163
- }
164
- this.isStarted = false;
165
- this.isEnded = true;
166
- // Some utilities to streamline things.
167
- const logPrefix = "FFmpeg process ended ";
168
- // FFmpeg ended normally and our canary didn't need to enforce FFmpeg's extinction.
169
- if (this.ffmpegTimeout && (exitCode === 0)) {
170
- this.log.debug(logPrefix + "(Normal).");
171
- }
172
- else if (((exitCode === null) || (exitCode === 255)) && this.process?.killed) {
173
- // FFmpeg has ended. Let's figure out if it's because we killed it or whether it died of natural causes.
174
- this.log.debug(logPrefix + (signal === "SIGKILL" ? "(Killed)." : "(Expected)."));
175
- }
176
- else {
177
- // Flag that we've run into an FFmpeg error.
178
- this.hasError = true;
179
- // Flush out any remaining output in our error buffer.
180
- if (this.stderrBuffer.length) {
181
- this.stderrLog.push(this.stderrBuffer + "\n");
182
- this.stderrBuffer = "";
183
- }
184
- // Inform the user.
185
- this.logFfmpegError(exitCode, signal);
186
- // Execute our error handler, if one is provided.
187
- if (errorHandler) {
188
- void errorHandler(util.format(this.protectCamera.name + ": " + logPrefix + " unexpectedly with exit code %s and signal %s.", exitCode, signal));
189
- }
190
- }
191
- // Cleanup after ourselves.
192
- this.process?.stdin?.off("error", errorListener);
193
- this.process?.stderr?.off("data", dataListener);
194
- this.process = null;
195
- this.stderrLog = [];
196
- });
197
- }
198
- // Stop the FFmpeg process and complete any cleanup activities.
199
- stopProcess() {
200
- // Check to make sure we aren't using stdin for data before telling FFmpeg we're done.
201
- if (!this.commandLineArgs.includes("pipe:0")) {
202
- this.process?.stdin.end("q");
203
- }
204
- // Close our input and output.
205
- this.process?.stdin.destroy();
206
- this.process?.stdout.destroy();
207
- // In case we need to kill it again, just to be sure it's really dead.
208
- this.ffmpegTimeout = setTimeout(() => {
209
- this.process?.kill("SIGKILL");
210
- }, 5000);
211
- // Send the kill shot.
212
- this.process?.kill();
213
- }
214
- // Cleanup after we're done.
215
- stop() {
216
- this.stopProcess();
217
- }
218
- // Inform the user if an FFmpeg error occurs.
219
- logFfmpegError(exitCode, signal) {
220
- // Something else has occurred. Inform the user, and stop everything.
221
- this.log.error("FFmpeg process ended unexpectedly with %s%s%s.", (exitCode !== null) ? "an exit code of " + exitCode.toString() : "", ((exitCode !== null) && signal) ? " and " : "", signal ? "a signal received of " + signal : "");
222
- this.log.error("FFmpeg (%s) command that errored out was: %s %s", this.platform.codecSupport.ffmpegVersion, this.platform.config.videoProcessor, this.commandLineArgs.join(" "));
223
- this.stderrLog.map(x => this.log.error(x));
224
- }
225
- // Return the standard input for this process.
226
- get stdin() {
227
- return this.process?.stdin ?? null;
228
- }
229
- // Return the standard output for this process.
230
- get stdout() {
231
- return this.process?.stdout ?? null;
232
- }
233
- // Return the standard error for this process.
234
- get stderr() {
235
- return this.process?.stderr ?? null;
236
- }
237
- }
238
- //# sourceMappingURL=protect-ffmpeg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protect-ffmpeg.js","sourceRoot":"","sources":["../../src/ffmpeg/protect-ffmpeg.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAkC,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,gDAAgD;AAChD,MAAM,OAAO,aAAc,SAAQ,YAAY;IAEnC,QAAQ,CAAkC;IAC1C,eAAe,CAAW;IAC5B,aAAa,CAAkB;IAChC,QAAQ,CAAU;IAClB,OAAO,CAAU;IAChB,SAAS,CAAU;IACnB,UAAU,CAAU;IACrB,SAAS,CAAU;IAChB,SAAS,CAAU;IACV,GAAG,CAA0B;IAC7B,GAAG,CAAa;IAClB,QAAQ,CAAkB;IACjC,OAAO,CAA2C;IAClD,aAAa,CAAgB;IAC/B,YAAY,CAAS;IACnB,SAAS,CAAW;IAE9B,wCAAwC;IACxC,YAAY,aAA4B,EAAE,eAA0B,EAAE,QAAgC;QAEpG,yBAAyB;QACzB,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG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