@camstack/addon-provider-hikvision 1.2.17 → 1.2.18

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/addon.js CHANGED
@@ -25588,13 +25588,24 @@ method(object({
25588
25588
  /** Playback-speed multiplier for the render (1 = realtime). */
25589
25589
  var ExportSpeedSchema = number().min(.25).max(32);
25590
25590
  /**
25591
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25591
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25592
25592
  *
25593
- * Relative and not absolute epoch on purpose: the renderer's frame-select
25594
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25595
- * playlist. Handing it absolute epochs would make every call site responsible
25596
- * for the same subtraction, and the one that forgot would emit a filter that
25597
- * selects nothing silently, as a uniform timelapse.
25593
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
25594
+ * derives these bounds from things that happened at a TIME (a track's
25595
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25596
+ * every segment present for the range, with each recording GAP removed. The
25597
+ * two agree only on a window that recorded without one interruption, and only
25598
+ * the render side knows the segments, so the translation lives there
25599
+ * (`export-dense-map.ts`, addon-pipeline).
25600
+ *
25601
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25602
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25603
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25604
+ * the video was a uniform timelapse, and the log line reported the five ranges
25605
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
25606
+ *
25607
+ * Relative and not absolute epoch, because an absolute epoch would make every
25608
+ * call site responsible for the same subtraction.
25598
25609
  */
25599
25610
  var ExportDenseRangeSchema = object({
25600
25611
  fromSec: number().nonnegative(),
@@ -34565,25 +34576,32 @@ object({
34565
34576
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
34566
34577
  object({
34567
34578
  /**
34568
- * How long a retained native frame is served before it counts as a miss.
34579
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
34580
+ * detection result.
34569
34581
  *
34570
- * Must cover the FULL late-crop horizon: detection inference + the
34571
- * cross-process inference-result hop to hub post-analysis + tracking + the
34572
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
34573
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
34574
- * RAM per busy camera grows linearly with no measured hit-rate gain.
34582
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
34583
+ * a time window was never related to the event the pixels were waiting for.
34584
+ * A held frame now lives from delivery until the runner has its `FrameResult`
34585
+ * at which moment the runner cuts the subject tiles it actually wanted and
34586
+ * releases the frame. The bound exists only so a runner that stops answering
34587
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
34588
+ *
34589
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
34590
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
34591
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
34592
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
34593
+ * `holdOverflow` on the metrics line is what says you need it.
34575
34594
  */
34576
- ttlMs: number().int().min(250).max(1e4),
34595
+ holdFrames: number().int().min(1).max(64),
34577
34596
  /**
34578
34597
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
34579
34598
  *
34580
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
34581
- * which one is actually binding before reasoning from that. At the shipped
34582
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
34583
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
34584
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
34585
- * change that admits fewer frames buys retention WINDOW at constant RAM
34586
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
34599
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
34600
+ * is what decides how much is held, and the ceiling is the number above which
34601
+ * something is wrong. Before that it was the effective cap at 1024 MB with
34602
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
34603
+ * with the TTL expiring nothing, which is exactly the confusion the hold
34604
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
34587
34605
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
34588
34606
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
34589
34607
  * to replace).
@@ -34609,22 +34627,45 @@ object({
34609
34627
  * there is the signal that some caller names frames outside the inference set
34610
34628
  * and that this must go back to `all`.
34611
34629
  */
34612
- admission: NativeLeaseAdmissionSchema
34630
+ admission: NativeLeaseAdmissionSchema,
34631
+ /**
34632
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
34633
+ * compressed native crops the worker cuts at the moment a frame's detection
34634
+ * result arrives, and keeps long after the frame itself is freed.
34635
+ *
34636
+ * This is the knob that replaced the old retention window, and it buys about
34637
+ * three orders of magnitude more of it: a tile is one subject at native
34638
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
34639
+ * the frame it was cut from. A frame on which nothing was detected costs
34640
+ * nothing at all, which is the real change — the old lease paid per FRAME and
34641
+ * was interrogated per SUBJECT.
34642
+ *
34643
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
34644
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34645
+ * reproduce that.
34646
+ */
34647
+ tileBudgetMb: number().int().min(0).max(1024)
34613
34648
  });
34614
34649
  /**
34615
- * The values in force when the operator has set nothing — byte-for-byte the
34616
- * constants the decode worker shipped with as env-var defaults, so making these
34617
- * settings changed no behaviour on the day it landed.
34650
+ * The values in force when the operator has set nothing.
34651
+ *
34652
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34653
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34654
+ * in the same change that redefines it would make a regression and a retune
34655
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34656
+ * live traffic.
34618
34657
  */
34619
34658
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
34620
- ttlMs: 1200,
34659
+ holdFrames: 8,
34621
34660
  budgetMb: 1024,
34622
34661
  activityMs: 15e3,
34662
+ tileBudgetMb: 64,
34623
34663
  admission: "inferred"
34624
34664
  };
34625
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34665
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34626
34666
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34627
34667
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34668
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
34628
34669
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34629
34670
  //#endregion
34630
34671
  //#region src/accessories/base.ts
package/dist/addon.mjs CHANGED
@@ -25589,13 +25589,24 @@ method(object({
25589
25589
  /** Playback-speed multiplier for the render (1 = realtime). */
25590
25590
  var ExportSpeedSchema = number().min(.25).max(32);
25591
25591
  /**
25592
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
25592
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
25593
25593
  *
25594
- * Relative and not absolute epoch on purpose: the renderer's frame-select
25595
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
25596
- * playlist. Handing it absolute epochs would make every call site responsible
25597
- * for the same subtraction, and the one that forgot would emit a filter that
25598
- * selects nothing silently, as a uniform timelapse.
25594
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
25595
+ * derives these bounds from things that happened at a TIME (a track's
25596
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25597
+ * every segment present for the range, with each recording GAP removed. The
25598
+ * two agree only on a window that recorded without one interruption, and only
25599
+ * the render side knows the segments, so the translation lives there
25600
+ * (`export-dense-map.ts`, addon-pipeline).
25601
+ *
25602
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
25603
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
25604
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
25605
+ * the video was a uniform timelapse, and the log line reported the five ranges
25606
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
25607
+ *
25608
+ * Relative and not absolute epoch, because an absolute epoch would make every
25609
+ * call site responsible for the same subtraction.
25599
25610
  */
25600
25611
  var ExportDenseRangeSchema = object({
25601
25612
  fromSec: number().nonnegative(),
@@ -34566,25 +34577,32 @@ object({
34566
34577
  var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
34567
34578
  object({
34568
34579
  /**
34569
- * How long a retained native frame is served before it counts as a miss.
34580
+ * How many delivered frames the worker HOLDS at once, waiting for each one's
34581
+ * detection result.
34570
34582
  *
34571
- * Must cover the FULL late-crop horizon: detection inference + the
34572
- * cross-process inference-result hop to hub post-analysis + tracking + the
34573
- * tRPC crop round-trip back. Below ~500 ms the busiest cameras' subject crops
34574
- * outrun it and fall back to the ≤640 detection frame; above ~3 s the resident
34575
- * RAM per busy camera grows linearly with no measured hit-rate gain.
34583
+ * This replaced a TTL on 2026-08-13, and the replacement is the whole point:
34584
+ * a time window was never related to the event the pixels were waiting for.
34585
+ * A held frame now lives from delivery until the runner has its `FrameResult`
34586
+ * at which moment the runner cuts the subject tiles it actually wanted and
34587
+ * releases the frame. The bound exists only so a runner that stops answering
34588
+ * cannot pin RAM: above it the OLDEST held frame is dropped and counted.
34589
+ *
34590
+ * Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
34591
+ * 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
34592
+ * without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
34593
+ * Raising it does not buy hit rate — it buys tolerance for a slow runner, and
34594
+ * `holdOverflow` on the metrics line is what says you need it.
34576
34595
  */
34577
- ttlMs: number().int().min(250).max(1e4),
34596
+ holdFrames: number().int().min(1).max(64),
34578
34597
  /**
34579
34598
  * Hard per-decode-worker RAM ceiling for retained native frames, in MB.
34580
34599
  *
34581
- * Intended as a SAFETY ceiling with the TTL as the effective cap — but check
34582
- * which one is actually binding before reasoning from that. At the shipped
34583
- * 1024 MB and a 2 800 ms TTL, a 4K camera hits the CEILING first (~43 frames
34584
- * at ~24 MB each) and the TTL never gets to expire anything; `leaseMb` /
34585
- * `leaseFrames` on the metrics line say which. When the ceiling binds, a
34586
- * change that admits fewer frames buys retention WINDOW at constant RAM
34587
- * rather than giving RAM back — lower this knob if RAM is what you wanted.
34600
+ * Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
34601
+ * is what decides how much is held, and the ceiling is the number above which
34602
+ * something is wrong. Before that it was the effective cap at 1024 MB with
34603
+ * a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
34604
+ * with the TTL expiring nothing, which is exactly the confusion the hold
34605
+ * removes. `leaseMb` / `leaseFrames` still say what is resident.
34588
34606
  * `0` DISABLES the lease entirely and falls the worker back to the tiny
34589
34607
  * leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
34590
34608
  * to replace).
@@ -34610,22 +34628,45 @@ object({
34610
34628
  * there is the signal that some caller names frames outside the inference set
34611
34629
  * and that this must go back to `all`.
34612
34630
  */
34613
- admission: NativeLeaseAdmissionSchema
34631
+ admission: NativeLeaseAdmissionSchema,
34632
+ /**
34633
+ * RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
34634
+ * compressed native crops the worker cuts at the moment a frame's detection
34635
+ * result arrives, and keeps long after the frame itself is freed.
34636
+ *
34637
+ * This is the knob that replaced the old retention window, and it buys about
34638
+ * three orders of magnitude more of it: a tile is one subject at native
34639
+ * resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
34640
+ * the frame it was cut from. A frame on which nothing was detected costs
34641
+ * nothing at all, which is the real change — the old lease paid per FRAME and
34642
+ * was interrogated per SUBJECT.
34643
+ *
34644
+ * `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
34645
+ * fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
34646
+ * reproduce that.
34647
+ */
34648
+ tileBudgetMb: number().int().min(0).max(1024)
34614
34649
  });
34615
34650
  /**
34616
- * The values in force when the operator has set nothing — byte-for-byte the
34617
- * constants the decode worker shipped with as env-var defaults, so making these
34618
- * settings changed no behaviour on the day it landed.
34651
+ * The values in force when the operator has set nothing.
34652
+ *
34653
+ * `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
34654
+ * being the retention window and became the OOM ceiling, and lowering a ceiling
34655
+ * in the same change that redefines it would make a regression and a retune
34656
+ * indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
34657
+ * live traffic.
34619
34658
  */
34620
34659
  var DEFAULT_NATIVE_LEASE_SETTINGS = {
34621
- ttlMs: 1200,
34660
+ holdFrames: 8,
34622
34661
  budgetMb: 1024,
34623
34662
  activityMs: 15e3,
34663
+ tileBudgetMb: 64,
34624
34664
  admission: "inferred"
34625
34665
  };
34626
- DEFAULT_NATIVE_LEASE_SETTINGS.ttlMs;
34666
+ DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
34627
34667
  DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
34628
34668
  DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
34669
+ DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
34629
34670
  DEFAULT_NATIVE_LEASE_SETTINGS.admission;
34630
34671
  //#endregion
34631
34672
  //#region src/accessories/base.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",