@camstack/addon-pipeline 1.2.254 → 1.2.255
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-DQj3yiG8.js → default-detection-model-CCFY8YLF.js} +1 -1
- package/dist/{default-detection-model-BegEf29d.mjs → default-detection-model-DRTO2E6G.mjs} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-CkGvx3Fy.mjs → dist-BS-l_k7M.mjs} +242 -25
- package/dist/{dist-DQsOgAJp.js → dist-CqqhxcYH.js} +242 -25
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-Dwlty0jj.mjs → node-DjvGLcbe.mjs} +1 -1
- package/dist/{node-Bg7LGOQ3.js → node-bdHZWpo1.js} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-CzjYHqAz.mjs → process-memory-CrDzHWbQ.mjs} +1 -1
- package/dist/{process-memory-COrQw_pf.js → process-memory-hQeELS5T.js} +1 -1
- package/dist/recorder/index.js +2 -2
- package/dist/recorder/index.mjs +2 -2
- package/dist/{segment-demux-js-BAoEDsxT.mjs → segment-demux-js-BnYubI9B.mjs} +1 -1
- package/dist/{segment-demux-js-BIrnzZiP.js → segment-demux-js-CaDmuf08.js} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-rumvXmC-.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-qftSJVIp.mjs} +3 -3
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-k114uFcJ.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CPFjd94C.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-BHtcf-Mo.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D8WW_JG-.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-CFFft0gC.mjs → hostInit-BbuA-Tci.mjs} +3 -3
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- 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-CqqhxcYH.js");
|
|
7
|
+
const require_process_memory = require("../process-memory-hQeELS5T.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-BS-l_k7M.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-CrDzHWbQ.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-BS-l_k7M.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-CqqhxcYH.js");
|
|
7
|
+
const require_node = require("../node-bdHZWpo1.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-CCFY8YLF.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-hQeELS5T.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-BS-l_k7M.mjs";
|
|
3
|
+
import { o as readProcessCost } from "../node-DjvGLcbe.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-DRTO2E6G.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-CrDzHWbQ.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";
|
|
@@ -5360,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5360
5360
|
var ZodFirstPartyTypeKind;
|
|
5361
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5362
5362
|
//#endregion
|
|
5363
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5364
5364
|
/**
|
|
5365
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5366
5366
|
* window to float samples (D455).
|
|
@@ -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-DBkl8q6V.mjs
|
|
7581
7581
|
var AUDIO_ENCODER_BY_CODEC = {
|
|
7582
7582
|
opus: "libopus",
|
|
7583
7583
|
aac: "aac",
|
|
@@ -7642,8 +7642,41 @@ function buildInputArgs(input, decodeHwAccel) {
|
|
|
7642
7642
|
args.push("-i", input.url);
|
|
7643
7643
|
return args;
|
|
7644
7644
|
}
|
|
7645
|
+
/**
|
|
7646
|
+
* Derive the output `-map` selectors. The three cases, in the order they are
|
|
7647
|
+
* decided:
|
|
7648
|
+
*
|
|
7649
|
+
* 1. **A filter graph** — the picture is the graph's declared video pad, and
|
|
7650
|
+
* the audio is its audio pad when it has one, otherwise input 0's mic. A
|
|
7651
|
+
* graph's output is not addressable any other way.
|
|
7652
|
+
* 2. **N inputs, no graph** — map input 0 EXPLICITLY. ffmpeg's own selection
|
|
7653
|
+
* picks the "best" stream across ALL inputs, so the egress would silently
|
|
7654
|
+
* become whichever camera happens to have the largest frame.
|
|
7655
|
+
* 3. **One input, no graph** — no `-map`. Anything else would change the argv
|
|
7656
|
+
* of every call site that exists today for no gain.
|
|
7657
|
+
*/
|
|
7658
|
+
function resolveStreamMaps(selection) {
|
|
7659
|
+
const graph = selection.filterGraph;
|
|
7660
|
+
if (graph) return {
|
|
7661
|
+
video: `[${graph.videoOutLabel}]`,
|
|
7662
|
+
audio: graph.audioOutLabel ? `[${graph.audioOutLabel}]` : "0:a:0?"
|
|
7663
|
+
};
|
|
7664
|
+
if (selection.extraInputs?.length) return {
|
|
7665
|
+
video: "0:v:0",
|
|
7666
|
+
audio: "0:a:0?"
|
|
7667
|
+
};
|
|
7668
|
+
return {
|
|
7669
|
+
video: null,
|
|
7670
|
+
audio: null
|
|
7671
|
+
};
|
|
7672
|
+
}
|
|
7645
7673
|
/** The `-vf` filter args, or `[]` when a consumer `-vf` already claims the slot. */
|
|
7646
|
-
function buildVideoFilterArgs(scale, outputArgs) {
|
|
7674
|
+
function buildVideoFilterArgs(scale, outputArgs, filterGraph) {
|
|
7675
|
+
if (filterGraph) {
|
|
7676
|
+
if (scale) throw new Error("FfmpegInvocation: video.scale cannot be combined with a filter graph — scale inside the graph instead (the -vf would feed an output the graph already feeds)");
|
|
7677
|
+
if (outputArgs.some((a) => a === "-vf")) throw new Error("FfmpegInvocation: outputArgs carries a -vf while a filter graph feeds the same output — fold the filter into the graph");
|
|
7678
|
+
return [];
|
|
7679
|
+
}
|
|
7647
7680
|
if (!scale) return [];
|
|
7648
7681
|
if (outputArgs.some((a) => a === "-vf")) return [];
|
|
7649
7682
|
if (scale.mode === "exact") return ["-vf", `scale=${scale.width}:${scale.height}`];
|
|
@@ -7667,14 +7700,17 @@ function buildRateControlArgs(video) {
|
|
|
7667
7700
|
];
|
|
7668
7701
|
}
|
|
7669
7702
|
/** The whole video block (`-vf` … `-c:v` … knobs), after `-i`. */
|
|
7670
|
-
function buildVideoArgs(video, outputArgs) {
|
|
7671
|
-
if (video.kind === "copy")
|
|
7672
|
-
"
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7703
|
+
function buildVideoArgs(video, outputArgs, filterGraph) {
|
|
7704
|
+
if (video.kind === "copy") {
|
|
7705
|
+
if (filterGraph) throw new Error("FfmpegInvocation: a filter graph produces a NEW picture, so video.kind must be `encode`");
|
|
7706
|
+
return [
|
|
7707
|
+
"-c:v",
|
|
7708
|
+
"copy",
|
|
7709
|
+
...video.bitstreamFilter ? ["-bsf:v", video.bitstreamFilter] : []
|
|
7710
|
+
];
|
|
7711
|
+
}
|
|
7676
7712
|
const args = [
|
|
7677
|
-
...buildVideoFilterArgs(video.scale, outputArgs),
|
|
7713
|
+
...buildVideoFilterArgs(video.scale, outputArgs, filterGraph),
|
|
7678
7714
|
"-c:v",
|
|
7679
7715
|
video.encoder
|
|
7680
7716
|
];
|
|
@@ -7829,20 +7865,39 @@ function buildAudioSidecarArgs(sidecar) {
|
|
|
7829
7865
|
* [<input.extraArgs>] │
|
|
7830
7866
|
* [-fflags <flag>…] │
|
|
7831
7867
|
* [-rtsp_transport tcp] │
|
|
7832
|
-
* -i <url> ─┘
|
|
7833
|
-
*
|
|
7868
|
+
* -i <url> ─┘ …repeated per extraInput
|
|
7869
|
+
* [-filter_complex <graph>] ─ global, after the LAST -i
|
|
7870
|
+
* [-map <video>] <video block> <threads> ─┐ OUTPUT options.
|
|
7871
|
+
* [-map <audio>] <audio block> │
|
|
7834
7872
|
* <consumer outputArgs verbatim> │
|
|
7835
7873
|
* <sink> ─┘ terminal
|
|
7874
|
+
*
|
|
7875
|
+
* The `-map`s are DERIVED (see {@link resolveStreamMaps}), never constants:
|
|
7876
|
+
* one input with no graph emits none at all, which is why the argv of every
|
|
7877
|
+
* call site that predates the N-input extension is unchanged to the byte.
|
|
7878
|
+
*
|
|
7879
|
+
* {@link FfmpegInvocation.audioSidecar} is the one map that stays literal
|
|
7880
|
+
* (`0:a:0?`): the sidecar is defined as the SOURCE's microphone on its own RTP
|
|
7881
|
+
* output, not as whatever the main output happens to carry.
|
|
7836
7882
|
*/
|
|
7837
7883
|
function buildFfmpegArgs(inv) {
|
|
7838
|
-
const
|
|
7884
|
+
const graph = inv.filterGraph ?? null;
|
|
7885
|
+
const head = [
|
|
7886
|
+
...logBannerArgs(inv.logLevel),
|
|
7887
|
+
...buildInputArgs(inv.input, inv.decodeHwAccel),
|
|
7888
|
+
...(inv.extraInputs ?? []).flatMap((extra) => buildInputArgs(extra, inv.decodeHwAccel)),
|
|
7889
|
+
...graph ? ["-filter_complex", graph.graph] : []
|
|
7890
|
+
];
|
|
7839
7891
|
const threadArgs = inv.threadCount > 0 ? ["-threads", String(inv.threadCount)] : [];
|
|
7892
|
+
const maps = resolveStreamMaps(inv);
|
|
7893
|
+
const videoMapArgs = maps.video ? ["-map", maps.video] : [];
|
|
7894
|
+
const audioMapArgs = maps.audio ? ["-map", maps.audio] : [];
|
|
7840
7895
|
if (inv.sink.kind === "rtp-outputs") {
|
|
7841
7896
|
const videoLeg = inv.sink.video ? [
|
|
7842
7897
|
"-an",
|
|
7843
7898
|
"-map",
|
|
7844
|
-
"0:v:0",
|
|
7845
|
-
...buildVideoArgs(inv.video, inv.outputArgs),
|
|
7899
|
+
maps.video ?? "0:v:0",
|
|
7900
|
+
...buildVideoArgs(inv.video, inv.outputArgs, graph),
|
|
7846
7901
|
...threadArgs,
|
|
7847
7902
|
...inv.outputArgs,
|
|
7848
7903
|
...buildRtpOutputArgs(inv.sink.video)
|
|
@@ -7850,7 +7905,7 @@ function buildFfmpegArgs(inv) {
|
|
|
7850
7905
|
const audioLeg = inv.sink.audio ? [
|
|
7851
7906
|
"-vn",
|
|
7852
7907
|
"-map",
|
|
7853
|
-
"0:a:0?",
|
|
7908
|
+
maps.audio ?? "0:a:0?",
|
|
7854
7909
|
...buildAudioArgs(inv.audio),
|
|
7855
7910
|
...buildRtpOutputArgs(inv.sink.audio)
|
|
7856
7911
|
] : [];
|
|
@@ -7860,15 +7915,17 @@ function buildFfmpegArgs(inv) {
|
|
|
7860
7915
|
...audioLeg
|
|
7861
7916
|
];
|
|
7862
7917
|
}
|
|
7918
|
+
const mutedAudio = isElementaryVideoSink(inv.sink) || inv.audio.kind === "none";
|
|
7863
7919
|
const audioArgs = isElementaryVideoSink(inv.sink) ? ["-an"] : buildAudioArgs(inv.audio);
|
|
7864
|
-
const sinkArgs = buildStdoutOrRtspSinkArgs(inv.sink);
|
|
7865
7920
|
return [
|
|
7866
7921
|
...head,
|
|
7867
|
-
...
|
|
7922
|
+
...videoMapArgs,
|
|
7923
|
+
...buildVideoArgs(inv.video, inv.outputArgs, graph),
|
|
7868
7924
|
...threadArgs,
|
|
7925
|
+
...mutedAudio ? [] : audioMapArgs,
|
|
7869
7926
|
...audioArgs,
|
|
7870
7927
|
...inv.outputArgs,
|
|
7871
|
-
...
|
|
7928
|
+
...buildStdoutOrRtspSinkArgs(inv.sink),
|
|
7872
7929
|
...inv.audioSidecar ? buildAudioSidecarArgs(inv.audioSidecar) : []
|
|
7873
7930
|
];
|
|
7874
7931
|
}
|
|
@@ -31972,14 +32029,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
31972
32029
|
kind: "mutation",
|
|
31973
32030
|
auth: "admin"
|
|
31974
32031
|
});
|
|
32032
|
+
/**
|
|
32033
|
+
* What a preset id DOES on this camera.
|
|
32034
|
+
*
|
|
32035
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
32036
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
32037
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
32038
|
+
* firmware:
|
|
32039
|
+
*
|
|
32040
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
32041
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
32042
|
+
* 95 Call OSD menu
|
|
32043
|
+
*
|
|
32044
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
32045
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
32046
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
32047
|
+
* operator as a transport failure.
|
|
32048
|
+
*
|
|
32049
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
32050
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
32051
|
+
* `deletePreset` are gated.
|
|
32052
|
+
*/
|
|
32053
|
+
var PtzPresetFunctionSchema = _enum([
|
|
32054
|
+
"home",
|
|
32055
|
+
"day-mode",
|
|
32056
|
+
"night-mode",
|
|
32057
|
+
"day-night-auto",
|
|
32058
|
+
"set-limits",
|
|
32059
|
+
"save-limits",
|
|
32060
|
+
"reboot",
|
|
32061
|
+
"osd-menu"
|
|
32062
|
+
]);
|
|
31975
32063
|
var PtzPresetSchema = object({
|
|
31976
32064
|
id: string(),
|
|
31977
|
-
name: string()
|
|
32065
|
+
name: string(),
|
|
32066
|
+
/**
|
|
32067
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
32068
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
32069
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
32070
|
+
*/
|
|
32071
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
32072
|
+
/**
|
|
32073
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
32074
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
32075
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
32076
|
+
*/
|
|
32077
|
+
writable: boolean()
|
|
31978
32078
|
});
|
|
32079
|
+
/**
|
|
32080
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
32081
|
+
* read it.
|
|
32082
|
+
*
|
|
32083
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
32084
|
+
* position no way to say so. All four said `0`:
|
|
32085
|
+
*
|
|
32086
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
32087
|
+
* path lands upstream"
|
|
32088
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
32089
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
32090
|
+
* onvif throws
|
|
32091
|
+
*
|
|
32092
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
32093
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
32094
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
32095
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
32096
|
+
* headroom", which evacuated a healthy disk.
|
|
32097
|
+
*
|
|
32098
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
32099
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
32100
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
32101
|
+
* tells callers to migrate to.
|
|
32102
|
+
*/
|
|
31979
32103
|
var PtzPositionSchema = object({
|
|
31980
|
-
pan: number(),
|
|
31981
|
-
tilt: number(),
|
|
31982
|
-
zoom: number()
|
|
32104
|
+
pan: number().nullable(),
|
|
32105
|
+
tilt: number().nullable(),
|
|
32106
|
+
zoom: number().nullable()
|
|
31983
32107
|
});
|
|
31984
32108
|
var PtzMoveCommandSchema = object({
|
|
31985
32109
|
pan: number().optional(),
|
|
@@ -31998,7 +32122,72 @@ var PtzOptionsSchema = object({
|
|
|
31998
32122
|
maxPresets: number().optional(),
|
|
31999
32123
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
32000
32124
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
32001
|
-
hasAutofocus: boolean()
|
|
32125
|
+
hasAutofocus: boolean(),
|
|
32126
|
+
/**
|
|
32127
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
32128
|
+
*
|
|
32129
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
32130
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
32131
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
32132
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
32133
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
32134
|
+
* the knob it is turning.
|
|
32135
|
+
*
|
|
32136
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
32137
|
+
* a float). Never a made-up number.
|
|
32138
|
+
*/
|
|
32139
|
+
speedSteps: number().int().positive().nullable(),
|
|
32140
|
+
/**
|
|
32141
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
32142
|
+
*
|
|
32143
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
32144
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
32145
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
32146
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
32147
|
+
* gain to be divided into.
|
|
32148
|
+
*
|
|
32149
|
+
* `null` = the driver cannot say.
|
|
32150
|
+
*/
|
|
32151
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
32152
|
+
});
|
|
32153
|
+
/**
|
|
32154
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
32155
|
+
*
|
|
32156
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
32157
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
32158
|
+
* not one of the three cameras honours its own:
|
|
32159
|
+
*
|
|
32160
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
32161
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
32162
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
32163
|
+
*
|
|
32164
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
32165
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
32166
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
32167
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
32168
|
+
*
|
|
32169
|
+
* `source` is what makes it honest:
|
|
32170
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
32171
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
32172
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
32173
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
32174
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
32175
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
32176
|
+
* no picker.
|
|
32177
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
32178
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
32179
|
+
*
|
|
32180
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
32181
|
+
* native case has no preset and homes perfectly well.
|
|
32182
|
+
*/
|
|
32183
|
+
var PtzHomePresetSchema = object({
|
|
32184
|
+
presetId: string().nullable(),
|
|
32185
|
+
source: _enum([
|
|
32186
|
+
"operator",
|
|
32187
|
+
"firmware",
|
|
32188
|
+
"native",
|
|
32189
|
+
"none"
|
|
32190
|
+
])
|
|
32002
32191
|
});
|
|
32003
32192
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
32004
32193
|
deviceId: number(),
|
|
@@ -32016,7 +32205,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
32016
32205
|
}), _void(), {
|
|
32017
32206
|
kind: "mutation",
|
|
32018
32207
|
auth: "admin"
|
|
32019
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
32208
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
32209
|
+
deviceId: number(),
|
|
32210
|
+
presetId: string().nullable()
|
|
32211
|
+
}), _void(), {
|
|
32212
|
+
kind: "mutation",
|
|
32213
|
+
auth: "admin"
|
|
32214
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
32020
32215
|
deviceId: number(),
|
|
32021
32216
|
enabled: boolean()
|
|
32022
32217
|
}), _void(), { kind: "mutation" });
|
|
@@ -39445,6 +39640,12 @@ Object.freeze({
|
|
|
39445
39640
|
addonId: null,
|
|
39446
39641
|
access: "delete"
|
|
39447
39642
|
},
|
|
39643
|
+
"ptz.getHomePreset": {
|
|
39644
|
+
capName: "ptz",
|
|
39645
|
+
capScope: "device",
|
|
39646
|
+
addonId: null,
|
|
39647
|
+
access: "view"
|
|
39648
|
+
},
|
|
39448
39649
|
"ptz.getOptions": {
|
|
39449
39650
|
capName: "ptz",
|
|
39450
39651
|
capScope: "device",
|
|
@@ -39493,6 +39694,12 @@ Object.freeze({
|
|
|
39493
39694
|
addonId: null,
|
|
39494
39695
|
access: "create"
|
|
39495
39696
|
},
|
|
39697
|
+
"ptz.setHomePreset": {
|
|
39698
|
+
capName: "ptz",
|
|
39699
|
+
capScope: "device",
|
|
39700
|
+
addonId: null,
|
|
39701
|
+
access: "create"
|
|
39702
|
+
},
|
|
39496
39703
|
"ptz.stop": {
|
|
39497
39704
|
capName: "ptz",
|
|
39498
39705
|
capScope: "device",
|
|
@@ -42666,6 +42873,11 @@ Object.freeze({
|
|
|
42666
42873
|
form: "single",
|
|
42667
42874
|
optional: false
|
|
42668
42875
|
}],
|
|
42876
|
+
"ptz.getHomePreset": [{
|
|
42877
|
+
name: "deviceId",
|
|
42878
|
+
form: "single",
|
|
42879
|
+
optional: false
|
|
42880
|
+
}],
|
|
42669
42881
|
"ptz.getOptions": [{
|
|
42670
42882
|
name: "deviceId",
|
|
42671
42883
|
form: "single",
|
|
@@ -42706,6 +42918,11 @@ Object.freeze({
|
|
|
42706
42918
|
form: "single",
|
|
42707
42919
|
optional: false
|
|
42708
42920
|
}],
|
|
42921
|
+
"ptz.setHomePreset": [{
|
|
42922
|
+
name: "deviceId",
|
|
42923
|
+
form: "single",
|
|
42924
|
+
optional: false
|
|
42925
|
+
}],
|
|
42709
42926
|
"ptz.stop": [{
|
|
42710
42927
|
name: "deviceId",
|
|
42711
42928
|
form: "single",
|