@camstack/addon-pipeline 1.2.228 → 1.2.231
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/{default-detection-model-D0Em2AXV.js → default-detection-model-C7fsHtHQ.js} +1 -1
- package/dist/{default-detection-model-C4C723aL.mjs → default-detection-model-DC4yVaFM.mjs} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-Dcp-eVbN.mjs → dist-DTPYOq7J.mjs} +274 -9
- package/dist/{dist-Dwhv3eOj.js → dist-p5lZW8pr.js} +279 -8
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CSDLSs7t.js → node-CGVUk5S9.js} +1 -1
- package/dist/{node-ClxCG7kX.mjs → node-Cz92fVGW.mjs} +1 -1
- package/dist/pipeline-runner/index.js +4 -4
- package/dist/pipeline-runner/index.mjs +4 -4
- package/dist/{process-memory-CJ9kKdO6.mjs → process-memory-BwijtYhM.mjs} +1 -1
- package/dist/{process-memory-DYCrYZZl.js → process-memory-COypUeEc.js} +1 -1
- package/dist/recorder/index.js +3 -3
- package/dist/recorder/index.mjs +3 -3
- package/dist/{restream-intent-B1Difcnq.js → restream-intent-C4adO0P8.js} +5 -0
- package/dist/{restream-intent-DWe2kInY.mjs → restream-intent-MeJhGCK9.mjs} +5 -0
- package/dist/{segment-demux-js-CelIP7H_.js → segment-demux-js-B-yzHYVc.js} +1 -1
- package/dist/{segment-demux-js-BWZQJ1AS.mjs → segment-demux-js-CyaNDtrw.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BOpWY0lf.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B9KO-igY.mjs} +3 -3
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bc-sSkWV.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-mnvO611B.mjs} +1 -1
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B84T0KI-.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JoG-yDpV.mjs} +1 -1
- 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-D79Uznvf.mjs → hostInit-CDwsQyIR.mjs} +3 -3
- package/dist/stream-broker/index.js +1380 -90
- package/dist/stream-broker/index.mjs +1380 -90
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/python/inference_pool.py +39 -9
- package/python/test_inference_pool_ov_requests.py +79 -0
- package/python/__pycache__/inference_pool.cpython-312.pyc +0 -0
- package/python/__pycache__/inference_pool.cpython-313.pyc +0 -0
- package/python/__pycache__/inference_pool.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_backpressure.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_backpressure.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_backpressure.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_coreml_cache.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_coreml_cache.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_coreml_cache.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_deadline.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_device_selection.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_device_selection.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_device_selection.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_layout.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_layout.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_memstats.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_memstats.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_memstats.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_ov_ppp.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_ov_ppp.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_ov_ppp.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_preprocess.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_preprocess.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_reconfigure.cpython-314.pyc +0 -0
- package/python/__pycache__/test_inference_pool_static_batch.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/__pycache__/test_inference_pool_static_batch.cpython-312.pyc +0 -0
- package/python/__pycache__/test_inference_pool_static_batch.cpython-314.pyc +0 -0
- package/python/__pycache__/yamnet_audio.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/__init__.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/__init__.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/__init__.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/_safety.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/arcface.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/arcface.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/arcface.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/clip.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/clip.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/clip.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/ctc.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/ctc.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/ctc.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/plate_slots.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/plate_slots.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/rfdetr.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/rfdetr.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/saliency.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/saliency.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/saliency.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/scrfd.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/scrfd.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/scrfd.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/softmax.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/softmax.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/softmax.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/ssd.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/ssd.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/ssd.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_clip.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_clip.cpython-313-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_ctc.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_ctc.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/test_ctc.cpython-313-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_ctc.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/test_ctc.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_plate_slots.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_rfdetr.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_rfdetr.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_saliency.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_saliency.cpython-313-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_saliency.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_softmax.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_softmax.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_yolo_nms.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/test_yolo_nms.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/test_yolo_nms.cpython-39.pyc +0 -0
- package/python/postprocessors/__pycache__/test_yolonas.cpython-312-pytest-9.1.1.pyc +0 -0
- package/python/postprocessors/__pycache__/yamnet.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/yamnet.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/yamnet.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo.cpython-39.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo_seg.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo_seg.cpython-313.pyc +0 -0
- package/python/postprocessors/__pycache__/yolo_seg.cpython-314.pyc +0 -0
- package/python/postprocessors/__pycache__/yolonas.cpython-312.pyc +0 -0
- package/python/postprocessors/__pycache__/yolonas.cpython-314.pyc +0 -0
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_process_memory = require("../process-memory-
|
|
6
|
+
const require_dist = require("../dist-p5lZW8pr.js");
|
|
7
|
+
const require_process_memory = require("../process-memory-COypUeEc.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_path = require("node:path");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { $t as hydrateSchema, At as resolvePoolMemoryPolicy, Kt as BaseAddon, N as audioAnalysisCapability, P as audioAnalyzerCapability, Qt as expandAudioChunkToF32le, Xt as audioChunkBytesPerSample, bn as EventCategory, ct as mapAudioLabelToMacro, n as AUDIO_BACKEND_CHOICES, rn as nodePin, s as DEFAULT_AUDIO_ANALYZER_CONFIG, w as PoolMemoryWatchdog, y as HF_BASE_URL, zt as errMsg } from "../dist-DTPYOq7J.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BwijtYhM.mjs";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { downloadFile } from "@camstack/system/addon-utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as audioKindId, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS, rt as hfModelUrl } from "./dist-
|
|
1
|
+
import { F as audioKindId, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS, rt as hfModelUrl } from "./dist-DTPYOq7J.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/detection-pipeline/pipeline/landmark-precision-gate.ts
|
|
4
4
|
/**
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
6
|
+
const require_dist = require("../dist-p5lZW8pr.js");
|
|
7
|
+
const require_node = require("../node-CGVUk5S9.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-C7fsHtHQ.js");
|
|
9
9
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-COypUeEc.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { o as readProcessCost } from "../node-
|
|
4
|
-
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-
|
|
2
|
+
import { $t as hydrateSchema, At as resolvePoolMemoryPolicy, Dt as resolveClusterStepModelId, H as defaultDeviceFor$1, Kt as BaseAddon, Lt as supportedRuntimes$1, Mt as runtimeDevices$1, Q as evaluateZoneRules, X as enumerateInferenceDevices, Zt as createEvent, _t as pickClusterStepModels, bn as EventCategory, c as DEFAULT_CLUSTER_STEP_MODELS, hn as object, ht as overlayClusterStepSettings, in as parseJsonUnknown, it as inferModelProvider, j as YAMNET_TO_MACRO, l as DEFAULT_CLUSTER_STEP_SETTINGS, ln as array, m as DEVICE_BACKEND_TO_FORMAT, ot as loadContributionCapability, q as detectionPipelineCapability, rn as nodePin, sn as sleep, t as APPLE_SA_TO_MACRO, vn as string, vt as pickClusterStepSettings, w as PoolMemoryWatchdog, xt as pipelineExecutorCapability, yn as union, zt as errMsg } from "../dist-DTPYOq7J.mjs";
|
|
3
|
+
import { o as readProcessCost } from "../node-Cz92fVGW.mjs";
|
|
4
|
+
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-DC4yVaFM.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BwijtYhM.mjs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -616,6 +616,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
616
616
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
617
617
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
618
618
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
619
|
+
/**
|
|
620
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
621
|
+
*
|
|
622
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
623
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
624
|
+
* destinations would be told three times. And a run where two of three
|
|
625
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
626
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
627
|
+
* carried here and the message says both.
|
|
628
|
+
*
|
|
629
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
630
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
631
|
+
*/
|
|
632
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
619
633
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
620
634
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
621
635
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5346,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5346
5360
|
var ZodFirstPartyTypeKind;
|
|
5347
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5348
5362
|
//#endregion
|
|
5349
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5350
5364
|
/**
|
|
5351
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5352
5366
|
* window to float samples (D455).
|
|
@@ -8280,6 +8294,82 @@ var EncodeProfileSchema = object({
|
|
|
8280
8294
|
outputArgs: array(string()).optional()
|
|
8281
8295
|
});
|
|
8282
8296
|
/**
|
|
8297
|
+
* THE target rule: which of two sizes serves a consumer better.
|
|
8298
|
+
*
|
|
8299
|
+
* "Prefer at or above the target so the consumer downscales instead of
|
|
8300
|
+
* upscaling; among those the SMALLEST, because the extra pixels are thrown
|
|
8301
|
+
* away and the decode is not; among the rest the LARGEST, because it is the
|
|
8302
|
+
* closest we can get." One sentence, and until now it was written twice — once
|
|
8303
|
+
* here in lines, once in `stream-selection.ts` in pixels, for the same two
|
|
8304
|
+
* exporters. The two agreed, which is luck, not a property.
|
|
8305
|
+
*
|
|
8306
|
+
* The `size` is whatever measure the caller ranks by: the cap ranks by LINES
|
|
8307
|
+
* (a consumer's requirement is stated in p), the RTSP picker by PIXELS (it
|
|
8308
|
+
* compares entries of possibly different aspect). The rule is the same either
|
|
8309
|
+
* way and the measure is the caller's business.
|
|
8310
|
+
*
|
|
8311
|
+
* Returns a sort delta: negative when `a` should come first.
|
|
8312
|
+
*/
|
|
8313
|
+
function compareToTarget(a, b, target) {
|
|
8314
|
+
const aReaches = a >= target;
|
|
8315
|
+
if (aReaches !== b >= target) return aReaches ? -1 : 1;
|
|
8316
|
+
return aReaches ? a - b : b - a;
|
|
8317
|
+
}
|
|
8318
|
+
/** `h265` and `hevc` are one codec spelled two ways, and a camera publishes
|
|
8319
|
+
* whichever its vendor felt like. */
|
|
8320
|
+
function canonicalCodec(value) {
|
|
8321
|
+
const v = value.toLowerCase().replace(/[.\s-]/g, "");
|
|
8322
|
+
if (v === "hevc" || v === "hvc1" || v === "hev1") return "h265";
|
|
8323
|
+
if (v === "avc" || v === "avc1") return "h264";
|
|
8324
|
+
return v;
|
|
8325
|
+
}
|
|
8326
|
+
function codecIsAccepted(codec, accept) {
|
|
8327
|
+
if (accept.length === 0) return true;
|
|
8328
|
+
if (codec === void 0) return false;
|
|
8329
|
+
const c = canonicalCodec(codec);
|
|
8330
|
+
return accept.some((a) => canonicalCodec(a) === c);
|
|
8331
|
+
}
|
|
8332
|
+
function providerRank(camStreamId, preferred) {
|
|
8333
|
+
for (let i = 0; i < preferred.length; i += 1) if (camStreamId.startsWith(preferred[i])) return i;
|
|
8334
|
+
return preferred.length;
|
|
8335
|
+
}
|
|
8336
|
+
/**
|
|
8337
|
+
* Order the candidates and return the winner, or `null` when none qualifies.
|
|
8338
|
+
*
|
|
8339
|
+
* The order, and every term is there for a measured reason:
|
|
8340
|
+
*
|
|
8341
|
+
* 1. **A stream we can take AS IS beats one we must re-encode.** A transcode
|
|
8342
|
+
* is a decode plus an encode for as long as the session lasts, and on this
|
|
8343
|
+
* hub a concurrent HEVC decode is what exhausted the VAAPI device.
|
|
8344
|
+
* 2. **Provider preference**, unchanged — a native dial beats a relayed one.
|
|
8345
|
+
* 3. **The target**, when the consumer named one: the smallest stream that
|
|
8346
|
+
* reaches it, else the tallest that does not. Absent, the caller's
|
|
8347
|
+
* `resolutionPreference` decides, exactly as before.
|
|
8348
|
+
*/
|
|
8349
|
+
function rankStreams(candidates, ranking) {
|
|
8350
|
+
const usable = candidates.filter((c) => ranking.allowTranscode || codecIsAccepted(c.codec, ranking.acceptCodecs));
|
|
8351
|
+
if (usable.length === 0) return null;
|
|
8352
|
+
const target = ranking.targetHeight;
|
|
8353
|
+
const scored = usable.map((candidate) => ({
|
|
8354
|
+
candidate,
|
|
8355
|
+
transcodes: !codecIsAccepted(candidate.codec, ranking.acceptCodecs),
|
|
8356
|
+
provider: providerRank(candidate.camStreamId, ranking.preferredProviders),
|
|
8357
|
+
height: candidate.height ?? 0
|
|
8358
|
+
}));
|
|
8359
|
+
scored.sort((a, b) => {
|
|
8360
|
+
if (a.transcodes !== b.transcodes) return a.transcodes ? 1 : -1;
|
|
8361
|
+
if (a.provider !== b.provider) return a.provider - b.provider;
|
|
8362
|
+
if (target !== void 0) return compareToTarget(a.height, b.height, target);
|
|
8363
|
+
return ranking.resolutionPreference === "highest" ? b.height - a.height : a.height - b.height;
|
|
8364
|
+
});
|
|
8365
|
+
const winner = scored[0];
|
|
8366
|
+
if (winner === void 0) return null;
|
|
8367
|
+
return {
|
|
8368
|
+
candidate: winner.candidate,
|
|
8369
|
+
transcodes: winner.transcodes
|
|
8370
|
+
};
|
|
8371
|
+
}
|
|
8372
|
+
/**
|
|
8283
8373
|
* The shape every live egress starts from: H.264 Baseline 3.1 at 720p25.
|
|
8284
8374
|
* Baseline because it is the one profile every consumer in this repo decodes
|
|
8285
8375
|
* (Echo, iOS, an old browser); 3.1 because that is what the SDPs advertise.
|
|
@@ -13290,6 +13380,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
13290
13380
|
auth: "admin"
|
|
13291
13381
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
13292
13382
|
DeviceType.Camera;
|
|
13383
|
+
/**
|
|
13384
|
+
* The signals a device can emit to WAKE its own stream.
|
|
13385
|
+
*
|
|
13386
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
13387
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
13388
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
13389
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
13390
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
13391
|
+
* itself, with no stream running.
|
|
13392
|
+
*
|
|
13393
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
13394
|
+
*
|
|
13395
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
13396
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
13397
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
13398
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
13399
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
13400
|
+
*
|
|
13401
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
13402
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
13403
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
13404
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
13405
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
13406
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
13407
|
+
* camera. Two questions, two authorities.
|
|
13408
|
+
*
|
|
13409
|
+
* ## Availability is not permission
|
|
13410
|
+
*
|
|
13411
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
13412
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
13413
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
13414
|
+
* provider declaring a signal is not a provider enabling it.
|
|
13415
|
+
*/
|
|
13416
|
+
/** One signal a device can emit. */
|
|
13417
|
+
var StreamSignalSchema = object({
|
|
13418
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
13419
|
+
code: string().min(1),
|
|
13420
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
13421
|
+
label: string().min(1),
|
|
13422
|
+
/**
|
|
13423
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
13424
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
13425
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
13426
|
+
* both of its own.
|
|
13427
|
+
*/
|
|
13428
|
+
recommended: boolean()
|
|
13429
|
+
});
|
|
13430
|
+
object({
|
|
13431
|
+
signals: array(StreamSignalSchema),
|
|
13432
|
+
lastFetchedAt: number()
|
|
13433
|
+
});
|
|
13434
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
13293
13435
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
13294
13436
|
var StreamFormatSchema = _enum([
|
|
13295
13437
|
"webrtc",
|
|
@@ -13691,6 +13833,46 @@ var streamBrokerCapability = {
|
|
|
13691
13833
|
mode: "singleton",
|
|
13692
13834
|
exposesDeviceSettings: true,
|
|
13693
13835
|
methods: {
|
|
13836
|
+
/**
|
|
13837
|
+
* A device reporting that one of ITS OWN signals just fired.
|
|
13838
|
+
*
|
|
13839
|
+
* The provider calls this; nothing polls. The broker then decides whether
|
|
13840
|
+
* to wake the source, and the decision has two terms that must BOTH hold:
|
|
13841
|
+
*
|
|
13842
|
+
* - the signal is ENABLED for this camera (the operator's per-camera
|
|
13843
|
+
* choice — a camera may declare a signal the operator does not want
|
|
13844
|
+
* waking anything), and
|
|
13845
|
+
* - a consumer is actually attached and waiting on the prestream. Waking
|
|
13846
|
+
* a camera nobody is watching is the one thing a battery camera must
|
|
13847
|
+
* never do, and a signal arriving with no consumer is exactly that.
|
|
13848
|
+
*
|
|
13849
|
+
* Reported, never inferred: a signal that fires while the stream is
|
|
13850
|
+
* already up refreshes the hold instead of starting a second one, which is
|
|
13851
|
+
* what makes continuous motion keep a camera awake without stacking
|
|
13852
|
+
* timers.
|
|
13853
|
+
*
|
|
13854
|
+
* `code` is the provider's own, from `streamSignals.listSignals`. An
|
|
13855
|
+
* unknown code is REFUSED rather than treated as a wildcard wake — a
|
|
13856
|
+
* provider and an operator disagreeing about a name must not become a
|
|
13857
|
+
* camera that wakes for everything.
|
|
13858
|
+
*/
|
|
13859
|
+
reportStreamSignal: method(object({
|
|
13860
|
+
deviceId: number().int().nonnegative(),
|
|
13861
|
+
/** The provider's signal code. */
|
|
13862
|
+
code: string().min(1),
|
|
13863
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
13864
|
+
at: number().optional()
|
|
13865
|
+
}), object({
|
|
13866
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
13867
|
+
accepted: boolean(),
|
|
13868
|
+
reason: _enum([
|
|
13869
|
+
"woke",
|
|
13870
|
+
"hold-extended",
|
|
13871
|
+
"not-enabled",
|
|
13872
|
+
"no-consumer",
|
|
13873
|
+
"unknown-code"
|
|
13874
|
+
])
|
|
13875
|
+
}), { kind: "mutation" }),
|
|
13694
13876
|
publishCameraStream: method(object({
|
|
13695
13877
|
deviceId: number().int().nonnegative(),
|
|
13696
13878
|
camStreamId: string().min(1),
|
|
@@ -14168,6 +14350,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
14168
14350
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
14169
14351
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
14170
14352
|
minHeight: number().int().positive().optional(),
|
|
14353
|
+
/**
|
|
14354
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
14355
|
+
*
|
|
14356
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
14357
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
14358
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
14359
|
+
* one caller implementing it privately is how a second scoring authority
|
|
14360
|
+
* gets born.
|
|
14361
|
+
*/
|
|
14362
|
+
maxHeight: number().int().positive().optional(),
|
|
14171
14363
|
/** Minimum horizontal resolution. */
|
|
14172
14364
|
minWidth: number().int().positive().optional(),
|
|
14173
14365
|
/**
|
|
@@ -14184,7 +14376,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
14184
14376
|
* transcoded" guard: if the device is already serving the consumer's
|
|
14185
14377
|
* codec end-to-end, there's nothing to optimise.
|
|
14186
14378
|
*/
|
|
14187
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
14379
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
14380
|
+
/**
|
|
14381
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
14382
|
+
* understanding that it will be transcoded.
|
|
14383
|
+
*
|
|
14384
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
14385
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
14386
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
14387
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
14388
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
14389
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
14390
|
+
*
|
|
14391
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
14392
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
14393
|
+
*/
|
|
14394
|
+
allowTranscode: boolean().optional()
|
|
14188
14395
|
}).readonly();
|
|
14189
14396
|
var PickStreamPreferencesSchema = object({
|
|
14190
14397
|
/**
|
|
@@ -14198,12 +14405,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
14198
14405
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
14199
14406
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
14200
14407
|
*/
|
|
14201
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
14408
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
14409
|
+
/**
|
|
14410
|
+
* The height the consumer actually wants to DELIVER.
|
|
14411
|
+
*
|
|
14412
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
14413
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
14414
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
14415
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
14416
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
14417
|
+
*
|
|
14418
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
14419
|
+
*/
|
|
14420
|
+
targetHeight: number().int().positive().optional()
|
|
14202
14421
|
}).readonly();
|
|
14203
14422
|
var PickedCamStreamSchema = object({
|
|
14204
14423
|
camStreamId: string(),
|
|
14205
14424
|
codec: string().optional(),
|
|
14206
14425
|
resolution: CamStreamResolutionSchema.optional(),
|
|
14426
|
+
/**
|
|
14427
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
14428
|
+
*
|
|
14429
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
14430
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
14431
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
14432
|
+
*/
|
|
14433
|
+
transcodes: boolean(),
|
|
14207
14434
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
14208
14435
|
reason: string()
|
|
14209
14436
|
});
|
|
@@ -18944,6 +19171,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18944
19171
|
"device-enabled",
|
|
18945
19172
|
"device-battery-low",
|
|
18946
19173
|
"device-battery-normal",
|
|
19174
|
+
"device-consumable-low",
|
|
19175
|
+
"device-consumable-normal",
|
|
18947
19176
|
"stream-online",
|
|
18948
19177
|
"stream-offline",
|
|
18949
19178
|
"node-online",
|
|
@@ -18962,6 +19191,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
18962
19191
|
"addon-updated",
|
|
18963
19192
|
"server-updated",
|
|
18964
19193
|
"export-completed",
|
|
19194
|
+
"backup-completed",
|
|
18965
19195
|
"camera-online",
|
|
18966
19196
|
"camera-offline",
|
|
18967
19197
|
"camera-disabled",
|
|
@@ -26681,10 +26911,28 @@ var webrtcSessionCapability = {
|
|
|
26681
26911
|
getSessionState: method(object({
|
|
26682
26912
|
deviceId: number().int().nonnegative(),
|
|
26683
26913
|
sessionId: string()
|
|
26684
|
-
}), object({
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
|
|
26914
|
+
}), object({
|
|
26915
|
+
pendingRenegotiation: object({
|
|
26916
|
+
target: WebrtcStreamTargetSchema,
|
|
26917
|
+
epoch: number()
|
|
26918
|
+
}).nullable(),
|
|
26919
|
+
/**
|
|
26920
|
+
* Whether the session still EXISTS.
|
|
26921
|
+
*
|
|
26922
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
26923
|
+
* be able to ask, because a session does not always end the way it
|
|
26924
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
26925
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
26926
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
26927
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
26928
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
26929
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
26930
|
+
*
|
|
26931
|
+
* `false` for a session id the provider has never heard of, which is
|
|
26932
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
26933
|
+
*/
|
|
26934
|
+
alive: boolean()
|
|
26935
|
+
}))
|
|
26688
26936
|
},
|
|
26689
26937
|
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
26690
26938
|
mount: { kind: "server-provided" }
|
|
@@ -39698,6 +39946,12 @@ Object.freeze({
|
|
|
39698
39946
|
addonId: null,
|
|
39699
39947
|
access: "create"
|
|
39700
39948
|
},
|
|
39949
|
+
"streamBroker.reportStreamSignal": {
|
|
39950
|
+
capName: "stream-broker",
|
|
39951
|
+
capScope: "system",
|
|
39952
|
+
addonId: null,
|
|
39953
|
+
access: "create"
|
|
39954
|
+
},
|
|
39701
39955
|
"streamBroker.restartProfile": {
|
|
39702
39956
|
capName: "stream-broker",
|
|
39703
39957
|
capScope: "system",
|
|
@@ -39782,6 +40036,12 @@ Object.freeze({
|
|
|
39782
40036
|
addonId: null,
|
|
39783
40037
|
access: "create"
|
|
39784
40038
|
},
|
|
40039
|
+
"streamSignals.listSignals": {
|
|
40040
|
+
capName: "stream-signals",
|
|
40041
|
+
capScope: "device",
|
|
40042
|
+
addonId: null,
|
|
40043
|
+
access: "view"
|
|
40044
|
+
},
|
|
39785
40045
|
"switch.setState": {
|
|
39786
40046
|
capName: "switch",
|
|
39787
40047
|
capScope: "device",
|
|
@@ -42154,6 +42414,11 @@ Object.freeze({
|
|
|
42154
42414
|
form: "single",
|
|
42155
42415
|
optional: false
|
|
42156
42416
|
}],
|
|
42417
|
+
"streamBroker.reportStreamSignal": [{
|
|
42418
|
+
name: "deviceId",
|
|
42419
|
+
form: "single",
|
|
42420
|
+
optional: false
|
|
42421
|
+
}],
|
|
42157
42422
|
"streamBroker.restartProfile": [{
|
|
42158
42423
|
name: "deviceId",
|
|
42159
42424
|
form: "single",
|
|
@@ -44013,4 +44278,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
44013
44278
|
return out;
|
|
44014
44279
|
}
|
|
44015
44280
|
//#endregion
|
|
44016
|
-
export { evictionPolicyForMode as $,
|
|
44281
|
+
export { evictionPolicyForMode as $, hydrateSchema as $t, RingBuffer as A, resolvePoolMemoryPolicy as At, customAction as B, AUDIO_PRESETS as Bt, OpsLogEntrySchema as C, rankStreams as Ct, RECORDING_EXPORT_MAX_READ_BYTES as D, resolveClusterStepModelId as Dt, RATE_CONTROL_TIGHT as E, recordingSignalCapability as Et, audioKindId as F, streamBrokerCapability as Ft, deriveDetailCropRect as G, BOOT_RECOVERY_BACKOFF_MS as Gt, defaultDeviceFor as H, buildFfmpegArgs as Ht, batteryCapability as I, stripRetiredBandPreBufferSec as It, egressTranscodeSharingKey as J, DeviceFeature as Jt, deriveRecordingMode as K, BaseAddon as Kt, cameraStreamsCapability as L, supportedRuntimes as Lt, addonWidgetsSourceCapability as M, runtimeDevices as Mt, audioAnalysisCapability as N, storageEvictableCapability as Nt, RecordingConfigSchema as O, resolveEgressDecodeHwAccel as Ot, audioAnalyzerCapability as P, storageOccupancyCapability as Pt, evaluateZoneRules as Q, expandAudioChunkToF32le as Qt, createHwAccelCache as R, webrtcSessionCapability as Rt, NativeLeaseSettingsSchema as S, pipelineRunnerCapability as St, RATE_CONTROL_RELAXED as T, recordingExportCapability as Tt, defineCustomActions as U, invocationFromEncodeProfile as Ut, declareLogChannel as V, Fmp4BoxSplitter as Vt, deriveBatteryPresence as W, isSoftwareDecode as Wt, enumerateInferenceDevices as X, audioChunkBytesPerSample as Xt, egressTransportFromRequest as Y, DeviceType as Yt, evaluateSensorEdge as Z, createEvent as Zt, FailureCounters as _, record as _n, pickClusterStepModels as _t, COCO_80_LABELS as a, parseProfileBrokerId as an, isFirstLevelMacroClass as at, MOTION_CLOSE_AFTER_MS as b, EventCategory as bn, pickNativeLeaseOverride as bt, DEFAULT_CLUSTER_STEP_MODELS as c, _enum as cn, mapAudioLabelToMacro as ct, DEFAULT_EVENTS_BAND_BUFFER_SEC as d, discriminatedUnion as dn, mayWriteToLocation as dt, isEvent as en, evictionPolicyOfLocation as et, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as f, lazy as fn, migrateLegacyDeviceSignalConfig as ft, ExportRecordSchema as g, preprocess as gn, parseProcStatus as gt, EncodeProfileSchema as h, object as hn, overlayClusterStepSettings as ht, BatteryStatusSchema as i, parseJsonUnknown as in, inferModelProvider as it, YAMNET_TO_MACRO as j, resolveRecordingProfiles as jt, RecordingSignalStatusSchema as k, resolveLocationMode as kt, DEFAULT_CLUSTER_STEP_SETTINGS as l, array as ln, maskUrlCredentials as lt, DEVICE_BACKEND_TO_FORMAT as m, number as mn, motionDetectionCapability as mt, AUDIO_BACKEND_CHOICES as n, makeSourceBrokerId as nn, gbToBytes as nt, COCO_TO_MACRO as o, selectAssignedProfileSlots as on, loadContributionCapability as ot, DEFAULT_NATIVE_LEASE_SETTINGS as p, literal as pn, modeMayWrite as pt, detectionPipelineCapability as q, CAM_PROFILE_ORDER as qt, AUDIO_MACRO_LABELS as r, nodePin as rn, hfModelUrl as rt, DEFAULT_AUDIO_ANALYZER_CONFIG as s, sleep as sn, logChannelsCapability as st, APPLE_SA_TO_MACRO as t, makeProfileBrokerId as tn, failureContributionCapability as tt, DEFAULT_DETAIL_CROP_CONVENTION as u, boolean as un, mayReadLocation as ut, G711_SCALE_CORRECTION_DB as v, string as vn, pickClusterStepSettings as vt, PoolMemoryWatchdog as w, recordingCapability as wt, NativeLeaseAdmissionSchema as x, pipelineExecutorCapability as xt, HF_BASE_URL as y, union as yn, pickDetailCropConvention as yt, createLogChannelsProvider as z, errMsg as zt };
|