@camstack/addon-pipeline 1.1.55 → 1.1.57
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/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/detection-pipeline/index.js +92 -88
- package/dist/detection-pipeline/index.mjs +91 -87
- package/dist/{dist-DI57FC8K.js → dist-CK8Ur-OS.js} +1045 -43
- package/dist/{dist-RWGGPwVx.mjs → dist-CL531uVA.mjs} +1045 -43
- package/dist/motion-wasm/index.js +9 -41
- package/dist/motion-wasm/index.mjs +9 -41
- package/dist/pipeline-runner/index.js +338 -664
- package/dist/pipeline-runner/index.mjs +327 -655
- package/dist/recorder/index.js +2 -2
- package/dist/recorder/index.mjs +2 -2
- package/dist/remote-restream-BeHi78PZ.mjs +25 -0
- package/dist/remote-restream-CO36Sr30.js +36 -0
- package/dist/session-decode/decode-worker-child.js +5 -3
- package/dist/session-decode/decode-worker-child.mjs +5 -3
- package/dist/{step-definitions-CP9kVSml.mjs → step-definitions-1d3_vQ6S.mjs} +45 -3
- package/dist/{step-definitions-CNBFKjZe.js → step-definitions-DHAxruAQ.js} +45 -3
- package/dist/stream-broker/_stub.js +351 -291
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-mDCPzmT3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cm_B-hQT.mjs} +2 -2
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ba7Eyd47.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-Dn_pxzP-.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-TWCUWhCm.mjs} +2 -2
- package/dist/stream-broker/{hostInit-GM_CI22k.mjs → hostInit-DEaqJpGA.mjs} +2 -2
- package/dist/stream-broker/index.js +935 -38
- package/dist/stream-broker/index.mjs +932 -35
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-BChW0ntM.js → MaskShapeCanvas-DI4BY7W2-CZUzu3MF.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-DDzqEbSe.js → MotionZonesSettings-NcxxQN8r-CmZbzLQi.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-B879GXaf.js → PrivacyMaskSettings-APgPLF7p-BOKDrH0N.js} +1 -1
- package/embed-dist/assets/index-Bmpl9O1K.css +2 -0
- package/embed-dist/assets/index-DOsK8CZb.js +81 -0
- package/embed-dist/index.html +2 -2
- package/package.json +7 -5
- package/python/inference_pool.py +183 -29
- package/python/postprocessors/__init__.py +2 -0
- package/python/postprocessors/ssd.py +128 -0
- package/python/requirements-edgetpu.txt +23 -0
- package/python/test_inference_pool_layout.py +16 -1
- package/python/test_inference_pool_preprocess.py +65 -0
- package/dist/remote-source-plane-CHgvzzA6.js +0 -1030
- package/dist/remote-source-plane-DU0aRSPv.mjs +0 -1001
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B3gTdHEh.mjs +0 -26
- package/embed-dist/assets/index-CC06JBcl.css +0 -2
- package/embed-dist/assets/index-CNjQ5rAE.js +0 -81
- package/dist/{model-download-service-C-IHWnXx-BPy6aoAx.mjs → model-download-service-C-IHWnXx-3Mmeob3l.mjs} +1 -1
- package/dist/{model-download-service-C-IHWnXx-BLXzxpRB.js → model-download-service-C-IHWnXx-D326YNnt.js} +1 -1
|
@@ -2,8 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
let _camstack_shm_ring = require("@camstack/shm-ring");
|
|
5
|
+
const require_dist = require("../dist-CK8Ur-OS.js");
|
|
7
6
|
let node_fs = require("node:fs");
|
|
8
7
|
let node_path = require("node:path");
|
|
9
8
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -136,13 +135,6 @@ var DEFAULT_CONFIG = {
|
|
|
136
135
|
};
|
|
137
136
|
var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
|
|
138
137
|
detector = null;
|
|
139
|
-
/**
|
|
140
|
-
* CB5 shm passthrough — process-local, long-lived reader cache for
|
|
141
|
-
* `analyze({ frameHandle })`. Opens each named shm segment once and reuses
|
|
142
|
-
* the mapping; lazily created on first LOCAL handle, unmapped in
|
|
143
|
-
* {@link onShutdown}. Never opened/closed per-call.
|
|
144
|
-
*/
|
|
145
|
-
frameHandleReaders = null;
|
|
146
138
|
cameras = /* @__PURE__ */ new Map();
|
|
147
139
|
deviceConfigCache = /* @__PURE__ */ new Map();
|
|
148
140
|
static DEVICE_CONFIG_TTL_MS = 6e4;
|
|
@@ -196,38 +188,16 @@ var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
|
|
|
196
188
|
* Per-device state keyed by the numeric deviceId (stringified internally
|
|
197
189
|
* so the pipeline-step sentinel shares the same Map).
|
|
198
190
|
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
191
|
+
* Pixels arrive inline (`frame`). The `frameHandle` input is DORMANT since
|
|
192
|
+
* the shm-ring removal (2026-07-16): the runner always ships inline gray
|
|
193
|
+
* pixels now. A handle can only arrive under version skew (an old runner
|
|
194
|
+
* against a new provider); with no shm passthrough there is no way to
|
|
195
|
+
* resolve its pixels, so it degrades to an empty result. The field stays
|
|
196
|
+
* defined so no cap-surface change is needed.
|
|
203
197
|
*/
|
|
204
198
|
async analyze({ deviceId, frame, frameHandle }) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return this.analyzeInternal(String(deviceId), resolved);
|
|
208
|
-
}
|
|
209
|
-
/** This node's cluster id (suffix-stripped), for local-vs-foreign gating. */
|
|
210
|
-
ownNodeId() {
|
|
211
|
-
const raw = this.ctx.kernel?.localNodeId ?? "hub";
|
|
212
|
-
return raw.includes("/") ? raw.split("/")[0] : raw;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* CB5 — resolve a shm `FrameHandle` to gray pixels zero-copy. Returns null
|
|
216
|
-
* for a FOREIGN handle (segment on another node — the runner only sends
|
|
217
|
-
* local handles), a recycled ring slot, or an unmappable segment.
|
|
218
|
-
*/
|
|
219
|
-
resolveFrameHandle(handle) {
|
|
220
|
-
if (handle.nodeId !== this.ownNodeId()) return null;
|
|
221
|
-
if (!this.frameHandleReaders) this.frameHandleReaders = new _camstack_shm_ring.FrameRingReaderCache(this.ctx.logger);
|
|
222
|
-
const decoded = this.frameHandleReaders.read(handle);
|
|
223
|
-
if (!decoded) return null;
|
|
224
|
-
return {
|
|
225
|
-
data: decoded.data,
|
|
226
|
-
width: decoded.width,
|
|
227
|
-
height: decoded.height,
|
|
228
|
-
format: decoded.format,
|
|
229
|
-
timestamp: decoded.timestamp
|
|
230
|
-
};
|
|
199
|
+
if (!frame) return this.emptyMotionResult(frameHandle);
|
|
200
|
+
return this.analyzeInternal(String(deviceId), frame);
|
|
231
201
|
}
|
|
232
202
|
/** Zeroed motion result for a missed `frameHandle` read (dropped frame). */
|
|
233
203
|
emptyMotionResult(handle) {
|
|
@@ -401,8 +371,6 @@ var MotionWasmAddon = class MotionWasmAddon extends require_dist.BaseAddon {
|
|
|
401
371
|
this.deviceConfigCache.clear();
|
|
402
372
|
for (const id of this.proxies.keys()) this.releaseProxy(id);
|
|
403
373
|
this.detector = null;
|
|
404
|
-
this.frameHandleReaders?.close();
|
|
405
|
-
this.frameHandleReaders = null;
|
|
406
374
|
}
|
|
407
375
|
deviceSettingsSchema() {
|
|
408
376
|
return this.schema({ sections: [{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { B as DeviceType, E as motionDetectionCapability, L as BaseAddon, U as hydrateSchema, x as evaluateZoneRules } from "../dist-
|
|
2
|
-
import { FrameRingReaderCache } from "@camstack/shm-ring";
|
|
1
|
+
import { B as DeviceType, E as motionDetectionCapability, L as BaseAddon, U as hydrateSchema, x as evaluateZoneRules } from "../dist-CL531uVA.mjs";
|
|
3
2
|
import { readFileSync } from "node:fs";
|
|
4
3
|
import { join } from "node:path";
|
|
5
4
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -132,13 +131,6 @@ var DEFAULT_CONFIG = {
|
|
|
132
131
|
};
|
|
133
132
|
var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
|
|
134
133
|
detector = null;
|
|
135
|
-
/**
|
|
136
|
-
* CB5 shm passthrough — process-local, long-lived reader cache for
|
|
137
|
-
* `analyze({ frameHandle })`. Opens each named shm segment once and reuses
|
|
138
|
-
* the mapping; lazily created on first LOCAL handle, unmapped in
|
|
139
|
-
* {@link onShutdown}. Never opened/closed per-call.
|
|
140
|
-
*/
|
|
141
|
-
frameHandleReaders = null;
|
|
142
134
|
cameras = /* @__PURE__ */ new Map();
|
|
143
135
|
deviceConfigCache = /* @__PURE__ */ new Map();
|
|
144
136
|
static DEVICE_CONFIG_TTL_MS = 6e4;
|
|
@@ -192,38 +184,16 @@ var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
|
|
|
192
184
|
* Per-device state keyed by the numeric deviceId (stringified internally
|
|
193
185
|
* so the pipeline-step sentinel shares the same Map).
|
|
194
186
|
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
187
|
+
* Pixels arrive inline (`frame`). The `frameHandle` input is DORMANT since
|
|
188
|
+
* the shm-ring removal (2026-07-16): the runner always ships inline gray
|
|
189
|
+
* pixels now. A handle can only arrive under version skew (an old runner
|
|
190
|
+
* against a new provider); with no shm passthrough there is no way to
|
|
191
|
+
* resolve its pixels, so it degrades to an empty result. The field stays
|
|
192
|
+
* defined so no cap-surface change is needed.
|
|
199
193
|
*/
|
|
200
194
|
async analyze({ deviceId, frame, frameHandle }) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return this.analyzeInternal(String(deviceId), resolved);
|
|
204
|
-
}
|
|
205
|
-
/** This node's cluster id (suffix-stripped), for local-vs-foreign gating. */
|
|
206
|
-
ownNodeId() {
|
|
207
|
-
const raw = this.ctx.kernel?.localNodeId ?? "hub";
|
|
208
|
-
return raw.includes("/") ? raw.split("/")[0] : raw;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* CB5 — resolve a shm `FrameHandle` to gray pixels zero-copy. Returns null
|
|
212
|
-
* for a FOREIGN handle (segment on another node — the runner only sends
|
|
213
|
-
* local handles), a recycled ring slot, or an unmappable segment.
|
|
214
|
-
*/
|
|
215
|
-
resolveFrameHandle(handle) {
|
|
216
|
-
if (handle.nodeId !== this.ownNodeId()) return null;
|
|
217
|
-
if (!this.frameHandleReaders) this.frameHandleReaders = new FrameRingReaderCache(this.ctx.logger);
|
|
218
|
-
const decoded = this.frameHandleReaders.read(handle);
|
|
219
|
-
if (!decoded) return null;
|
|
220
|
-
return {
|
|
221
|
-
data: decoded.data,
|
|
222
|
-
width: decoded.width,
|
|
223
|
-
height: decoded.height,
|
|
224
|
-
format: decoded.format,
|
|
225
|
-
timestamp: decoded.timestamp
|
|
226
|
-
};
|
|
195
|
+
if (!frame) return this.emptyMotionResult(frameHandle);
|
|
196
|
+
return this.analyzeInternal(String(deviceId), frame);
|
|
227
197
|
}
|
|
228
198
|
/** Zeroed motion result for a missed `frameHandle` read (dropped frame). */
|
|
229
199
|
emptyMotionResult(handle) {
|
|
@@ -397,8 +367,6 @@ var MotionWasmAddon = class MotionWasmAddon extends BaseAddon {
|
|
|
397
367
|
this.deviceConfigCache.clear();
|
|
398
368
|
for (const id of this.proxies.keys()) this.releaseProxy(id);
|
|
399
369
|
this.detector = null;
|
|
400
|
-
this.frameHandleReaders?.close();
|
|
401
|
-
this.frameHandleReaders = null;
|
|
402
370
|
}
|
|
403
371
|
deviceSettingsSchema() {
|
|
404
372
|
return this.schema({ sections: [{
|