@camstack/addon-pipeline 1.1.27 → 1.1.29
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 +7 -6
- package/dist/audio-analyzer/index.mjs +7 -6
- package/dist/audio-codec-ffmpeg/index.js +1 -5
- package/dist/audio-codec-ffmpeg/index.mjs +1 -5
- package/dist/decoder-ffmpeg/index.js +138 -356
- package/dist/decoder-ffmpeg/index.mjs +118 -336
- package/dist/decoder-nodeav/index.js +17 -10
- package/dist/decoder-nodeav/index.mjs +17 -10
- package/dist/detection-pipeline/index.js +341 -379
- package/dist/detection-pipeline/index.mjs +341 -379
- package/dist/{dist-DAIlCdAx.js → dist-Cwc0TUQr.js} +378 -76
- package/dist/{dist-CgEP_0OL.mjs → dist-DjuGmyG9.mjs} +379 -65
- package/dist/ffmpeg-args-C5GPp8Cw.mjs +323 -0
- package/dist/ffmpeg-args-D6h1edXK.js +418 -0
- package/dist/frame-dropper-AjheBGMG.mjs +22 -0
- package/dist/frame-dropper-DKLM6pMz.js +27 -0
- package/dist/{frame-handle-plane-Dq20KtKL.mjs → frame-handle-plane-Bkxz-TTD.mjs} +13 -5
- package/dist/{frame-handle-plane-DtTRX_0n.js → frame-handle-plane-DQNCTrpC.js} +13 -5
- package/dist/{frame-ring-sink-BbzrqTWj.js → frame-ring-sink-8LLV-cvH.js} +128 -23
- package/dist/{frame-ring-sink-B_NvPTJZ.mjs → frame-ring-sink-ClEWjiRU.mjs} +117 -24
- package/dist/motion-wasm/index.js +55 -3
- package/dist/motion-wasm/index.mjs +55 -3
- package/dist/node-topology-platform-BkR_k6WT.mjs +15 -0
- package/dist/node-topology-platform-CFZ7F4xW.js +20 -0
- package/dist/pipeline-runner/index.js +50 -16
- package/dist/pipeline-runner/index.mjs +50 -16
- package/dist/recorder/index.js +36 -40
- package/dist/recorder/index.mjs +36 -40
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-5tQlh9h4.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D567z31g.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DhY3MZ2C.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-BJK0-svt.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DtoYGpTp.mjs} +1 -1
- package/dist/stream-broker/{hostInit-DyLqyJaS.mjs → hostInit-B_b3PIZB.mjs} +3 -3
- package/dist/stream-broker/index.js +198 -115
- package/dist/stream-broker/index.mjs +189 -106
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-BDLNwJ_F.js → MaskShapeCanvas-DI4BY7W2-x-DZOuQL.js} +1 -1
- package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-CoLjNiUN.js → MotionZonesSettings-NcxxQN8r-DTeuDGCU.js} +1 -1
- package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-DJE3OU-q.js → PrivacyMaskSettings-APgPLF7p-CirtxO3e.js} +1 -1
- package/embed-dist/assets/index-C5UpuPr8.css +2 -0
- package/embed-dist/assets/{index-C-pL8ETk.js → index-CpUy8OIE.js} +10 -10
- package/embed-dist/index.html +2 -2
- package/package.json +1 -1
- package/python/inference_pool.py +93 -102
- package/python/test_inference_pool_device_selection.py +43 -38
- package/dist/frame-dropper-7RTo_YyG.js +0 -68
- package/dist/frame-dropper-CwkBTPGV.mjs +0 -51
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CkOPfV8r.mjs +0 -26
- package/embed-dist/assets/index-DrJ0ee3f.css +0 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { B as errMsg, V as BaseAddon, d as HWACCEL_OPTIONS,
|
|
2
|
-
import {
|
|
1
|
+
import { B as errMsg, V as BaseAddon, d as HWACCEL_OPTIONS, s as DEFAULT_DECODER_HWACCEL_CONFIG, x as decoderCapability } from "../dist-DjuGmyG9.mjs";
|
|
2
|
+
import { a as resolveDecoderBackend, i as NotifyingRingBuffer, n as RING_BUDGET_MB, r as makeSegmentName, t as DecoderFrameRingSink } from "../frame-ring-sink-ClEWjiRU.mjs";
|
|
3
|
+
import { f as rankDecodeHwAccels } from "../ffmpeg-args-C5GPp8Cw.mjs";
|
|
3
4
|
import { FrameRingReaderCache } from "@camstack/shm-ring";
|
|
4
5
|
import { randomUUID } from "node:crypto";
|
|
5
6
|
//#region src/decoder-nodeav/scaler-geometry.ts
|
|
@@ -915,7 +916,8 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
915
916
|
label: "Preferred backend",
|
|
916
917
|
options: [...HWACCEL_OPTIONS],
|
|
917
918
|
default: "auto",
|
|
918
|
-
immediate: true
|
|
919
|
+
immediate: true,
|
|
920
|
+
perNode: true
|
|
919
921
|
}), this.field({
|
|
920
922
|
type: "text",
|
|
921
923
|
key: "probedBestHwaccel",
|
|
@@ -923,6 +925,7 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
923
925
|
description: "Auto-detected best decoder backend on this host. Click the refresh icon to re-run the probe.",
|
|
924
926
|
readonlyField: true,
|
|
925
927
|
default: "",
|
|
928
|
+
perNode: true,
|
|
926
929
|
actions: [{
|
|
927
930
|
action: "reprobe-hwaccel",
|
|
928
931
|
icon: "refresh-cw",
|
|
@@ -932,7 +935,7 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
932
935
|
}] });
|
|
933
936
|
}
|
|
934
937
|
async onInitialize() {
|
|
935
|
-
const backend = await resolveDecoderBackend(this.ctx.
|
|
938
|
+
const backend = await resolveDecoderBackend(this.ctx.api, this.resolveLocalNodeId(), this.ctx.logger);
|
|
936
939
|
if (backend !== "nodeav") {
|
|
937
940
|
this.ctx.logger.info("node-av decoder: this node selects a different decoder backend — standing down (no decoder provider registered)", { meta: { selectedBackend: backend } });
|
|
938
941
|
return [];
|
|
@@ -966,13 +969,13 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
966
969
|
const resolver = this.ctx.kernel.hwaccel;
|
|
967
970
|
if (!resolver) {
|
|
968
971
|
this.ctx.logger.warn("reprobeHwaccel: no kernel hwaccel resolver — returning none");
|
|
969
|
-
await this.
|
|
972
|
+
await this.updateGlobalSettings({ probedBestHwaccel: "none" });
|
|
970
973
|
return { backend: "none" };
|
|
971
974
|
}
|
|
972
975
|
try {
|
|
973
976
|
const res = await resolver.resolve();
|
|
974
|
-
const backend = res.preferred[0] ?? "none";
|
|
975
|
-
await this.
|
|
977
|
+
const backend = rankDecodeHwAccels(res.preferred, [])[0] ?? "none";
|
|
978
|
+
await this.updateGlobalSettings({ probedBestHwaccel: backend });
|
|
976
979
|
this.ctx.logger.info("reprobeHwaccel: wrote probedBestHwaccel", { meta: {
|
|
977
980
|
backend,
|
|
978
981
|
rationale: res.rationale,
|
|
@@ -981,7 +984,7 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
981
984
|
return { backend };
|
|
982
985
|
} catch (err) {
|
|
983
986
|
this.ctx.logger.warn("reprobeHwaccel failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
984
|
-
await this.
|
|
987
|
+
await this.updateGlobalSettings({ probedBestHwaccel: "none" });
|
|
985
988
|
return { backend: "none" };
|
|
986
989
|
}
|
|
987
990
|
}
|
|
@@ -1048,7 +1051,7 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
1048
1051
|
* ring buffer drained by `pullFrames`.
|
|
1049
1052
|
*/
|
|
1050
1053
|
wireCallbackSink(sessionId, session) {
|
|
1051
|
-
const ringBuffer = new
|
|
1054
|
+
const ringBuffer = new NotifyingRingBuffer(FRAME_BUFFER_CAPACITY);
|
|
1052
1055
|
this.frameBuffers.set(sessionId, ringBuffer);
|
|
1053
1056
|
return session.onFrame((frame) => {
|
|
1054
1057
|
const { format } = frame;
|
|
@@ -1071,7 +1074,7 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
1071
1074
|
* — the broker opens the named segment and reads the pixels zero-copy.
|
|
1072
1075
|
*/
|
|
1073
1076
|
wireShmSink(sessionId, session) {
|
|
1074
|
-
const handleRing = new
|
|
1077
|
+
const handleRing = new NotifyingRingBuffer(FRAME_BUFFER_CAPACITY);
|
|
1075
1078
|
this.handleBuffers.set(sessionId, handleRing);
|
|
1076
1079
|
return session.onFrameHandle((frame) => {
|
|
1077
1080
|
handleRing.push(frame.handle);
|
|
@@ -1083,6 +1086,8 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
1083
1086
|
if (!session) throw new Error(`decoder-nodeav: unknown sessionId ${sessionId}`);
|
|
1084
1087
|
const unsub = this.unsubscribers.get(sessionId);
|
|
1085
1088
|
if (unsub) unsub();
|
|
1089
|
+
this.frameBuffers.get(sessionId)?.cancel();
|
|
1090
|
+
this.handleBuffers.get(sessionId)?.cancel();
|
|
1086
1091
|
await session.destroy();
|
|
1087
1092
|
this.sessions.delete(sessionId);
|
|
1088
1093
|
this.frameBuffers.delete(sessionId);
|
|
@@ -1119,12 +1124,14 @@ var DecoderNodeAvAddon = class extends BaseAddon {
|
|
|
1119
1124
|
if (!this.sessions.has(input.sessionId)) throw new Error(`decoder-nodeav: unknown sessionId ${input.sessionId}`);
|
|
1120
1125
|
const ringBuffer = this.frameBuffers.get(input.sessionId);
|
|
1121
1126
|
if (!ringBuffer) return [];
|
|
1127
|
+
if (ringBuffer.size === 0 && input.waitMs) await ringBuffer.waitForItem(input.waitMs);
|
|
1122
1128
|
return ringBuffer.drain(input.maxCount);
|
|
1123
1129
|
}
|
|
1124
1130
|
async pullHandles(input) {
|
|
1125
1131
|
if (!this.sessions.has(input.sessionId)) throw new Error(`decoder-nodeav: unknown sessionId ${input.sessionId}`);
|
|
1126
1132
|
const handleRing = this.handleBuffers.get(input.sessionId);
|
|
1127
1133
|
if (!handleRing) return [];
|
|
1134
|
+
if (handleRing.size === 0 && input.waitMs) await handleRing.waitForItem(input.waitMs);
|
|
1128
1135
|
return handleRing.drain(input.maxCount);
|
|
1129
1136
|
}
|
|
1130
1137
|
async updateConfig(input) {
|