@camstack/addon-pipeline 1.2.264 → 1.2.266
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-BAqtelIs.mjs → default-detection-model-CgNo8TnL.mjs} +1 -1
- package/dist/{default-detection-model-DS8yUWZy.js → default-detection-model-qTBSuyhV.js} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-Cq5LGFGb.mjs → dist-B3VXz4Wa.mjs} +2 -1
- package/dist/{dist-BNuwrzez.js → dist-BcZg_JYr.js} +2 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-DT8wMxzw.js → node-BCAaSiZr.js} +1 -1
- package/dist/{node-DSO2p3Sv.mjs → node-Dw7woOAn.mjs} +1 -1
- package/dist/pipeline-runner/index.js +4 -4
- package/dist/pipeline-runner/index.mjs +4 -4
- package/dist/{process-memory-Ba3DClP8.js → process-memory-D-iERnC6.js} +1 -1
- package/dist/{process-memory-QhWa5UZq.mjs → process-memory-gI2c6orf.mjs} +1 -1
- package/dist/recorder/index.js +3 -3
- package/dist/recorder/index.mjs +3 -3
- package/dist/{restream-intent-iKGCB9IR.js → restream-intent-7uDNqMKs.js} +9 -6
- package/dist/{restream-intent-CW79dvFV.mjs → restream-intent-DyGmLAU9.mjs} +9 -6
- package/dist/{segment-demux-js-DfQPZtVo.mjs → segment-demux-js-BEiZu1cC.mjs} +1 -1
- package/dist/{segment-demux-js-Qevmgb67.js → segment-demux-js-Sj75Ju5w.js} +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-r_tNVu_V.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DWhdxT02.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-CADqXjyN.mjs → hostInit-7Nidxubq.mjs} +1 -1
- package/dist/stream-broker/index.js +64 -7
- package/dist/stream-broker/index.mjs +64 -7
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
|
@@ -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-BcZg_JYr.js");
|
|
7
|
+
const require_process_memory = require("../process-memory-D-iERnC6.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 { $t as hydrateSchema, Jt as audioChunkBytesPerSample, Lt as errMsg, N as audioAnalysisCapability, Ot as resolvePoolMemoryPolicy, P as audioAnalyzerCapability, Qt as expandAudioChunkToF32le, Wt as BaseAddon, bn as EventCategory, n as AUDIO_BACKEND_CHOICES, ot as mapAudioLabelToMacro, rn as nodePin, s as DEFAULT_AUDIO_ANALYZER_CONFIG, w as PoolMemoryWatchdog, y as HF_BASE_URL } from "../dist-
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { $t as hydrateSchema, Jt as audioChunkBytesPerSample, Lt as errMsg, N as audioAnalysisCapability, Ot as resolvePoolMemoryPolicy, P as audioAnalyzerCapability, Qt as expandAudioChunkToF32le, Wt as BaseAddon, bn as EventCategory, n as AUDIO_BACKEND_CHOICES, ot as mapAudioLabelToMacro, rn as nodePin, s as DEFAULT_AUDIO_ANALYZER_CONFIG, w as PoolMemoryWatchdog, y as HF_BASE_URL } from "../dist-B3VXz4Wa.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-gI2c6orf.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, tt as hfModelUrl } from "./dist-
|
|
1
|
+
import { F as audioKindId, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS, tt as hfModelUrl } from "./dist-B3VXz4Wa.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-BcZg_JYr.js");
|
|
7
|
+
const require_node = require("../node-BCAaSiZr.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-qTBSuyhV.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-D-iERnC6.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 { $t as hydrateSchema, At as runtimeDevices$1, Ft as supportedRuntimes$1, G as detectionPipelineCapability, J as enumerateInferenceDevices, Lt as errMsg, Ot as resolvePoolMemoryPolicy, Tt as resolveClusterStepModelId, V as defaultDeviceFor$1, Wt as BaseAddon, X as evaluateZoneRules, Yt as createEvent, bn as EventCategory, c as DEFAULT_CLUSTER_STEP_MODELS, gt as pickClusterStepSettings, hn as object, ht as pickClusterStepModels, in as parseJsonUnknown, it as loadContributionCapability, j as YAMNET_TO_MACRO, l as DEFAULT_CLUSTER_STEP_SETTINGS, ln as array, m as DEVICE_BACKEND_TO_FORMAT, nt as inferModelProvider, pt as overlayClusterStepSettings, rn as nodePin, sn as sleep, t as APPLE_SA_TO_MACRO, vn as string, w as PoolMemoryWatchdog, yn as union, yt as pipelineExecutorCapability } from "../dist-
|
|
3
|
-
import { o as readProcessCost } from "../node-
|
|
4
|
-
import { a as localFrameRegistry, c as ALL_STEPS, d as getStepDefinition, f as resolveModelForFormat, l as getDefaultModelForFormat, n as resolveDefaultDetectionModel, p as landmarkPrecisionVerdict, r as macroGateVerdict, s as ALL_PIPELINE_STEPS, u as getStep } from "../default-detection-model-
|
|
2
|
+
import { $t as hydrateSchema, At as runtimeDevices$1, Ft as supportedRuntimes$1, G as detectionPipelineCapability, J as enumerateInferenceDevices, Lt as errMsg, Ot as resolvePoolMemoryPolicy, Tt as resolveClusterStepModelId, V as defaultDeviceFor$1, Wt as BaseAddon, X as evaluateZoneRules, Yt as createEvent, bn as EventCategory, c as DEFAULT_CLUSTER_STEP_MODELS, gt as pickClusterStepSettings, hn as object, ht as pickClusterStepModels, in as parseJsonUnknown, it as loadContributionCapability, j as YAMNET_TO_MACRO, l as DEFAULT_CLUSTER_STEP_SETTINGS, ln as array, m as DEVICE_BACKEND_TO_FORMAT, nt as inferModelProvider, pt as overlayClusterStepSettings, rn as nodePin, sn as sleep, t as APPLE_SA_TO_MACRO, vn as string, w as PoolMemoryWatchdog, yn as union, yt as pipelineExecutorCapability } from "../dist-B3VXz4Wa.mjs";
|
|
3
|
+
import { o as readProcessCost } from "../node-Dw7woOAn.mjs";
|
|
4
|
+
import { a as localFrameRegistry, c as ALL_STEPS, d as getStepDefinition, f as resolveModelForFormat, l as getDefaultModelForFormat, n as resolveDefaultDetectionModel, p as landmarkPrecisionVerdict, r as macroGateVerdict, s as ALL_PIPELINE_STEPS, u as getStep } from "../default-detection-model-CgNo8TnL.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-gI2c6orf.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";
|
|
@@ -7577,7 +7577,7 @@ function sleep(ms) {
|
|
|
7577
7577
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
7578
7578
|
}
|
|
7579
7579
|
//#endregion
|
|
7580
|
-
//#region ../types/dist/canonical-hash-
|
|
7580
|
+
//#region ../types/dist/canonical-hash-DI7tT-zZ.mjs
|
|
7581
7581
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
7582
7582
|
opus: "libopus",
|
|
7583
7583
|
aac: "aac",
|
|
@@ -7638,6 +7638,7 @@ function buildInputArgs(input, decodeHwAccel) {
|
|
|
7638
7638
|
if (input.analyzeDurationUs !== void 0) args.push("-analyzeduration", String(input.analyzeDurationUs));
|
|
7639
7639
|
if (input.probeSizeBytes !== void 0) args.push("-probesize", String(input.probeSizeBytes));
|
|
7640
7640
|
if (input.lowDelay === true) args.push("-flags", "low_delay");
|
|
7641
|
+
if (input.useWallclockTimestamps === true) args.push("-use_wallclock_as_timestamps", "1");
|
|
7641
7642
|
if (input.fflags?.length) for (const flag of input.fflags) args.push("-fflags", flag);
|
|
7642
7643
|
if (input.rtspTransport) args.push("-rtsp_transport", input.rtspTransport);
|
|
7643
7644
|
args.push("-i", input.url);
|
|
@@ -7577,7 +7577,7 @@ function sleep(ms) {
|
|
|
7577
7577
|
return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
|
|
7578
7578
|
}
|
|
7579
7579
|
//#endregion
|
|
7580
|
-
//#region ../types/dist/canonical-hash-
|
|
7580
|
+
//#region ../types/dist/canonical-hash-DI7tT-zZ.mjs
|
|
7581
7581
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
7582
7582
|
opus: "libopus",
|
|
7583
7583
|
aac: "aac",
|
|
@@ -7638,6 +7638,7 @@ function buildInputArgs(input, decodeHwAccel) {
|
|
|
7638
7638
|
if (input.analyzeDurationUs !== void 0) args.push("-analyzeduration", String(input.analyzeDurationUs));
|
|
7639
7639
|
if (input.probeSizeBytes !== void 0) args.push("-probesize", String(input.probeSizeBytes));
|
|
7640
7640
|
if (input.lowDelay === true) args.push("-flags", "low_delay");
|
|
7641
|
+
if (input.useWallclockTimestamps === true) args.push("-use_wallclock_as_timestamps", "1");
|
|
7641
7642
|
if (input.fflags?.length) for (const flag of input.fflags) args.push("-fflags", flag);
|
|
7642
7643
|
if (input.rtspTransport) args.push("-rtsp_transport", input.rtspTransport);
|
|
7643
7644
|
args.push("-i", input.url);
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-BcZg_JYr.js");
|
|
6
6
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as hydrateSchema, Wt as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability, qt as DeviceType } from "../dist-
|
|
1
|
+
import { $t as hydrateSchema, Wt as BaseAddon, X as evaluateZoneRules, ft as motionDetectionCapability, qt as DeviceType } from "../dist-B3VXz4Wa.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BcZg_JYr.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as buildFfmpegArgs, Ht as isSoftwareDecode, Lt as errMsg, zt as Fmp4BoxSplitter } from "./dist-
|
|
1
|
+
import { Bt as buildFfmpegArgs, Ht as isSoftwareDecode, Lt as errMsg, zt as Fmp4BoxSplitter } from "./dist-B3VXz4Wa.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -3,13 +3,13 @@ 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-BcZg_JYr.js");
|
|
7
|
+
const require_node = require("../node-BCAaSiZr.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-qTBSuyhV.js");
|
|
9
9
|
const require_worker_protocol = require("../worker-protocol-B2MfQLlu.js");
|
|
10
10
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
11
11
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
12
|
-
const require_restream_intent = require("../restream-intent-
|
|
12
|
+
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
13
13
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
14
14
|
let node_os = require("node:os");
|
|
15
15
|
node_os = require_chunk.__toESM(node_os);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as failureContributionCapability, Lt as errMsg, S as NativeLeaseSettingsSchema, U as deriveDetailCropRect, Wt as BaseAddon, Xt as customAction, Yt as createEvent, Zt as defineCustomActions, _ as FailureCounters, _t as pickDetailCropConvention, b as MOTION_CLOSE_AFTER_MS, bn as EventCategory, bt as pipelineRunnerCapability, cn as _enum, fn as lazy, hn as object, it as loadContributionCapability, ln as array, m as DEVICE_BACKEND_TO_FORMAT, mn as number, p as DEFAULT_NATIVE_LEASE_SETTINGS, pn as literal, rn as nodePin, u as DEFAULT_DETAIL_CROP_CONVENTION, un as boolean, vn as string, vt as pickNativeLeaseOverride, x as NativeLeaseAdmissionSchema } from "../dist-
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { a as localFrameRegistry, d as getStepDefinition, i as rootObjectGate, o as resolveFrameViewGeometry, r as macroGateVerdict } from "../default-detection-model-
|
|
1
|
+
import { $ as failureContributionCapability, Lt as errMsg, S as NativeLeaseSettingsSchema, U as deriveDetailCropRect, Wt as BaseAddon, Xt as customAction, Yt as createEvent, Zt as defineCustomActions, _ as FailureCounters, _t as pickDetailCropConvention, b as MOTION_CLOSE_AFTER_MS, bn as EventCategory, bt as pipelineRunnerCapability, cn as _enum, fn as lazy, hn as object, it as loadContributionCapability, ln as array, m as DEVICE_BACKEND_TO_FORMAT, mn as number, p as DEFAULT_NATIVE_LEASE_SETTINGS, pn as literal, rn as nodePin, u as DEFAULT_DETAIL_CROP_CONVENTION, un as boolean, vn as string, vt as pickNativeLeaseOverride, x as NativeLeaseAdmissionSchema } from "../dist-B3VXz4Wa.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Dw7woOAn.mjs";
|
|
3
|
+
import { a as localFrameRegistry, d as getStepDefinition, i as rootObjectGate, o as resolveFrameViewGeometry, r as macroGateVerdict } from "../default-detection-model-CgNo8TnL.mjs";
|
|
4
4
|
import { t as isWorkerReply } from "../worker-protocol-C_W-P_g-.mjs";
|
|
5
5
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
6
6
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
7
|
-
import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-
|
|
7
|
+
import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
8
8
|
import { n as profileForStreamId, t as isRemoteRestream } from "../remote-restream-BeHi78PZ.mjs";
|
|
9
9
|
import * as os from "node:os";
|
|
10
10
|
import { fork } from "node:child_process";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BcZg_JYr.js");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
node_fs = require_chunk.__toESM(node_fs);
|
|
5
5
|
let node_child_process = require("node:child_process");
|
package/dist/recorder/index.js
CHANGED
|
@@ -3,10 +3,10 @@ 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-
|
|
6
|
+
const require_dist = require("../dist-BcZg_JYr.js");
|
|
7
|
+
const require_node = require("../node-BCAaSiZr.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
|
-
const require_restream_intent = require("../restream-intent-
|
|
9
|
+
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
11
11
|
let node_crypto = require("node:crypto");
|
|
12
12
|
let node_fs = require("node:fs");
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $t as hydrateSchema, C as OpsLogEntrySchema, Ct as recordingExportCapability, D as RECORDING_EXPORT_MAX_READ_BYTES, Dt as resolveLocationMode, H as deriveBatteryPresence, I as batteryCapability, Kt as DeviceFeature, Lt as errMsg, Mt as storageOccupancyCapability, O as RecordingConfigSchema, Pt as stripRetiredBandPreBufferSec, Q as evictionPolicyOfLocation, St as recordingCapability, W as deriveRecordingMode, Wt as BaseAddon, Xt as customAction, Y as evaluateSensorEdge, Z as evictionPolicyForMode, Zt as defineCustomActions, _n as record, bn as EventCategory, cn as _enum, ct as mayReadLocation, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dt as modeMayWrite, et as gbToBytes, g as ExportRecordSchema, gn as preprocess, hn as object, i as BatteryStatusSchema, it as loadContributionCapability, jt as storageEvictableCapability, k as RecordingSignalStatusSchema, kt as resolveRecordingProfiles, ln as array, lt as mayWriteToLocation, mn as number, on as selectAssignedProfileSlots, qt as DeviceType, rn as nodePin, rt as isFirstLevelMacroClass, sn as sleep$1, un as boolean, ut as migrateLegacyDeviceSignalConfig, vn as string, wt as recordingSignalCapability } from "../dist-
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { $t as hydrateSchema, C as OpsLogEntrySchema, Ct as recordingExportCapability, D as RECORDING_EXPORT_MAX_READ_BYTES, Dt as resolveLocationMode, H as deriveBatteryPresence, I as batteryCapability, Kt as DeviceFeature, Lt as errMsg, Mt as storageOccupancyCapability, O as RecordingConfigSchema, Pt as stripRetiredBandPreBufferSec, Q as evictionPolicyOfLocation, St as recordingCapability, W as deriveRecordingMode, Wt as BaseAddon, Xt as customAction, Y as evaluateSensorEdge, Z as evictionPolicyForMode, Zt as defineCustomActions, _n as record, bn as EventCategory, cn as _enum, ct as mayReadLocation, d as DEFAULT_EVENTS_BAND_BUFFER_SEC, dt as modeMayWrite, et as gbToBytes, g as ExportRecordSchema, gn as preprocess, hn as object, i as BatteryStatusSchema, it as loadContributionCapability, jt as storageEvictableCapability, k as RecordingSignalStatusSchema, kt as resolveRecordingProfiles, ln as array, lt as mayWriteToLocation, mn as number, on as selectAssignedProfileSlots, qt as DeviceType, rn as nodePin, rt as isFirstLevelMacroClass, sn as sleep$1, un as boolean, ut as migrateLegacyDeviceSignalConfig, vn as string, wt as recordingSignalCapability } from "../dist-B3VXz4Wa.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-Dw7woOAn.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
|
-
import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-
|
|
4
|
+
import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
5
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { createReadStream, promises, realpathSync } from "node:fs";
|
|
@@ -343,12 +343,15 @@ function withRecordingIntent(restreamUrl, requestMs) {
|
|
|
343
343
|
* sentry path shipped without.
|
|
344
344
|
*
|
|
345
345
|
* "sentryMuted", which is what the operator asked a composite camera to take
|
|
346
|
-
* from a battery source, is not a second intent
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
346
|
+
* from a battery source, is not a second intent — and it is not muted either,
|
|
347
|
+
* though this comment said so until 2026-09-18. D525 made `parseRestreamPath`
|
|
348
|
+
* answer `muted: false` for `/sentry`: the mute belongs to the PLACEHOLDER, not
|
|
349
|
+
* to the path, so the track is announced and filled with silence while the
|
|
350
|
+
* picture is served and with the camera's own RTP the instant media flows.
|
|
351
|
+
*
|
|
352
|
+
* What stands is the REPLACEMENT: this rewrites whatever the url declared
|
|
353
|
+
* rather than appending to it — `<token>/muted/sentry` would parse back to the
|
|
354
|
+
* token `<token>/muted`, a lookup that finds nothing and says nothing.
|
|
352
355
|
*
|
|
353
356
|
* The pre-roll request is dropped for the same reason the sentry declares none:
|
|
354
357
|
* there is no history in a still picture, and D382 says the ask is explicit.
|
|
@@ -343,12 +343,15 @@ function withRecordingIntent(restreamUrl, requestMs) {
|
|
|
343
343
|
* sentry path shipped without.
|
|
344
344
|
*
|
|
345
345
|
* "sentryMuted", which is what the operator asked a composite camera to take
|
|
346
|
-
* from a battery source, is not a second intent
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
346
|
+
* from a battery source, is not a second intent — and it is not muted either,
|
|
347
|
+
* though this comment said so until 2026-09-18. D525 made `parseRestreamPath`
|
|
348
|
+
* answer `muted: false` for `/sentry`: the mute belongs to the PLACEHOLDER, not
|
|
349
|
+
* to the path, so the track is announced and filled with silence while the
|
|
350
|
+
* picture is served and with the camera's own RTP the instant media flows.
|
|
351
|
+
*
|
|
352
|
+
* What stands is the REPLACEMENT: this rewrites whatever the url declared
|
|
353
|
+
* rather than appending to it — `<token>/muted/sentry` would parse back to the
|
|
354
|
+
* token `<token>/muted`, a lookup that finds nothing and says nothing.
|
|
352
355
|
*
|
|
353
356
|
* The pre-roll request is dropped for the same reason the sentry declares none:
|
|
354
357
|
* there is no history in a still picture, and D382 says the ask is explicit.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Lt as errMsg } from "./dist-
|
|
2
|
+
import { Lt as errMsg } from "./dist-B3VXz4Wa.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
5
5
|
var require_mp4box_all = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BcZg_JYr.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region ../../node_modules/mp4box/dist/mp4box.all.js
|
|
5
5
|
var require_mp4box_all = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_segment_demux_js = require("../segment-demux-js-
|
|
1
|
+
const require_segment_demux_js = require("../segment-demux-js-Sj75Ju5w.js");
|
|
2
2
|
let node_worker_threads = require("node:worker_threads");
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as demuxSegmentFullJs } from "../segment-demux-js-
|
|
1
|
+
import { t as demuxSegmentFullJs } from "../segment-demux-js-BEiZu1cC.mjs";
|
|
2
2
|
import { parentPort } from "node:worker_threads";
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -3,12 +3,12 @@ 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_restream_intent = require("../restream-intent-
|
|
6
|
+
const require_dist = require("../dist-BcZg_JYr.js");
|
|
7
|
+
const require_node = require("../node-BCAaSiZr.js");
|
|
8
|
+
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
9
9
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
11
|
-
const require_segment_demux_js = require("../segment-demux-js-
|
|
11
|
+
const require_segment_demux_js = require("../segment-demux-js-Sj75Ju5w.js");
|
|
12
12
|
let node_os = require("node:os");
|
|
13
13
|
node_os = require_chunk.__toESM(node_os);
|
|
14
14
|
let node_crypto = require("node:crypto");
|
|
@@ -30525,6 +30525,18 @@ function reduceProfileForTranscodeDown(base) {
|
|
|
30525
30525
|
}
|
|
30526
30526
|
};
|
|
30527
30527
|
}
|
|
30528
|
+
/**
|
|
30529
|
+
* How long a session setup waits for a broker that is on its way back.
|
|
30530
|
+
*
|
|
30531
|
+
* An addon respawn rebuilds every broker and re-registers it; the gap measured
|
|
30532
|
+
* on this hub is seconds, not tens of seconds. Five is enough to cover it and
|
|
30533
|
+
* short enough that a stream which really is gone still fails while the viewer
|
|
30534
|
+
* is looking at the player, with a message that says it waited.
|
|
30535
|
+
*
|
|
30536
|
+
* The alternative shipped for months: fail instantly and let the operator press
|
|
30537
|
+
* pause/play, which works only because the second attempt happens later.
|
|
30538
|
+
*/
|
|
30539
|
+
var BROKER_REAPPEAR_WAIT_MS = 5e3;
|
|
30528
30540
|
var BrokerWebrtcServer = class {
|
|
30529
30541
|
logger;
|
|
30530
30542
|
getIceServersFn;
|
|
@@ -30580,6 +30592,8 @@ var BrokerWebrtcServer = class {
|
|
|
30580
30592
|
* devices (the manager's own gate), so an unset hook or a local-owner call
|
|
30581
30593
|
* leaves adaptive resolution byte-identical to before this hook existed.
|
|
30582
30594
|
*/
|
|
30595
|
+
/** Callers parked on a broker that is being rebuilt, keyed by brokerId. */
|
|
30596
|
+
brokerWaiters = /* @__PURE__ */ new Map();
|
|
30583
30597
|
ensureAdaptiveTierBroker = null;
|
|
30584
30598
|
/** sessionId → session entry. */
|
|
30585
30599
|
sessions = /* @__PURE__ */ new Map();
|
|
@@ -30606,6 +30620,11 @@ var BrokerWebrtcServer = class {
|
|
|
30606
30620
|
}
|
|
30607
30621
|
registerBroker(brokerId, broker) {
|
|
30608
30622
|
this.brokers.set(brokerId, broker);
|
|
30623
|
+
const waiters = this.brokerWaiters.get(brokerId);
|
|
30624
|
+
if (waiters !== void 0) {
|
|
30625
|
+
this.brokerWaiters.delete(brokerId);
|
|
30626
|
+
for (const wake of waiters) wake();
|
|
30627
|
+
}
|
|
30609
30628
|
const did = deviceIdFromBrokerId(brokerId);
|
|
30610
30629
|
this.logger.info("WebRTC broker registered", {
|
|
30611
30630
|
...did !== -1 ? { tags: { deviceId: did } } : {},
|
|
@@ -30613,6 +30632,44 @@ var BrokerWebrtcServer = class {
|
|
|
30613
30632
|
});
|
|
30614
30633
|
}
|
|
30615
30634
|
/**
|
|
30635
|
+
* Wait, briefly, for a broker that is on its way back.
|
|
30636
|
+
*
|
|
30637
|
+
* An addon respawn — every deploy — tears the brokers down and rebuilds
|
|
30638
|
+
* them, re-registering each with {@link registerBroker}. A viewer
|
|
30639
|
+
* reconnecting inside that window used to get `No broker for stream`,
|
|
30640
|
+
* terminal and immediate, and the only cure was the operator pressing
|
|
30641
|
+
* pause/play: the second attempt is the SAME call, later, by which point the
|
|
30642
|
+
* broker exists. The difference was never the call, it was the time.
|
|
30643
|
+
*
|
|
30644
|
+
* Resolves `null` on the deadline rather than throwing, so the caller keeps
|
|
30645
|
+
* owning the error message — a stream that really is gone must still fail,
|
|
30646
|
+
* and say that it waited.
|
|
30647
|
+
*/
|
|
30648
|
+
waitForBroker(brokerId, timeoutMs) {
|
|
30649
|
+
const existing = this.brokers.get(brokerId);
|
|
30650
|
+
if (existing !== void 0) return Promise.resolve(existing);
|
|
30651
|
+
return new Promise((resolve) => {
|
|
30652
|
+
let settled = false;
|
|
30653
|
+
const finish = (value) => {
|
|
30654
|
+
if (settled) return;
|
|
30655
|
+
settled = true;
|
|
30656
|
+
resolve(value);
|
|
30657
|
+
};
|
|
30658
|
+
const wake = () => {
|
|
30659
|
+
finish(this.brokers.get(brokerId) ?? null);
|
|
30660
|
+
};
|
|
30661
|
+
const list = this.brokerWaiters.get(brokerId);
|
|
30662
|
+
if (list === void 0) this.brokerWaiters.set(brokerId, [wake]);
|
|
30663
|
+
else list.push(wake);
|
|
30664
|
+
setTimeout(() => {
|
|
30665
|
+
const remaining = (this.brokerWaiters.get(brokerId) ?? []).filter((w) => w !== wake);
|
|
30666
|
+
if (remaining.length === 0) this.brokerWaiters.delete(brokerId);
|
|
30667
|
+
else this.brokerWaiters.set(brokerId, remaining);
|
|
30668
|
+
finish(null);
|
|
30669
|
+
}, timeoutMs).unref?.();
|
|
30670
|
+
});
|
|
30671
|
+
}
|
|
30672
|
+
/**
|
|
30616
30673
|
* Provide a resolver that maps brokerId → current profile tier. The
|
|
30617
30674
|
* manager injects one wired to its `assignments` map. Without it the
|
|
30618
30675
|
* server still serves brokers but can't honour client `prefersTier`
|
|
@@ -30833,14 +30890,14 @@ var BrokerWebrtcServer = class {
|
|
|
30833
30890
|
try {
|
|
30834
30891
|
await this.ensureAdaptiveTierBroker?.(adaptiveDeviceId, desiredTier);
|
|
30835
30892
|
} catch (err) {
|
|
30836
|
-
throw new Error(`
|
|
30893
|
+
throw new Error(`Could not prepare the owner node's broker for stream "${streamId}" (requested tier ${desiredTier}, ${String(Date.now() - ensureTierStart)}ms): ${require_dist.errMsg(err)}`);
|
|
30837
30894
|
} finally {
|
|
30838
30895
|
ensureTierMs = Date.now() - ensureTierStart;
|
|
30839
30896
|
}
|
|
30840
30897
|
}
|
|
30841
30898
|
const brokerId = this.resolveBrokerId(streamId, resolveHints);
|
|
30842
|
-
const broker = this.brokers.get(brokerId);
|
|
30843
|
-
if (!broker) throw new Error(`No broker for stream "${streamId}" (resolved: "${brokerId}")`);
|
|
30899
|
+
const broker = this.brokers.get(brokerId) ?? await this.waitForBroker(brokerId, BROKER_REAPPEAR_WAIT_MS);
|
|
30900
|
+
if (!broker) throw new Error(`No broker for stream "${streamId}" (resolved: "${brokerId}") after waiting ${String(BROKER_REAPPEAR_WAIT_MS)}ms for one to register`);
|
|
30844
30901
|
const baseTranscodeProfile = opts.transcodeProfile ?? WEBRTC_FALLBACK_PROFILE;
|
|
30845
30902
|
const effectiveTranscodeProfile = intent?.forceTranscodeDown === true ? reduceProfileForTranscodeDown(baseTranscodeProfile) : opts.transcodeProfile;
|
|
30846
30903
|
if (intent !== void 0 && opts.sessionId !== void 0) this.adaptiveIntent.delete(opts.sessionId);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as __toESM } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { A as RingBuffer, B as declareLogChannel, Bt as buildFfmpegArgs$1, E as RATE_CONTROL_TIGHT, Et as resolveEgressDecodeHwAccel, Gt as CAM_PROFILE_ORDER, H as deriveBatteryPresence, Ht as isSoftwareDecode, I as batteryCapability, It as webrtcSessionCapability, K as egressTranscodeSharingKey, Kt as DeviceFeature, L as cameraStreamsCapability, Lt as errMsg, M as addonWidgetsSourceCapability, Nt as streamBrokerCapability, Qt as expandAudioChunkToF32le, R as createHwAccelCache, Rt as AUDIO_PRESETS, T as RATE_CONTROL_RELAXED, Ut as BOOT_RECOVERY_BACKOFF_MS, Vt as invocationFromEncodeProfile, Wt as BaseAddon, Yt as createEvent, _n as record, an as parseProfileBrokerId, at as logChannelsCapability, bn as EventCategory, cn as _enum, dn as discriminatedUnion, en as isEvent, h as EncodeProfileSchema, hn as object, i as BatteryStatusSchema, it as loadContributionCapability, ln as array, mn as number, nn as makeSourceBrokerId, pn as literal, q as egressTransportFromRequest, qt as DeviceType, rn as nodePin, st as maskUrlCredentials, tn as makeProfileBrokerId, un as boolean, v as G711_SCALE_CORRECTION_DB, vn as string, xt as rankStreams, yn as union, z as createLogChannelsProvider } from "../dist-
|
|
3
|
-
import { i as NO_COST_CLAIM, n as Fmp4FragmentChild, r as Fmp4FragmentPlane, t as ChildCostRegistry } from "../node-
|
|
4
|
-
import { a as parseRestreamPath, d as PREBUFFER_MAX_MS, f as capPreRollRequestMs, i as isLiveEdgeOnlyDial, m as resolvePrebuffer, n as NO_DECLARATION, p as prebufferRetentionMs, s as sdpVariantFor, u as withSentryIntent } from "../restream-intent-
|
|
2
|
+
import { A as RingBuffer, B as declareLogChannel, Bt as buildFfmpegArgs$1, E as RATE_CONTROL_TIGHT, Et as resolveEgressDecodeHwAccel, Gt as CAM_PROFILE_ORDER, H as deriveBatteryPresence, Ht as isSoftwareDecode, I as batteryCapability, It as webrtcSessionCapability, K as egressTranscodeSharingKey, Kt as DeviceFeature, L as cameraStreamsCapability, Lt as errMsg, M as addonWidgetsSourceCapability, Nt as streamBrokerCapability, Qt as expandAudioChunkToF32le, R as createHwAccelCache, Rt as AUDIO_PRESETS, T as RATE_CONTROL_RELAXED, Ut as BOOT_RECOVERY_BACKOFF_MS, Vt as invocationFromEncodeProfile, Wt as BaseAddon, Yt as createEvent, _n as record, an as parseProfileBrokerId, at as logChannelsCapability, bn as EventCategory, cn as _enum, dn as discriminatedUnion, en as isEvent, h as EncodeProfileSchema, hn as object, i as BatteryStatusSchema, it as loadContributionCapability, ln as array, mn as number, nn as makeSourceBrokerId, pn as literal, q as egressTransportFromRequest, qt as DeviceType, rn as nodePin, st as maskUrlCredentials, tn as makeProfileBrokerId, un as boolean, v as G711_SCALE_CORRECTION_DB, vn as string, xt as rankStreams, yn as union, z as createLogChannelsProvider } from "../dist-B3VXz4Wa.mjs";
|
|
3
|
+
import { i as NO_COST_CLAIM, n as Fmp4FragmentChild, r as Fmp4FragmentPlane, t as ChildCostRegistry } from "../node-Dw7woOAn.mjs";
|
|
4
|
+
import { a as parseRestreamPath, d as PREBUFFER_MAX_MS, f as capPreRollRequestMs, i as isLiveEdgeOnlyDial, m as resolvePrebuffer, n as NO_DECLARATION, p as prebufferRetentionMs, s as sdpVariantFor, u as withSentryIntent } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
5
|
import { n as profileForStreamId } from "../remote-restream-BeHi78PZ.mjs";
|
|
6
6
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
7
|
-
import { i as require_mp4box_all, n as demuxSegmentPreferJs, r as runFfmpegOnce, t as demuxSegmentFullJs } from "../segment-demux-js-
|
|
7
|
+
import { i as require_mp4box_all, n as demuxSegmentPreferJs, r as runFfmpegOnce, t as demuxSegmentFullJs } from "../segment-demux-js-BEiZu1cC.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import * as os from "node:os";
|
|
10
10
|
import { networkInterfaces, tmpdir } from "node:os";
|
|
@@ -30521,6 +30521,18 @@ function reduceProfileForTranscodeDown(base) {
|
|
|
30521
30521
|
}
|
|
30522
30522
|
};
|
|
30523
30523
|
}
|
|
30524
|
+
/**
|
|
30525
|
+
* How long a session setup waits for a broker that is on its way back.
|
|
30526
|
+
*
|
|
30527
|
+
* An addon respawn rebuilds every broker and re-registers it; the gap measured
|
|
30528
|
+
* on this hub is seconds, not tens of seconds. Five is enough to cover it and
|
|
30529
|
+
* short enough that a stream which really is gone still fails while the viewer
|
|
30530
|
+
* is looking at the player, with a message that says it waited.
|
|
30531
|
+
*
|
|
30532
|
+
* The alternative shipped for months: fail instantly and let the operator press
|
|
30533
|
+
* pause/play, which works only because the second attempt happens later.
|
|
30534
|
+
*/
|
|
30535
|
+
var BROKER_REAPPEAR_WAIT_MS = 5e3;
|
|
30524
30536
|
var BrokerWebrtcServer = class {
|
|
30525
30537
|
logger;
|
|
30526
30538
|
getIceServersFn;
|
|
@@ -30576,6 +30588,8 @@ var BrokerWebrtcServer = class {
|
|
|
30576
30588
|
* devices (the manager's own gate), so an unset hook or a local-owner call
|
|
30577
30589
|
* leaves adaptive resolution byte-identical to before this hook existed.
|
|
30578
30590
|
*/
|
|
30591
|
+
/** Callers parked on a broker that is being rebuilt, keyed by brokerId. */
|
|
30592
|
+
brokerWaiters = /* @__PURE__ */ new Map();
|
|
30579
30593
|
ensureAdaptiveTierBroker = null;
|
|
30580
30594
|
/** sessionId → session entry. */
|
|
30581
30595
|
sessions = /* @__PURE__ */ new Map();
|
|
@@ -30602,6 +30616,11 @@ var BrokerWebrtcServer = class {
|
|
|
30602
30616
|
}
|
|
30603
30617
|
registerBroker(brokerId, broker) {
|
|
30604
30618
|
this.brokers.set(brokerId, broker);
|
|
30619
|
+
const waiters = this.brokerWaiters.get(brokerId);
|
|
30620
|
+
if (waiters !== void 0) {
|
|
30621
|
+
this.brokerWaiters.delete(brokerId);
|
|
30622
|
+
for (const wake of waiters) wake();
|
|
30623
|
+
}
|
|
30605
30624
|
const did = deviceIdFromBrokerId(brokerId);
|
|
30606
30625
|
this.logger.info("WebRTC broker registered", {
|
|
30607
30626
|
...did !== -1 ? { tags: { deviceId: did } } : {},
|
|
@@ -30609,6 +30628,44 @@ var BrokerWebrtcServer = class {
|
|
|
30609
30628
|
});
|
|
30610
30629
|
}
|
|
30611
30630
|
/**
|
|
30631
|
+
* Wait, briefly, for a broker that is on its way back.
|
|
30632
|
+
*
|
|
30633
|
+
* An addon respawn — every deploy — tears the brokers down and rebuilds
|
|
30634
|
+
* them, re-registering each with {@link registerBroker}. A viewer
|
|
30635
|
+
* reconnecting inside that window used to get `No broker for stream`,
|
|
30636
|
+
* terminal and immediate, and the only cure was the operator pressing
|
|
30637
|
+
* pause/play: the second attempt is the SAME call, later, by which point the
|
|
30638
|
+
* broker exists. The difference was never the call, it was the time.
|
|
30639
|
+
*
|
|
30640
|
+
* Resolves `null` on the deadline rather than throwing, so the caller keeps
|
|
30641
|
+
* owning the error message — a stream that really is gone must still fail,
|
|
30642
|
+
* and say that it waited.
|
|
30643
|
+
*/
|
|
30644
|
+
waitForBroker(brokerId, timeoutMs) {
|
|
30645
|
+
const existing = this.brokers.get(brokerId);
|
|
30646
|
+
if (existing !== void 0) return Promise.resolve(existing);
|
|
30647
|
+
return new Promise((resolve) => {
|
|
30648
|
+
let settled = false;
|
|
30649
|
+
const finish = (value) => {
|
|
30650
|
+
if (settled) return;
|
|
30651
|
+
settled = true;
|
|
30652
|
+
resolve(value);
|
|
30653
|
+
};
|
|
30654
|
+
const wake = () => {
|
|
30655
|
+
finish(this.brokers.get(brokerId) ?? null);
|
|
30656
|
+
};
|
|
30657
|
+
const list = this.brokerWaiters.get(brokerId);
|
|
30658
|
+
if (list === void 0) this.brokerWaiters.set(brokerId, [wake]);
|
|
30659
|
+
else list.push(wake);
|
|
30660
|
+
setTimeout(() => {
|
|
30661
|
+
const remaining = (this.brokerWaiters.get(brokerId) ?? []).filter((w) => w !== wake);
|
|
30662
|
+
if (remaining.length === 0) this.brokerWaiters.delete(brokerId);
|
|
30663
|
+
else this.brokerWaiters.set(brokerId, remaining);
|
|
30664
|
+
finish(null);
|
|
30665
|
+
}, timeoutMs).unref?.();
|
|
30666
|
+
});
|
|
30667
|
+
}
|
|
30668
|
+
/**
|
|
30612
30669
|
* Provide a resolver that maps brokerId → current profile tier. The
|
|
30613
30670
|
* manager injects one wired to its `assignments` map. Without it the
|
|
30614
30671
|
* server still serves brokers but can't honour client `prefersTier`
|
|
@@ -30829,14 +30886,14 @@ var BrokerWebrtcServer = class {
|
|
|
30829
30886
|
try {
|
|
30830
30887
|
await this.ensureAdaptiveTierBroker?.(adaptiveDeviceId, desiredTier);
|
|
30831
30888
|
} catch (err) {
|
|
30832
|
-
throw new Error(`
|
|
30889
|
+
throw new Error(`Could not prepare the owner node's broker for stream "${streamId}" (requested tier ${desiredTier}, ${String(Date.now() - ensureTierStart)}ms): ${errMsg(err)}`);
|
|
30833
30890
|
} finally {
|
|
30834
30891
|
ensureTierMs = Date.now() - ensureTierStart;
|
|
30835
30892
|
}
|
|
30836
30893
|
}
|
|
30837
30894
|
const brokerId = this.resolveBrokerId(streamId, resolveHints);
|
|
30838
|
-
const broker = this.brokers.get(brokerId);
|
|
30839
|
-
if (!broker) throw new Error(`No broker for stream "${streamId}" (resolved: "${brokerId}")`);
|
|
30895
|
+
const broker = this.brokers.get(brokerId) ?? await this.waitForBroker(brokerId, BROKER_REAPPEAR_WAIT_MS);
|
|
30896
|
+
if (!broker) throw new Error(`No broker for stream "${streamId}" (resolved: "${brokerId}") after waiting ${String(BROKER_REAPPEAR_WAIT_MS)}ms for one to register`);
|
|
30840
30897
|
const baseTranscodeProfile = opts.transcodeProfile ?? WEBRTC_FALLBACK_PROFILE;
|
|
30841
30898
|
const effectiveTranscodeProfile = intent?.forceTranscodeDown === true ? reduceProfileForTranscodeDown(baseTranscodeProfile) : opts.transcodeProfile;
|
|
30842
30899
|
if (intent !== void 0 && opts.sessionId !== void 0) this.adaptiveIntent.delete(opts.sessionId);
|
|
@@ -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-DWhdxT02.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.2.
|
|
3
|
+
"version": "1.2.266",
|
|
4
4
|
"description": "Pipeline bundle — runner, detection, motion, audio + stream broker. Multi-entry npm package shipping pipeline addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|