@camstack/addon-pipeline 1.2.135 → 1.2.137
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/{addon-utils-CKf8kbwh.js → addon-utils-C6b5Tnia.js} +3 -3
- package/dist/audio-analyzer/index.js +5 -5
- package/dist/audio-analyzer/index.mjs +4 -4
- package/dist/detection-pipeline/index.js +55 -17
- package/dist/detection-pipeline/index.mjs +53 -15
- package/dist/{dist-BzLiQ8Ue.js → dist-4EMKvxCp.js} +275 -25
- package/dist/{dist-C1dXLLQq.mjs → dist-g0Or5_pR.mjs} +270 -26
- package/dist/{event-loop-stall-monitor-CU-xxX5c.mjs → event-loop-stall-monitor-CskL9Lgu.mjs} +1 -1
- package/dist/{event-loop-stall-monitor-DjV4Bow7.js → event-loop-stall-monitor-DDm07Ei6.js} +1 -1
- package/dist/{lazy-sharp-DxWmhTqk.js → lazy-sharp-BlA9PxWk.js} +3 -3
- package/dist/motion-wasm/index.js +3 -3
- package/dist/motion-wasm/index.mjs +3 -3
- package/dist/node-BOHn8gpk.js +721 -0
- package/dist/node-Bo1g8hLO.mjs +690 -0
- package/dist/pipeline-runner/index.js +37 -11
- package/dist/pipeline-runner/index.mjs +37 -11
- package/dist/{process-memory-CZK3D3kM.js → process-memory-C3084DOt.js} +2 -2
- package/dist/{process-memory-CaEwi5Cd.mjs → process-memory-DmrHWybb.mjs} +2 -2
- package/dist/recorder/index.js +382 -35
- package/dist/recorder/index.mjs +382 -35
- package/dist/{segment-demux-js-BbpqygHL.js → segment-demux-js-BrQ_A0oi.js} +1 -1
- package/dist/{segment-demux-js-njRO85gd.mjs → segment-demux-js-C-a2pghM.mjs} +1 -1
- package/dist/session-decode/decode-worker-child.js +2 -2
- package/dist/session-decode/decode-worker-child.mjs +2 -2
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-C14Qqrqn.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-AH6OJ3hJ.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CQyiEd0l.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BrTM_tsb.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-kjsveCjG.mjs → hostInit-XNyn-FTM.mjs} +3 -3
- package/dist/stream-broker/index.js +88 -515
- package/dist/stream-broker/index.mjs +85 -510
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-DvTZBvh2.js → worker-protocol-BLfaD5uC.js} +1 -1
- package/dist/{worker-protocol-DxsVx0G7.mjs → worker-protocol-vc8WWhjx.mjs} +1 -1
- package/package.json +17 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DqplWP1i.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DKMXG57X.mjs +0 -26
- package/dist/{addon-utils-CgBCF-mE.mjs → addon-utils-C8KTuPdE.mjs} +2 -2
- package/dist/{lazy-sharp-BtT5x-qP.mjs → lazy-sharp-DXsqwpph.mjs} +1 -1
|
@@ -2,16 +2,17 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const require_dist = require("../dist-4EMKvxCp.js");
|
|
6
|
+
const require_node = require("../node-BOHn8gpk.js");
|
|
7
|
+
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DDm07Ei6.js");
|
|
8
|
+
const require_worker_protocol = require("../worker-protocol-BLfaD5uC.js");
|
|
8
9
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
10
|
+
const require_lazy_sharp = require("../lazy-sharp-BlA9PxWk.js");
|
|
10
11
|
const require_restream_intent = require("../restream-intent-Cv9x3jmu.js");
|
|
11
12
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
13
|
+
let node_child_process = require("node:child_process");
|
|
12
14
|
let sharp = require("sharp");
|
|
13
15
|
sharp = require_dist.__toESM(sharp);
|
|
14
|
-
let node_child_process = require("node:child_process");
|
|
15
16
|
let node_url = require("node:url");
|
|
16
17
|
let node_perf_hooks = require("node:perf_hooks");
|
|
17
18
|
let node_os = require("node:os");
|
|
@@ -29,9 +30,18 @@ var KILL_SIGNALS = {
|
|
|
29
30
|
SIGKILL: "SIGKILL",
|
|
30
31
|
SIGTERM: "SIGTERM"
|
|
31
32
|
};
|
|
32
|
-
/**
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Adapt a Node {@link ChildProcess} to the coordinator's
|
|
35
|
+
* {@link ForkedChildLike}.
|
|
36
|
+
*
|
|
37
|
+
* `onExit` is invoked exactly once, on the child's real exit, before the
|
|
38
|
+
* coordinator's own listener — it is how the cost claim is released. It is a
|
|
39
|
+
* parameter rather than a second `child.on('exit')` in the caller because
|
|
40
|
+
* every listener added out here is one somebody can forget to remove.
|
|
41
|
+
*/
|
|
42
|
+
function wrapChild(child, onExit) {
|
|
34
43
|
child.on("error", () => void 0);
|
|
44
|
+
child.on("exit", onExit);
|
|
35
45
|
return {
|
|
36
46
|
send: (msg) => {
|
|
37
47
|
if (!child.connected) return;
|
|
@@ -75,14 +85,21 @@ function wrapChild(child) {
|
|
|
75
85
|
* node-av through `CAMSTACK_FRAMEWORK_DIR` / `CAMSTACK_BUNDLED_ADDONS_DIR` on
|
|
76
86
|
* agents, so a replaced env would silently break decoding off the hub.
|
|
77
87
|
*/
|
|
78
|
-
function forkDecodeWorker(
|
|
79
|
-
|
|
88
|
+
function forkDecodeWorker(source, leaseOverride = {}, costRegistry) {
|
|
89
|
+
const child = (0, node_child_process.fork)(CHILD_ENTRY_PATH, [], {
|
|
80
90
|
serialization: "advanced",
|
|
81
91
|
env: {
|
|
82
92
|
...process.env,
|
|
83
93
|
...require_worker_protocol.nativeLeaseSettingEnv(leaseOverride)
|
|
84
94
|
}
|
|
85
|
-
})
|
|
95
|
+
});
|
|
96
|
+
const costClaim = costRegistry?.claim({
|
|
97
|
+
role: "decode",
|
|
98
|
+
deviceId: source.deviceId,
|
|
99
|
+
unit: `${source.deviceId}/decode`,
|
|
100
|
+
pid: child.pid
|
|
101
|
+
}) ?? require_node.NO_COST_CLAIM;
|
|
102
|
+
return wrapChild(child, () => costClaim.release());
|
|
86
103
|
}
|
|
87
104
|
//#endregion
|
|
88
105
|
//#region src/session-decode/guarded-session-decode.ts
|
|
@@ -5210,6 +5227,12 @@ var METRICS_HEARTBEAT_MS = 3e4;
|
|
|
5210
5227
|
var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAddon {
|
|
5211
5228
|
runner = null;
|
|
5212
5229
|
/**
|
|
5230
|
+
* The decode-worker children this addon forked, claimed at the fork and
|
|
5231
|
+
* released at their exit. One registry per PROCESS; it dies with the
|
|
5232
|
+
* process, which is correct — those workers were this process's children.
|
|
5233
|
+
*/
|
|
5234
|
+
costRegistry = new require_node.ChildCostRegistry();
|
|
5235
|
+
/**
|
|
5213
5236
|
* Per-runner (per-node) decode-worker SPAWN-CONCURRENCY GATE (P5). A single
|
|
5214
5237
|
* counting semaphore every session-decode fork (detection + motion, all
|
|
5215
5238
|
* cameras on this node) passes through, sized to
|
|
@@ -5511,6 +5534,9 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
5511
5534
|
providers: [{
|
|
5512
5535
|
capability: require_dist.pipelineRunnerCapability,
|
|
5513
5536
|
provider: this
|
|
5537
|
+
}, {
|
|
5538
|
+
capability: require_dist.loadContributionCapability,
|
|
5539
|
+
provider: { list: () => this.costRegistry.contributions() }
|
|
5514
5540
|
}],
|
|
5515
5541
|
customActions: pipelineRunnerBenchActions,
|
|
5516
5542
|
actionHandlers: {
|
|
@@ -6660,7 +6686,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends require_dist.BaseAdd
|
|
|
6660
6686
|
* knobs are read at spawn, so a changed setting reaches NEW sessions and
|
|
6661
6687
|
* leaves running ones alone (a live session would have to be re-dialled).
|
|
6662
6688
|
*/
|
|
6663
|
-
forkDecodeWorkerWithLease = (source) => forkDecodeWorker(source, this.nativeLease.current());
|
|
6689
|
+
forkDecodeWorkerWithLease = (source) => forkDecodeWorker(source, this.nativeLease.current(), this.costRegistry);
|
|
6664
6690
|
/**
|
|
6665
6691
|
* Refresh the lease knobs before a decode worker is spawned. Awaited on the
|
|
6666
6692
|
* `acquire` leg of `startGuardedSessionDecode` (which always completes before
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
1
|
+
import { $ as loadContributionCapability, B as defineCustomActions, Ct as errMsg, Gt as boolean, H as deriveDetailCropRect, Jt as literal, L as customAction, Nt as createEvent, Qt as string, Rt as nodePin, Ut as _enum, Wt as array, Xt as object, Yt as number, ct as pickDetailCropConvention, dt as pipelineRunnerCapability, en as EventCategory, kt as BaseAddon, lt as pickNativeLeaseOverride, m as DEVICE_BACKEND_TO_FORMAT, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as lazy, u as DEFAULT_DETAIL_CROP_CONVENTION } from "../dist-g0Or5_pR.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Bo1g8hLO.mjs";
|
|
3
|
+
import { i as resolveFrameViewGeometry, r as localFrameRegistry, t as attributeStall, u as getStepDefinition } from "../event-loop-stall-monitor-CskL9Lgu.mjs";
|
|
4
|
+
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-vc8WWhjx.mjs";
|
|
4
5
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
5
|
-
import { t as getSharp } from "../lazy-sharp-
|
|
6
|
+
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
7
|
import { n as withDetectionIntent } from "../restream-intent-B4BXZra7.mjs";
|
|
7
8
|
import { n as profileForStreamId, t as isRemoteRestream } from "../remote-restream-BeHi78PZ.mjs";
|
|
8
|
-
import sharp from "sharp";
|
|
9
9
|
import { fork } from "node:child_process";
|
|
10
|
+
import sharp from "sharp";
|
|
10
11
|
import { fileURLToPath } from "node:url";
|
|
11
12
|
import { PerformanceObserver } from "node:perf_hooks";
|
|
12
13
|
import * as os from "node:os";
|
|
@@ -23,9 +24,18 @@ var KILL_SIGNALS = {
|
|
|
23
24
|
SIGKILL: "SIGKILL",
|
|
24
25
|
SIGTERM: "SIGTERM"
|
|
25
26
|
};
|
|
26
|
-
/**
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Adapt a Node {@link ChildProcess} to the coordinator's
|
|
29
|
+
* {@link ForkedChildLike}.
|
|
30
|
+
*
|
|
31
|
+
* `onExit` is invoked exactly once, on the child's real exit, before the
|
|
32
|
+
* coordinator's own listener — it is how the cost claim is released. It is a
|
|
33
|
+
* parameter rather than a second `child.on('exit')` in the caller because
|
|
34
|
+
* every listener added out here is one somebody can forget to remove.
|
|
35
|
+
*/
|
|
36
|
+
function wrapChild(child, onExit) {
|
|
28
37
|
child.on("error", () => void 0);
|
|
38
|
+
child.on("exit", onExit);
|
|
29
39
|
return {
|
|
30
40
|
send: (msg) => {
|
|
31
41
|
if (!child.connected) return;
|
|
@@ -69,14 +79,21 @@ function wrapChild(child) {
|
|
|
69
79
|
* node-av through `CAMSTACK_FRAMEWORK_DIR` / `CAMSTACK_BUNDLED_ADDONS_DIR` on
|
|
70
80
|
* agents, so a replaced env would silently break decoding off the hub.
|
|
71
81
|
*/
|
|
72
|
-
function forkDecodeWorker(
|
|
73
|
-
|
|
82
|
+
function forkDecodeWorker(source, leaseOverride = {}, costRegistry) {
|
|
83
|
+
const child = fork(CHILD_ENTRY_PATH, [], {
|
|
74
84
|
serialization: "advanced",
|
|
75
85
|
env: {
|
|
76
86
|
...process.env,
|
|
77
87
|
...nativeLeaseSettingEnv(leaseOverride)
|
|
78
88
|
}
|
|
79
|
-
})
|
|
89
|
+
});
|
|
90
|
+
const costClaim = costRegistry?.claim({
|
|
91
|
+
role: "decode",
|
|
92
|
+
deviceId: source.deviceId,
|
|
93
|
+
unit: `${source.deviceId}/decode`,
|
|
94
|
+
pid: child.pid
|
|
95
|
+
}) ?? NO_COST_CLAIM;
|
|
96
|
+
return wrapChild(child, () => costClaim.release());
|
|
80
97
|
}
|
|
81
98
|
//#endregion
|
|
82
99
|
//#region src/session-decode/guarded-session-decode.ts
|
|
@@ -5203,6 +5220,12 @@ var METRICS_HEARTBEAT_MS = 3e4;
|
|
|
5203
5220
|
var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
5204
5221
|
runner = null;
|
|
5205
5222
|
/**
|
|
5223
|
+
* The decode-worker children this addon forked, claimed at the fork and
|
|
5224
|
+
* released at their exit. One registry per PROCESS; it dies with the
|
|
5225
|
+
* process, which is correct — those workers were this process's children.
|
|
5226
|
+
*/
|
|
5227
|
+
costRegistry = new ChildCostRegistry();
|
|
5228
|
+
/**
|
|
5206
5229
|
* Per-runner (per-node) decode-worker SPAWN-CONCURRENCY GATE (P5). A single
|
|
5207
5230
|
* counting semaphore every session-decode fork (detection + motion, all
|
|
5208
5231
|
* cameras on this node) passes through, sized to
|
|
@@ -5504,6 +5527,9 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
5504
5527
|
providers: [{
|
|
5505
5528
|
capability: pipelineRunnerCapability,
|
|
5506
5529
|
provider: this
|
|
5530
|
+
}, {
|
|
5531
|
+
capability: loadContributionCapability,
|
|
5532
|
+
provider: { list: () => this.costRegistry.contributions() }
|
|
5507
5533
|
}],
|
|
5508
5534
|
customActions: pipelineRunnerBenchActions,
|
|
5509
5535
|
actionHandlers: {
|
|
@@ -6653,7 +6679,7 @@ var PipelineRunnerAddon = class PipelineRunnerAddon extends BaseAddon {
|
|
|
6653
6679
|
* knobs are read at spawn, so a changed setting reaches NEW sessions and
|
|
6654
6680
|
* leaves running ones alone (a live session would have to be re-dialled).
|
|
6655
6681
|
*/
|
|
6656
|
-
forkDecodeWorkerWithLease = (source) => forkDecodeWorker(source, this.nativeLease.current());
|
|
6682
|
+
forkDecodeWorkerWithLease = (source) => forkDecodeWorker(source, this.nativeLease.current(), this.costRegistry);
|
|
6657
6683
|
/**
|
|
6658
6684
|
* Refresh the lease knobs before a decode worker is spawned. Awaited on the
|
|
6659
6685
|
* `acquire` leg of `startGuardedSessionDecode` (which always completes before
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
2
|
-
let node_child_process = require("node:child_process");
|
|
1
|
+
const require_dist = require("./dist-4EMKvxCp.js");
|
|
3
2
|
let node_fs = require("node:fs");
|
|
4
3
|
node_fs = require_dist.__toESM(node_fs);
|
|
4
|
+
let node_child_process = require("node:child_process");
|
|
5
5
|
//#region src/shared/node-topology-platform.ts
|
|
6
6
|
/**
|
|
7
7
|
* Pick a node's `{ platform, arch }` from the cluster topology. Returns an empty
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { execFile } from "node:child_process";
|
|
1
|
+
import { at as parseProcStatus } from "./dist-g0Or5_pR.mjs";
|
|
3
2
|
import * as fs from "node:fs";
|
|
3
|
+
import { execFile } from "node:child_process";
|
|
4
4
|
//#region src/shared/node-topology-platform.ts
|
|
5
5
|
/**
|
|
6
6
|
* Pick a node's `{ platform, arch }` from the cluster topology. Returns an empty
|