@camstack/addon-pipeline 1.1.14 → 1.1.15
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/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-gvS-0cQA.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BnYGzPbK.mjs} +3 -3
- package/dist/stream-broker/{hostInit-CJvejWe1.mjs → hostInit-BUQQ0XCv.mjs} +3 -3
- package/dist/stream-broker/index.js +12 -2
- package/dist/stream-broker/index.mjs +12 -2
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +17 -9
- package/python/yamnet_audio.py +11 -1
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.1.
|
|
6
|
+
version: "1.1.12",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_stream_broker_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.1.
|
|
21
|
+
version: "1.1.13",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_stream_broker_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.1.
|
|
36
|
+
version: "1.1.13",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.1.
|
|
39
|
+
version: "1.1.13",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.1.
|
|
48
|
+
version: "1.1.12",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.1.
|
|
84
|
+
version: "1.1.13",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -21,6 +21,8 @@ let events = require("events");
|
|
|
21
21
|
let node_fs_promises = require("node:fs/promises");
|
|
22
22
|
let node_dgram = require("node:dgram");
|
|
23
23
|
let node_dns_promises = require("node:dns/promises");
|
|
24
|
+
let node_module = require("node:module");
|
|
25
|
+
let node_url = require("node:url");
|
|
24
26
|
let node_events = require("node:events");
|
|
25
27
|
//#region src/stream-broker/embed-file-handler.ts
|
|
26
28
|
/** Build a `(req, res)` handler serving the embed bundle at `root` with SPA fallback.
|
|
@@ -11280,11 +11282,19 @@ var H264Repacketizer = class {
|
|
|
11280
11282
|
var _werift;
|
|
11281
11283
|
async function loadWerift() {
|
|
11282
11284
|
if (_werift) return _werift;
|
|
11285
|
+
const importModule = (spec) => Function("m", "return import(m)")(spec);
|
|
11286
|
+
const fwDir = process.env["CAMSTACK_FRAMEWORK_DIR"];
|
|
11287
|
+
const resolveBase = fwDir ? (0, node_path.join)(fwDir, "node_modules", "_werift_anchor.js") : (0, node_path.join)(process.cwd(), "_werift_anchor.js");
|
|
11283
11288
|
try {
|
|
11284
|
-
_werift = await
|
|
11289
|
+
_werift = await importModule((0, node_url.pathToFileURL)((0, node_module.createRequire)(resolveBase).resolve("werift")).href);
|
|
11285
11290
|
return _werift;
|
|
11286
11291
|
} catch {
|
|
11287
|
-
|
|
11292
|
+
try {
|
|
11293
|
+
_werift = await importModule("werift");
|
|
11294
|
+
return _werift;
|
|
11295
|
+
} catch {
|
|
11296
|
+
throw new Error("The 'werift' package is required for WebRTC support but is not installed. Install it with: npm install werift");
|
|
11297
|
+
}
|
|
11288
11298
|
}
|
|
11289
11299
|
}
|
|
11290
11300
|
/** True for an IPv4 address inside the Tailscale CGNAT range 100.64.0.0/10. */
|
|
@@ -2,6 +2,7 @@ import { t as __require } from "../chunk-BdkLduGY.mjs";
|
|
|
2
2
|
import { B as BaseAddon, D as maskUrlCredentials, G as asJsonObject, H as DeviceFeature, I as streamBrokerCapability, Q as parseProfileBrokerId, R as webrtcSessionCapability, U as DeviceType, V as CAM_PROFILE_ORDER, W as EventCategory, X as makeSourceBrokerId, Y as makeProfileBrokerId, c as EncodeProfileSchema, ct as object, dt as union, f as RingBuffer, it as discriminatedUnion, lt as record, m as addonWidgetsSourceCapability, ot as literal, q as createEvent, rt as boolean, st as number, tt as _enum, ut as string, v as cameraStreamsCapability, z as errMsg } from "../dist-CBcVKDyT.mjs";
|
|
3
3
|
import { t as createFileDataPlaneHandler } from "../model-download-service-C-IHWnXx-3Mmeob3l.mjs";
|
|
4
4
|
import { t as DecodeRuntime } from "../codec-runtime-BsqlEjPi.mjs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
5
6
|
import * as fs from "node:fs";
|
|
6
7
|
import * as path$1 from "node:path";
|
|
7
8
|
import path, { join } from "node:path";
|
|
@@ -17,6 +18,7 @@ import { once } from "events";
|
|
|
17
18
|
import { readFile } from "node:fs/promises";
|
|
18
19
|
import { createSocket } from "node:dgram";
|
|
19
20
|
import { lookup } from "node:dns/promises";
|
|
21
|
+
import { pathToFileURL } from "node:url";
|
|
20
22
|
import { EventEmitter } from "node:events";
|
|
21
23
|
//#region src/stream-broker/embed-file-handler.ts
|
|
22
24
|
/** Build a `(req, res)` handler serving the embed bundle at `root` with SPA fallback.
|
|
@@ -11276,11 +11278,19 @@ var H264Repacketizer = class {
|
|
|
11276
11278
|
var _werift;
|
|
11277
11279
|
async function loadWerift() {
|
|
11278
11280
|
if (_werift) return _werift;
|
|
11281
|
+
const importModule = (spec) => Function("m", "return import(m)")(spec);
|
|
11282
|
+
const fwDir = process.env["CAMSTACK_FRAMEWORK_DIR"];
|
|
11283
|
+
const resolveBase = fwDir ? join(fwDir, "node_modules", "_werift_anchor.js") : join(process.cwd(), "_werift_anchor.js");
|
|
11279
11284
|
try {
|
|
11280
|
-
_werift = await
|
|
11285
|
+
_werift = await importModule(pathToFileURL(createRequire(resolveBase).resolve("werift")).href);
|
|
11281
11286
|
return _werift;
|
|
11282
11287
|
} catch {
|
|
11283
|
-
|
|
11288
|
+
try {
|
|
11289
|
+
_werift = await importModule("werift");
|
|
11290
|
+
return _werift;
|
|
11291
|
+
} catch {
|
|
11292
|
+
throw new Error("The 'werift' package is required for WebRTC support but is not installed. Install it with: npm install werift");
|
|
11293
|
+
}
|
|
11284
11294
|
}
|
|
11285
11295
|
}
|
|
11286
11296
|
/** True for an IPv4 address inside the Tailscale CGNAT range 100.64.0.0/10. */
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BnYGzPbK.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-pipeline",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "CamStack Pipeline bundle — runner, detection, motion, decoders, audio + stream broker. Multi-entry npm package shipping 7 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
"description": "Per-node detection scheduler — manages frame queues, semaphore, motion drain, and inference dispatch for cameras assigned by the orchestrator",
|
|
79
79
|
"entry": "./dist/pipeline-runner/index.js",
|
|
80
80
|
"execution": {
|
|
81
|
-
"placement": "any-node"
|
|
81
|
+
"placement": "any-node",
|
|
82
|
+
"heapProfile": "heavy"
|
|
82
83
|
},
|
|
83
84
|
"capabilities": [
|
|
84
85
|
{
|
|
@@ -109,7 +110,8 @@
|
|
|
109
110
|
}
|
|
110
111
|
],
|
|
111
112
|
"execution": {
|
|
112
|
-
"placement": "any-node"
|
|
113
|
+
"placement": "any-node",
|
|
114
|
+
"heapProfile": "heavy"
|
|
113
115
|
},
|
|
114
116
|
"protected": true,
|
|
115
117
|
"icon": "assets/icon.svg",
|
|
@@ -123,7 +125,8 @@
|
|
|
123
125
|
"description": "WASM-accelerated motion detection with blur, dilation, and connected component labeling",
|
|
124
126
|
"entry": "./dist/motion-wasm/index.js",
|
|
125
127
|
"execution": {
|
|
126
|
-
"placement": "any-node"
|
|
128
|
+
"placement": "any-node",
|
|
129
|
+
"heapProfile": "heavy"
|
|
127
130
|
},
|
|
128
131
|
"capabilities": [
|
|
129
132
|
{
|
|
@@ -149,7 +152,8 @@
|
|
|
149
152
|
"description": "Hardware-accelerated video decoder using FFmpeg native bindings",
|
|
150
153
|
"entry": "./dist/decoder-nodeav/index.js",
|
|
151
154
|
"execution": {
|
|
152
|
-
"placement": "any-node"
|
|
155
|
+
"placement": "any-node",
|
|
156
|
+
"heapProfile": "heavy"
|
|
153
157
|
},
|
|
154
158
|
"capabilities": [
|
|
155
159
|
{
|
|
@@ -169,7 +173,8 @@
|
|
|
169
173
|
"description": "Bidirectional audio codec I/O — decodes camera audio (AAC, Opus, PCMU/PCMA) into per-consumer PCM sessions and encodes intercom PCM back into camera-supported codecs",
|
|
170
174
|
"entry": "./dist/audio-codec-nodeav/index.js",
|
|
171
175
|
"execution": {
|
|
172
|
-
"placement": "any-node"
|
|
176
|
+
"placement": "any-node",
|
|
177
|
+
"heapProfile": "heavy"
|
|
173
178
|
},
|
|
174
179
|
"capabilities": [
|
|
175
180
|
{
|
|
@@ -189,7 +194,8 @@
|
|
|
189
194
|
"description": "Audio level metering (dB/RMS) with optional classification",
|
|
190
195
|
"entry": "./dist/audio-analyzer/index.js",
|
|
191
196
|
"execution": {
|
|
192
|
-
"placement": "any-node"
|
|
197
|
+
"placement": "any-node",
|
|
198
|
+
"heapProfile": "heavy"
|
|
193
199
|
},
|
|
194
200
|
"capabilities": [
|
|
195
201
|
{
|
|
@@ -210,7 +216,8 @@
|
|
|
210
216
|
"version": "0.1.0",
|
|
211
217
|
"entry": "./dist/stream-broker/index.js",
|
|
212
218
|
"execution": {
|
|
213
|
-
"placement": "hub-only"
|
|
219
|
+
"placement": "hub-only",
|
|
220
|
+
"heapProfile": "heavy"
|
|
214
221
|
},
|
|
215
222
|
"capabilities": [
|
|
216
223
|
{
|
|
@@ -238,7 +245,8 @@
|
|
|
238
245
|
"description": "Continuous, local, filesystem-native camera recording — passthrough ffmpeg segmenter per profile with a RAM index and HLS variant/master playlists",
|
|
239
246
|
"entry": "./dist/recorder/index.js",
|
|
240
247
|
"execution": {
|
|
241
|
-
"placement": "any-node"
|
|
248
|
+
"placement": "any-node",
|
|
249
|
+
"heapProfile": "heavy"
|
|
242
250
|
},
|
|
243
251
|
"capabilities": [
|
|
244
252
|
{
|
package/python/yamnet_audio.py
CHANGED
|
@@ -51,6 +51,11 @@ def main() -> None:
|
|
|
51
51
|
ap = argparse.ArgumentParser()
|
|
52
52
|
ap.add_argument("--model", required=True)
|
|
53
53
|
ap.add_argument("--labels", default="")
|
|
54
|
+
# YAMNet is a tiny model — ONNX Runtime otherwise defaults intra_op threads to the CPU core
|
|
55
|
+
# count, so every short inference spins up N threads whose coordination overhead dwarfs the
|
|
56
|
+
# actual compute (observed: ~1000% CPU across a handful of always-on audio streams). Cap to a
|
|
57
|
+
# single op thread (Frigate runs it the same way); overridable via --threads for large hosts.
|
|
58
|
+
ap.add_argument("--threads", type=int, default=1)
|
|
54
59
|
args = ap.parse_args()
|
|
55
60
|
|
|
56
61
|
labels: list[str] = []
|
|
@@ -62,7 +67,12 @@ def main() -> None:
|
|
|
62
67
|
print(f"yamnet_audio: failed to read labels: {exc}", file=sys.stderr)
|
|
63
68
|
labels = []
|
|
64
69
|
|
|
65
|
-
|
|
70
|
+
sess_options = ort.SessionOptions()
|
|
71
|
+
sess_options.intra_op_num_threads = max(1, args.threads)
|
|
72
|
+
sess_options.inter_op_num_threads = 1
|
|
73
|
+
session = ort.InferenceSession(
|
|
74
|
+
args.model, sess_options=sess_options, providers=["CPUExecutionProvider"]
|
|
75
|
+
)
|
|
66
76
|
input_name = session.get_inputs()[0].name
|
|
67
77
|
output_name = session.get_outputs()[0].name
|
|
68
78
|
|