@camstack/addon-decoder-nodeav 1.2.110 → 1.2.112
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/index.js +209 -7
- package/dist/index.mjs +209 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5364,7 +5364,7 @@ var ZodIssueCode = {
|
|
|
5364
5364
|
var ZodFirstPartyTypeKind;
|
|
5365
5365
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5366
5366
|
//#endregion
|
|
5367
|
-
//#region ../types/dist/sleep-
|
|
5367
|
+
//#region ../types/dist/sleep-vl6nBE8d.mjs
|
|
5368
5368
|
/**
|
|
5369
5369
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5370
5370
|
* window to float samples (D455).
|
|
@@ -28832,14 +28832,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28832
28832
|
kind: "mutation",
|
|
28833
28833
|
auth: "admin"
|
|
28834
28834
|
});
|
|
28835
|
+
/**
|
|
28836
|
+
* What a preset id DOES on this camera.
|
|
28837
|
+
*
|
|
28838
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28839
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28840
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28841
|
+
* firmware:
|
|
28842
|
+
*
|
|
28843
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28844
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28845
|
+
* 95 Call OSD menu
|
|
28846
|
+
*
|
|
28847
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28848
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28849
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28850
|
+
* operator as a transport failure.
|
|
28851
|
+
*
|
|
28852
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28853
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28854
|
+
* `deletePreset` are gated.
|
|
28855
|
+
*/
|
|
28856
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28857
|
+
"home",
|
|
28858
|
+
"day-mode",
|
|
28859
|
+
"night-mode",
|
|
28860
|
+
"day-night-auto",
|
|
28861
|
+
"set-limits",
|
|
28862
|
+
"save-limits",
|
|
28863
|
+
"reboot",
|
|
28864
|
+
"osd-menu"
|
|
28865
|
+
]);
|
|
28835
28866
|
var PtzPresetSchema = object({
|
|
28836
28867
|
id: string(),
|
|
28837
|
-
name: string()
|
|
28868
|
+
name: string(),
|
|
28869
|
+
/**
|
|
28870
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28871
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28872
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28873
|
+
*/
|
|
28874
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28875
|
+
/**
|
|
28876
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28877
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28878
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28879
|
+
*/
|
|
28880
|
+
writable: boolean()
|
|
28838
28881
|
});
|
|
28882
|
+
/**
|
|
28883
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28884
|
+
* read it.
|
|
28885
|
+
*
|
|
28886
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28887
|
+
* position no way to say so. All four said `0`:
|
|
28888
|
+
*
|
|
28889
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28890
|
+
* path lands upstream"
|
|
28891
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28892
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28893
|
+
* onvif throws
|
|
28894
|
+
*
|
|
28895
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28896
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28897
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28898
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28899
|
+
* headroom", which evacuated a healthy disk.
|
|
28900
|
+
*
|
|
28901
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28902
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28903
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28904
|
+
* tells callers to migrate to.
|
|
28905
|
+
*/
|
|
28839
28906
|
var PtzPositionSchema = object({
|
|
28840
|
-
pan: number(),
|
|
28841
|
-
tilt: number(),
|
|
28842
|
-
zoom: number()
|
|
28907
|
+
pan: number().nullable(),
|
|
28908
|
+
tilt: number().nullable(),
|
|
28909
|
+
zoom: number().nullable()
|
|
28843
28910
|
});
|
|
28844
28911
|
var PtzMoveCommandSchema = object({
|
|
28845
28912
|
pan: number().optional(),
|
|
@@ -28858,7 +28925,72 @@ var PtzOptionsSchema = object({
|
|
|
28858
28925
|
maxPresets: number().optional(),
|
|
28859
28926
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28860
28927
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28861
|
-
hasAutofocus: boolean()
|
|
28928
|
+
hasAutofocus: boolean(),
|
|
28929
|
+
/**
|
|
28930
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28931
|
+
*
|
|
28932
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28933
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28934
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28935
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28936
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28937
|
+
* the knob it is turning.
|
|
28938
|
+
*
|
|
28939
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28940
|
+
* a float). Never a made-up number.
|
|
28941
|
+
*/
|
|
28942
|
+
speedSteps: number().int().positive().nullable(),
|
|
28943
|
+
/**
|
|
28944
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28945
|
+
*
|
|
28946
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28947
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28948
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28949
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28950
|
+
* gain to be divided into.
|
|
28951
|
+
*
|
|
28952
|
+
* `null` = the driver cannot say.
|
|
28953
|
+
*/
|
|
28954
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28955
|
+
});
|
|
28956
|
+
/**
|
|
28957
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28958
|
+
*
|
|
28959
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28960
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28961
|
+
* not one of the three cameras honours its own:
|
|
28962
|
+
*
|
|
28963
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28964
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28965
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28966
|
+
*
|
|
28967
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28968
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28969
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28970
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28971
|
+
*
|
|
28972
|
+
* `source` is what makes it honest:
|
|
28973
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28974
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28975
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28976
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28977
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28978
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28979
|
+
* no picker.
|
|
28980
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28981
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28982
|
+
*
|
|
28983
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28984
|
+
* native case has no preset and homes perfectly well.
|
|
28985
|
+
*/
|
|
28986
|
+
var PtzHomePresetSchema = object({
|
|
28987
|
+
presetId: string().nullable(),
|
|
28988
|
+
source: _enum([
|
|
28989
|
+
"operator",
|
|
28990
|
+
"firmware",
|
|
28991
|
+
"native",
|
|
28992
|
+
"none"
|
|
28993
|
+
])
|
|
28862
28994
|
});
|
|
28863
28995
|
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({
|
|
28864
28996
|
deviceId: number(),
|
|
@@ -28876,7 +29008,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28876
29008
|
}), _void(), {
|
|
28877
29009
|
kind: "mutation",
|
|
28878
29010
|
auth: "admin"
|
|
28879
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
29011
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
29012
|
+
deviceId: number(),
|
|
29013
|
+
presetId: string().nullable()
|
|
29014
|
+
}), _void(), {
|
|
29015
|
+
kind: "mutation",
|
|
29016
|
+
auth: "admin"
|
|
29017
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
29018
|
+
kind: "mutation",
|
|
29019
|
+
auth: "admin"
|
|
29020
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
29021
|
+
deviceId: number(),
|
|
29022
|
+
seconds: number().int().min(0).max(3600)
|
|
29023
|
+
}), _void(), {
|
|
29024
|
+
kind: "mutation",
|
|
29025
|
+
auth: "admin"
|
|
29026
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28880
29027
|
deviceId: number(),
|
|
28881
29028
|
enabled: boolean()
|
|
28882
29029
|
}), _void(), { kind: "mutation" });
|
|
@@ -35879,6 +36026,12 @@ Object.freeze({
|
|
|
35879
36026
|
addonId: null,
|
|
35880
36027
|
access: "create"
|
|
35881
36028
|
},
|
|
36029
|
+
"ptz.captureHomeHere": {
|
|
36030
|
+
capName: "ptz",
|
|
36031
|
+
capScope: "device",
|
|
36032
|
+
addonId: null,
|
|
36033
|
+
access: "create"
|
|
36034
|
+
},
|
|
35882
36035
|
"ptz.continuousMove": {
|
|
35883
36036
|
capName: "ptz",
|
|
35884
36037
|
capScope: "device",
|
|
@@ -35891,6 +36044,18 @@ Object.freeze({
|
|
|
35891
36044
|
addonId: null,
|
|
35892
36045
|
access: "delete"
|
|
35893
36046
|
},
|
|
36047
|
+
"ptz.getHomePreset": {
|
|
36048
|
+
capName: "ptz",
|
|
36049
|
+
capScope: "device",
|
|
36050
|
+
addonId: null,
|
|
36051
|
+
access: "view"
|
|
36052
|
+
},
|
|
36053
|
+
"ptz.getHomeReturnSeconds": {
|
|
36054
|
+
capName: "ptz",
|
|
36055
|
+
capScope: "device",
|
|
36056
|
+
addonId: null,
|
|
36057
|
+
access: "view"
|
|
36058
|
+
},
|
|
35894
36059
|
"ptz.getOptions": {
|
|
35895
36060
|
capName: "ptz",
|
|
35896
36061
|
capScope: "device",
|
|
@@ -35939,6 +36104,18 @@ Object.freeze({
|
|
|
35939
36104
|
addonId: null,
|
|
35940
36105
|
access: "create"
|
|
35941
36106
|
},
|
|
36107
|
+
"ptz.setHomePreset": {
|
|
36108
|
+
capName: "ptz",
|
|
36109
|
+
capScope: "device",
|
|
36110
|
+
addonId: null,
|
|
36111
|
+
access: "create"
|
|
36112
|
+
},
|
|
36113
|
+
"ptz.setHomeReturnSeconds": {
|
|
36114
|
+
capName: "ptz",
|
|
36115
|
+
capScope: "device",
|
|
36116
|
+
addonId: null,
|
|
36117
|
+
access: "create"
|
|
36118
|
+
},
|
|
35942
36119
|
"ptz.stop": {
|
|
35943
36120
|
capName: "ptz",
|
|
35944
36121
|
capScope: "device",
|
|
@@ -39102,6 +39279,11 @@ Object.freeze({
|
|
|
39102
39279
|
form: "single",
|
|
39103
39280
|
optional: false
|
|
39104
39281
|
}],
|
|
39282
|
+
"ptz.captureHomeHere": [{
|
|
39283
|
+
name: "deviceId",
|
|
39284
|
+
form: "single",
|
|
39285
|
+
optional: false
|
|
39286
|
+
}],
|
|
39105
39287
|
"ptz.continuousMove": [{
|
|
39106
39288
|
name: "deviceId",
|
|
39107
39289
|
form: "single",
|
|
@@ -39112,6 +39294,16 @@ Object.freeze({
|
|
|
39112
39294
|
form: "single",
|
|
39113
39295
|
optional: false
|
|
39114
39296
|
}],
|
|
39297
|
+
"ptz.getHomePreset": [{
|
|
39298
|
+
name: "deviceId",
|
|
39299
|
+
form: "single",
|
|
39300
|
+
optional: false
|
|
39301
|
+
}],
|
|
39302
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39303
|
+
name: "deviceId",
|
|
39304
|
+
form: "single",
|
|
39305
|
+
optional: false
|
|
39306
|
+
}],
|
|
39115
39307
|
"ptz.getOptions": [{
|
|
39116
39308
|
name: "deviceId",
|
|
39117
39309
|
form: "single",
|
|
@@ -39152,6 +39344,16 @@ Object.freeze({
|
|
|
39152
39344
|
form: "single",
|
|
39153
39345
|
optional: false
|
|
39154
39346
|
}],
|
|
39347
|
+
"ptz.setHomePreset": [{
|
|
39348
|
+
name: "deviceId",
|
|
39349
|
+
form: "single",
|
|
39350
|
+
optional: false
|
|
39351
|
+
}],
|
|
39352
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39353
|
+
name: "deviceId",
|
|
39354
|
+
form: "single",
|
|
39355
|
+
optional: false
|
|
39356
|
+
}],
|
|
39155
39357
|
"ptz.stop": [{
|
|
39156
39358
|
name: "deviceId",
|
|
39157
39359
|
form: "single",
|
package/dist/index.mjs
CHANGED
|
@@ -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-vl6nBE8d.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).
|
|
@@ -28828,14 +28828,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28828
28828
|
kind: "mutation",
|
|
28829
28829
|
auth: "admin"
|
|
28830
28830
|
});
|
|
28831
|
+
/**
|
|
28832
|
+
* What a preset id DOES on this camera.
|
|
28833
|
+
*
|
|
28834
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28835
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28836
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28837
|
+
* firmware:
|
|
28838
|
+
*
|
|
28839
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28840
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28841
|
+
* 95 Call OSD menu
|
|
28842
|
+
*
|
|
28843
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28844
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28845
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28846
|
+
* operator as a transport failure.
|
|
28847
|
+
*
|
|
28848
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28849
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28850
|
+
* `deletePreset` are gated.
|
|
28851
|
+
*/
|
|
28852
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28853
|
+
"home",
|
|
28854
|
+
"day-mode",
|
|
28855
|
+
"night-mode",
|
|
28856
|
+
"day-night-auto",
|
|
28857
|
+
"set-limits",
|
|
28858
|
+
"save-limits",
|
|
28859
|
+
"reboot",
|
|
28860
|
+
"osd-menu"
|
|
28861
|
+
]);
|
|
28831
28862
|
var PtzPresetSchema = object({
|
|
28832
28863
|
id: string(),
|
|
28833
|
-
name: string()
|
|
28864
|
+
name: string(),
|
|
28865
|
+
/**
|
|
28866
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28867
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28868
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28869
|
+
*/
|
|
28870
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28871
|
+
/**
|
|
28872
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28873
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28874
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28875
|
+
*/
|
|
28876
|
+
writable: boolean()
|
|
28834
28877
|
});
|
|
28878
|
+
/**
|
|
28879
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28880
|
+
* read it.
|
|
28881
|
+
*
|
|
28882
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28883
|
+
* position no way to say so. All four said `0`:
|
|
28884
|
+
*
|
|
28885
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28886
|
+
* path lands upstream"
|
|
28887
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28888
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28889
|
+
* onvif throws
|
|
28890
|
+
*
|
|
28891
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28892
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28893
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28894
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28895
|
+
* headroom", which evacuated a healthy disk.
|
|
28896
|
+
*
|
|
28897
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28898
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28899
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28900
|
+
* tells callers to migrate to.
|
|
28901
|
+
*/
|
|
28835
28902
|
var PtzPositionSchema = object({
|
|
28836
|
-
pan: number(),
|
|
28837
|
-
tilt: number(),
|
|
28838
|
-
zoom: number()
|
|
28903
|
+
pan: number().nullable(),
|
|
28904
|
+
tilt: number().nullable(),
|
|
28905
|
+
zoom: number().nullable()
|
|
28839
28906
|
});
|
|
28840
28907
|
var PtzMoveCommandSchema = object({
|
|
28841
28908
|
pan: number().optional(),
|
|
@@ -28854,7 +28921,72 @@ var PtzOptionsSchema = object({
|
|
|
28854
28921
|
maxPresets: number().optional(),
|
|
28855
28922
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28856
28923
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28857
|
-
hasAutofocus: boolean()
|
|
28924
|
+
hasAutofocus: boolean(),
|
|
28925
|
+
/**
|
|
28926
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28927
|
+
*
|
|
28928
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28929
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28930
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28931
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28932
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28933
|
+
* the knob it is turning.
|
|
28934
|
+
*
|
|
28935
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28936
|
+
* a float). Never a made-up number.
|
|
28937
|
+
*/
|
|
28938
|
+
speedSteps: number().int().positive().nullable(),
|
|
28939
|
+
/**
|
|
28940
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28941
|
+
*
|
|
28942
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28943
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28944
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28945
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28946
|
+
* gain to be divided into.
|
|
28947
|
+
*
|
|
28948
|
+
* `null` = the driver cannot say.
|
|
28949
|
+
*/
|
|
28950
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28951
|
+
});
|
|
28952
|
+
/**
|
|
28953
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28954
|
+
*
|
|
28955
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28956
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28957
|
+
* not one of the three cameras honours its own:
|
|
28958
|
+
*
|
|
28959
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28960
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28961
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28962
|
+
*
|
|
28963
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28964
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28965
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28966
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28967
|
+
*
|
|
28968
|
+
* `source` is what makes it honest:
|
|
28969
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28970
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28971
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28972
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28973
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28974
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28975
|
+
* no picker.
|
|
28976
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28977
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28978
|
+
*
|
|
28979
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28980
|
+
* native case has no preset and homes perfectly well.
|
|
28981
|
+
*/
|
|
28982
|
+
var PtzHomePresetSchema = object({
|
|
28983
|
+
presetId: string().nullable(),
|
|
28984
|
+
source: _enum([
|
|
28985
|
+
"operator",
|
|
28986
|
+
"firmware",
|
|
28987
|
+
"native",
|
|
28988
|
+
"none"
|
|
28989
|
+
])
|
|
28858
28990
|
});
|
|
28859
28991
|
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({
|
|
28860
28992
|
deviceId: number(),
|
|
@@ -28872,7 +29004,22 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28872
29004
|
}), _void(), {
|
|
28873
29005
|
kind: "mutation",
|
|
28874
29006
|
auth: "admin"
|
|
28875
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
29007
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
29008
|
+
deviceId: number(),
|
|
29009
|
+
presetId: string().nullable()
|
|
29010
|
+
}), _void(), {
|
|
29011
|
+
kind: "mutation",
|
|
29012
|
+
auth: "admin"
|
|
29013
|
+
}), method(object({ deviceId: number() }), _void(), {
|
|
29014
|
+
kind: "mutation",
|
|
29015
|
+
auth: "admin"
|
|
29016
|
+
}), method(object({ deviceId: number() }), number().int().nullable()), method(object({
|
|
29017
|
+
deviceId: number(),
|
|
29018
|
+
seconds: number().int().min(0).max(3600)
|
|
29019
|
+
}), _void(), {
|
|
29020
|
+
kind: "mutation",
|
|
29021
|
+
auth: "admin"
|
|
29022
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28876
29023
|
deviceId: number(),
|
|
28877
29024
|
enabled: boolean()
|
|
28878
29025
|
}), _void(), { kind: "mutation" });
|
|
@@ -35875,6 +36022,12 @@ Object.freeze({
|
|
|
35875
36022
|
addonId: null,
|
|
35876
36023
|
access: "create"
|
|
35877
36024
|
},
|
|
36025
|
+
"ptz.captureHomeHere": {
|
|
36026
|
+
capName: "ptz",
|
|
36027
|
+
capScope: "device",
|
|
36028
|
+
addonId: null,
|
|
36029
|
+
access: "create"
|
|
36030
|
+
},
|
|
35878
36031
|
"ptz.continuousMove": {
|
|
35879
36032
|
capName: "ptz",
|
|
35880
36033
|
capScope: "device",
|
|
@@ -35887,6 +36040,18 @@ Object.freeze({
|
|
|
35887
36040
|
addonId: null,
|
|
35888
36041
|
access: "delete"
|
|
35889
36042
|
},
|
|
36043
|
+
"ptz.getHomePreset": {
|
|
36044
|
+
capName: "ptz",
|
|
36045
|
+
capScope: "device",
|
|
36046
|
+
addonId: null,
|
|
36047
|
+
access: "view"
|
|
36048
|
+
},
|
|
36049
|
+
"ptz.getHomeReturnSeconds": {
|
|
36050
|
+
capName: "ptz",
|
|
36051
|
+
capScope: "device",
|
|
36052
|
+
addonId: null,
|
|
36053
|
+
access: "view"
|
|
36054
|
+
},
|
|
35890
36055
|
"ptz.getOptions": {
|
|
35891
36056
|
capName: "ptz",
|
|
35892
36057
|
capScope: "device",
|
|
@@ -35935,6 +36100,18 @@ Object.freeze({
|
|
|
35935
36100
|
addonId: null,
|
|
35936
36101
|
access: "create"
|
|
35937
36102
|
},
|
|
36103
|
+
"ptz.setHomePreset": {
|
|
36104
|
+
capName: "ptz",
|
|
36105
|
+
capScope: "device",
|
|
36106
|
+
addonId: null,
|
|
36107
|
+
access: "create"
|
|
36108
|
+
},
|
|
36109
|
+
"ptz.setHomeReturnSeconds": {
|
|
36110
|
+
capName: "ptz",
|
|
36111
|
+
capScope: "device",
|
|
36112
|
+
addonId: null,
|
|
36113
|
+
access: "create"
|
|
36114
|
+
},
|
|
35938
36115
|
"ptz.stop": {
|
|
35939
36116
|
capName: "ptz",
|
|
35940
36117
|
capScope: "device",
|
|
@@ -39098,6 +39275,11 @@ Object.freeze({
|
|
|
39098
39275
|
form: "single",
|
|
39099
39276
|
optional: false
|
|
39100
39277
|
}],
|
|
39278
|
+
"ptz.captureHomeHere": [{
|
|
39279
|
+
name: "deviceId",
|
|
39280
|
+
form: "single",
|
|
39281
|
+
optional: false
|
|
39282
|
+
}],
|
|
39101
39283
|
"ptz.continuousMove": [{
|
|
39102
39284
|
name: "deviceId",
|
|
39103
39285
|
form: "single",
|
|
@@ -39108,6 +39290,16 @@ Object.freeze({
|
|
|
39108
39290
|
form: "single",
|
|
39109
39291
|
optional: false
|
|
39110
39292
|
}],
|
|
39293
|
+
"ptz.getHomePreset": [{
|
|
39294
|
+
name: "deviceId",
|
|
39295
|
+
form: "single",
|
|
39296
|
+
optional: false
|
|
39297
|
+
}],
|
|
39298
|
+
"ptz.getHomeReturnSeconds": [{
|
|
39299
|
+
name: "deviceId",
|
|
39300
|
+
form: "single",
|
|
39301
|
+
optional: false
|
|
39302
|
+
}],
|
|
39111
39303
|
"ptz.getOptions": [{
|
|
39112
39304
|
name: "deviceId",
|
|
39113
39305
|
form: "single",
|
|
@@ -39148,6 +39340,16 @@ Object.freeze({
|
|
|
39148
39340
|
form: "single",
|
|
39149
39341
|
optional: false
|
|
39150
39342
|
}],
|
|
39343
|
+
"ptz.setHomePreset": [{
|
|
39344
|
+
name: "deviceId",
|
|
39345
|
+
form: "single",
|
|
39346
|
+
optional: false
|
|
39347
|
+
}],
|
|
39348
|
+
"ptz.setHomeReturnSeconds": [{
|
|
39349
|
+
name: "deviceId",
|
|
39350
|
+
form: "single",
|
|
39351
|
+
optional: false
|
|
39352
|
+
}],
|
|
39151
39353
|
"ptz.stop": [{
|
|
39152
39354
|
name: "deviceId",
|
|
39153
39355
|
form: "single",
|