@camstack/addon-decoder-nodeav 1.2.37 → 1.2.39
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 +174 -3
- package/dist/index.mjs +174 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13333,6 +13333,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
13333
13333
|
limit: number().optional(),
|
|
13334
13334
|
tags: record(string(), string()).optional()
|
|
13335
13335
|
}), array(LogEntrySchema).readonly());
|
|
13336
|
+
/**
|
|
13337
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13338
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13339
|
+
*
|
|
13340
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13341
|
+
*
|
|
13342
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13343
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13344
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13345
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13346
|
+
* somebody to forget to edit.
|
|
13347
|
+
*
|
|
13348
|
+
* They are not merged, because their invariants are opposites:
|
|
13349
|
+
*
|
|
13350
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13351
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13352
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13353
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13354
|
+
* and it is exactly what an absent entry cannot say.
|
|
13355
|
+
*
|
|
13356
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13357
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13358
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13359
|
+
* has no process.
|
|
13360
|
+
*
|
|
13361
|
+
* ## Why not a log line, since the counters already exist
|
|
13362
|
+
*
|
|
13363
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13364
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13365
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13366
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13367
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13368
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13369
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13370
|
+
* be READ.
|
|
13371
|
+
*
|
|
13372
|
+
* ## The rate is served with its denominator or not at all
|
|
13373
|
+
*
|
|
13374
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13375
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13376
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13377
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13378
|
+
* reproduces that mistake on every read.
|
|
13379
|
+
*
|
|
13380
|
+
* ## Shape
|
|
13381
|
+
*
|
|
13382
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13383
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13384
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13385
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13386
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13387
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13388
|
+
* result through `system.getFailureContributions`.
|
|
13389
|
+
*/
|
|
13390
|
+
var FailureReasonCountSchema = object({
|
|
13391
|
+
/**
|
|
13392
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13393
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13394
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13395
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13396
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13397
|
+
* un-joinable.
|
|
13398
|
+
*/
|
|
13399
|
+
reason: string(),
|
|
13400
|
+
count: number().int().nonnegative()
|
|
13401
|
+
});
|
|
13402
|
+
var FailureContributionSchema = object({
|
|
13403
|
+
/**
|
|
13404
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13405
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13406
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13407
|
+
* is a central list that rots invisibly.
|
|
13408
|
+
*/
|
|
13409
|
+
family: string(),
|
|
13410
|
+
/**
|
|
13411
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13412
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13413
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13414
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13415
|
+
*/
|
|
13416
|
+
deviceId: number().int().positive(),
|
|
13417
|
+
/**
|
|
13418
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13419
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13420
|
+
* family has a single variant.
|
|
13421
|
+
*/
|
|
13422
|
+
variant: string().optional(),
|
|
13423
|
+
/**
|
|
13424
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13425
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13426
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13427
|
+
* `LoadContribution.startedAtMs`.
|
|
13428
|
+
*/
|
|
13429
|
+
sinceMs: number(),
|
|
13430
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13431
|
+
atMs: number(),
|
|
13432
|
+
/**
|
|
13433
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13434
|
+
* window. A failure count published without it is the mistake this schema
|
|
13435
|
+
* exists to make impossible.
|
|
13436
|
+
*/
|
|
13437
|
+
attempts: number().int().nonnegative(),
|
|
13438
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13439
|
+
succeeded: number().int().nonnegative(),
|
|
13440
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13441
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13442
|
+
});
|
|
13443
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13336
13444
|
var LoadContributionSchema = object({
|
|
13337
13445
|
role: _enum([
|
|
13338
13446
|
"decode",
|
|
@@ -17845,6 +17953,20 @@ var TrackSchema = object({
|
|
|
17845
17953
|
* `=== true` and render nothing otherwise — never infer "no rider".
|
|
17846
17954
|
*/
|
|
17847
17955
|
hasRider: boolean().optional(),
|
|
17956
|
+
/**
|
|
17957
|
+
* WHY this track ended without a NATIVE best-shot tile
|
|
17958
|
+
* ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
|
|
17959
|
+
* a composed token line (`no-key-frame capture=keyframe:native-missx4`,
|
|
17960
|
+
* `derive-returned-null tile=standin`, …) written at close and CLEARED by
|
|
17961
|
+
* the late-keyFrame upgrade when a native tile lands after all. The
|
|
17962
|
+
* operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
17963
|
+
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
17964
|
+
*
|
|
17965
|
+
* **Absent ≠ "missed silently"**: a row written before the column, a hub
|
|
17966
|
+
* that predates the field, and every track whose tile landed native all
|
|
17967
|
+
* omit it. Render nothing when absent.
|
|
17968
|
+
*/
|
|
17969
|
+
previewMissReason: string().optional(),
|
|
17848
17970
|
...TrackFlagFields,
|
|
17849
17971
|
...TrackRetrainFields
|
|
17850
17972
|
});
|
|
@@ -27071,6 +27193,13 @@ var LoggingSettingsPatchSchema = object({
|
|
|
27071
27193
|
* anyone but its owner.
|
|
27072
27194
|
*/
|
|
27073
27195
|
var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
|
|
27196
|
+
/**
|
|
27197
|
+
* One per-camera failure counter, plus WHO reported it.
|
|
27198
|
+
*
|
|
27199
|
+
* Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
|
|
27200
|
+
* the hub as it enumerates providers, never by the contributor.
|
|
27201
|
+
*/
|
|
27202
|
+
var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
|
|
27074
27203
|
var GetLoggingSettingsInputSchema = object({
|
|
27075
27204
|
scopeNodeId: string().optional(),
|
|
27076
27205
|
/**
|
|
@@ -27129,7 +27258,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
27129
27258
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
27130
27259
|
kind: "mutation",
|
|
27131
27260
|
auth: "admin"
|
|
27132
|
-
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27261
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27133
27262
|
kind: "mutation",
|
|
27134
27263
|
auth: "admin"
|
|
27135
27264
|
});
|
|
@@ -29711,6 +29840,12 @@ Object.freeze({
|
|
|
29711
29840
|
addonId: null,
|
|
29712
29841
|
access: "create"
|
|
29713
29842
|
},
|
|
29843
|
+
"failureContribution.list": {
|
|
29844
|
+
capName: "failure-contribution",
|
|
29845
|
+
capScope: "system",
|
|
29846
|
+
addonId: null,
|
|
29847
|
+
access: "view"
|
|
29848
|
+
},
|
|
29714
29849
|
"fanControl.setDirection": {
|
|
29715
29850
|
capName: "fan-control",
|
|
29716
29851
|
capScope: "device",
|
|
@@ -33017,6 +33152,12 @@ Object.freeze({
|
|
|
33017
33152
|
addonId: null,
|
|
33018
33153
|
access: "create"
|
|
33019
33154
|
},
|
|
33155
|
+
"system.getFailureContributions": {
|
|
33156
|
+
capName: "system",
|
|
33157
|
+
capScope: "system",
|
|
33158
|
+
addonId: null,
|
|
33159
|
+
access: "view"
|
|
33160
|
+
},
|
|
33020
33161
|
"system.getLoadContributions": {
|
|
33021
33162
|
capName: "system",
|
|
33022
33163
|
capScope: "system",
|
|
@@ -37249,7 +37390,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37249
37390
|
/**
|
|
37250
37391
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37251
37392
|
* exist only as camera-side inbound streams; the intercom back-channel encodes
|
|
37252
|
-
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue
|
|
37393
|
+
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue —
|
|
37394
|
+
* `scripts/check-audio-codec-catalog-parity.ts` refuses a commit that drifts
|
|
37395
|
+
* one without the other.
|
|
37396
|
+
*
|
|
37397
|
+
* `pcm_s16le` / `pcm_f32le` are LINEAR PCM, and they are here for exactly one
|
|
37398
|
+
* reason: a `{pcm_s16le, 22050 → 8000, s16le}` DECODE session is a pure
|
|
37399
|
+
* libswresample rate conversion, which is what an intercom provider needs when
|
|
37400
|
+
* a HomeKit / Alexa / TTS caller pushes raw PCM at a rate the camera does not
|
|
37401
|
+
* speak. Without them the provider had nothing to call and dropped the frame
|
|
37402
|
+
* (D281). They are ENCODE-capable too so the pairing stays symmetric: an
|
|
37403
|
+
* encode session whose codec is linear PCM is the same swr pass with the
|
|
37404
|
+
* codec stage as a no-op, and a half-populated matrix is how the two backends
|
|
37405
|
+
* come to disagree about what `canHandle` means.
|
|
37253
37406
|
*/
|
|
37254
37407
|
var CODEC_CATALOG = [
|
|
37255
37408
|
{
|
|
@@ -37264,6 +37417,18 @@ var CODEC_CATALOG = [
|
|
|
37264
37417
|
canEncode: true,
|
|
37265
37418
|
label: "PCM A-law (G.711)"
|
|
37266
37419
|
},
|
|
37420
|
+
{
|
|
37421
|
+
codec: "pcm_s16le",
|
|
37422
|
+
canDecode: true,
|
|
37423
|
+
canEncode: true,
|
|
37424
|
+
label: "PCM signed 16-bit LE"
|
|
37425
|
+
},
|
|
37426
|
+
{
|
|
37427
|
+
codec: "pcm_f32le",
|
|
37428
|
+
canDecode: true,
|
|
37429
|
+
canEncode: true,
|
|
37430
|
+
label: "PCM float 32-bit LE"
|
|
37431
|
+
},
|
|
37267
37432
|
{
|
|
37268
37433
|
codec: "g722",
|
|
37269
37434
|
canDecode: true,
|
|
@@ -37319,6 +37484,8 @@ function resolveCodecKey(codec) {
|
|
|
37319
37484
|
case "opus": return "opus";
|
|
37320
37485
|
case "pcm_alaw": return "pcm_alaw";
|
|
37321
37486
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37487
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37488
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37322
37489
|
case "g722": return "g722";
|
|
37323
37490
|
default: return null;
|
|
37324
37491
|
}
|
|
@@ -37328,7 +37495,9 @@ function resolveCodecKey(codec) {
|
|
|
37328
37495
|
/**
|
|
37329
37496
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37330
37497
|
* constants. Returns `null` for names outside this addon's matrix. G.722 maps
|
|
37331
|
-
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`)
|
|
37498
|
+
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`); linear
|
|
37499
|
+
* PCM has no naming oddity — `AV_CODEC_ID_PCM_S16LE` / `AV_CODEC_ID_PCM_F32LE`
|
|
37500
|
+
* exist on node-av's constants object under exactly those names.
|
|
37332
37501
|
*/
|
|
37333
37502
|
function resolveAvCodecId(codec, consts) {
|
|
37334
37503
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37337,6 +37506,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37337
37506
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37338
37507
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37339
37508
|
case "pcm_mulaw": return consts.AV_CODEC_ID_PCM_MULAW;
|
|
37509
|
+
case "pcm_s16le": return consts.AV_CODEC_ID_PCM_S16LE;
|
|
37510
|
+
case "pcm_f32le": return consts.AV_CODEC_ID_PCM_F32LE;
|
|
37340
37511
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37341
37512
|
case null: return null;
|
|
37342
37513
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -13329,6 +13329,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
13329
13329
|
limit: number().optional(),
|
|
13330
13330
|
tags: record(string(), string()).optional()
|
|
13331
13331
|
}), array(LogEntrySchema).readonly());
|
|
13332
|
+
/**
|
|
13333
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13334
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13335
|
+
*
|
|
13336
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13337
|
+
*
|
|
13338
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13339
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13340
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13341
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13342
|
+
* somebody to forget to edit.
|
|
13343
|
+
*
|
|
13344
|
+
* They are not merged, because their invariants are opposites:
|
|
13345
|
+
*
|
|
13346
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13347
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13348
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13349
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13350
|
+
* and it is exactly what an absent entry cannot say.
|
|
13351
|
+
*
|
|
13352
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13353
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13354
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13355
|
+
* has no process.
|
|
13356
|
+
*
|
|
13357
|
+
* ## Why not a log line, since the counters already exist
|
|
13358
|
+
*
|
|
13359
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13360
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13361
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13362
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13363
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13364
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13365
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13366
|
+
* be READ.
|
|
13367
|
+
*
|
|
13368
|
+
* ## The rate is served with its denominator or not at all
|
|
13369
|
+
*
|
|
13370
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13371
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13372
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13373
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13374
|
+
* reproduces that mistake on every read.
|
|
13375
|
+
*
|
|
13376
|
+
* ## Shape
|
|
13377
|
+
*
|
|
13378
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13379
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13380
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13381
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13382
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13383
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13384
|
+
* result through `system.getFailureContributions`.
|
|
13385
|
+
*/
|
|
13386
|
+
var FailureReasonCountSchema = object({
|
|
13387
|
+
/**
|
|
13388
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13389
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13390
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13391
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13392
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13393
|
+
* un-joinable.
|
|
13394
|
+
*/
|
|
13395
|
+
reason: string(),
|
|
13396
|
+
count: number().int().nonnegative()
|
|
13397
|
+
});
|
|
13398
|
+
var FailureContributionSchema = object({
|
|
13399
|
+
/**
|
|
13400
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13401
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13402
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13403
|
+
* is a central list that rots invisibly.
|
|
13404
|
+
*/
|
|
13405
|
+
family: string(),
|
|
13406
|
+
/**
|
|
13407
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13408
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13409
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13410
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13411
|
+
*/
|
|
13412
|
+
deviceId: number().int().positive(),
|
|
13413
|
+
/**
|
|
13414
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13415
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13416
|
+
* family has a single variant.
|
|
13417
|
+
*/
|
|
13418
|
+
variant: string().optional(),
|
|
13419
|
+
/**
|
|
13420
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13421
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13422
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13423
|
+
* `LoadContribution.startedAtMs`.
|
|
13424
|
+
*/
|
|
13425
|
+
sinceMs: number(),
|
|
13426
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13427
|
+
atMs: number(),
|
|
13428
|
+
/**
|
|
13429
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13430
|
+
* window. A failure count published without it is the mistake this schema
|
|
13431
|
+
* exists to make impossible.
|
|
13432
|
+
*/
|
|
13433
|
+
attempts: number().int().nonnegative(),
|
|
13434
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13435
|
+
succeeded: number().int().nonnegative(),
|
|
13436
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13437
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13438
|
+
});
|
|
13439
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13332
13440
|
var LoadContributionSchema = object({
|
|
13333
13441
|
role: _enum([
|
|
13334
13442
|
"decode",
|
|
@@ -17841,6 +17949,20 @@ var TrackSchema = object({
|
|
|
17841
17949
|
* `=== true` and render nothing otherwise — never infer "no rider".
|
|
17842
17950
|
*/
|
|
17843
17951
|
hasRider: boolean().optional(),
|
|
17952
|
+
/**
|
|
17953
|
+
* WHY this track ended without a NATIVE best-shot tile
|
|
17954
|
+
* ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
|
|
17955
|
+
* a composed token line (`no-key-frame capture=keyframe:native-missx4`,
|
|
17956
|
+
* `derive-returned-null tile=standin`, …) written at close and CLEARED by
|
|
17957
|
+
* the late-keyFrame upgrade when a native tile lands after all. The
|
|
17958
|
+
* operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
17959
|
+
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
17960
|
+
*
|
|
17961
|
+
* **Absent ≠ "missed silently"**: a row written before the column, a hub
|
|
17962
|
+
* that predates the field, and every track whose tile landed native all
|
|
17963
|
+
* omit it. Render nothing when absent.
|
|
17964
|
+
*/
|
|
17965
|
+
previewMissReason: string().optional(),
|
|
17844
17966
|
...TrackFlagFields,
|
|
17845
17967
|
...TrackRetrainFields
|
|
17846
17968
|
});
|
|
@@ -27067,6 +27189,13 @@ var LoggingSettingsPatchSchema = object({
|
|
|
27067
27189
|
* anyone but its owner.
|
|
27068
27190
|
*/
|
|
27069
27191
|
var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
|
|
27192
|
+
/**
|
|
27193
|
+
* One per-camera failure counter, plus WHO reported it.
|
|
27194
|
+
*
|
|
27195
|
+
* Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
|
|
27196
|
+
* the hub as it enumerates providers, never by the contributor.
|
|
27197
|
+
*/
|
|
27198
|
+
var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
|
|
27070
27199
|
var GetLoggingSettingsInputSchema = object({
|
|
27071
27200
|
scopeNodeId: string().optional(),
|
|
27072
27201
|
/**
|
|
@@ -27125,7 +27254,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
27125
27254
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
27126
27255
|
kind: "mutation",
|
|
27127
27256
|
auth: "admin"
|
|
27128
|
-
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27257
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
27129
27258
|
kind: "mutation",
|
|
27130
27259
|
auth: "admin"
|
|
27131
27260
|
});
|
|
@@ -29707,6 +29836,12 @@ Object.freeze({
|
|
|
29707
29836
|
addonId: null,
|
|
29708
29837
|
access: "create"
|
|
29709
29838
|
},
|
|
29839
|
+
"failureContribution.list": {
|
|
29840
|
+
capName: "failure-contribution",
|
|
29841
|
+
capScope: "system",
|
|
29842
|
+
addonId: null,
|
|
29843
|
+
access: "view"
|
|
29844
|
+
},
|
|
29710
29845
|
"fanControl.setDirection": {
|
|
29711
29846
|
capName: "fan-control",
|
|
29712
29847
|
capScope: "device",
|
|
@@ -33013,6 +33148,12 @@ Object.freeze({
|
|
|
33013
33148
|
addonId: null,
|
|
33014
33149
|
access: "create"
|
|
33015
33150
|
},
|
|
33151
|
+
"system.getFailureContributions": {
|
|
33152
|
+
capName: "system",
|
|
33153
|
+
capScope: "system",
|
|
33154
|
+
addonId: null,
|
|
33155
|
+
access: "view"
|
|
33156
|
+
},
|
|
33016
33157
|
"system.getLoadContributions": {
|
|
33017
33158
|
capName: "system",
|
|
33018
33159
|
capScope: "system",
|
|
@@ -37245,7 +37386,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37245
37386
|
/**
|
|
37246
37387
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37247
37388
|
* exist only as camera-side inbound streams; the intercom back-channel encodes
|
|
37248
|
-
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue
|
|
37389
|
+
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue —
|
|
37390
|
+
* `scripts/check-audio-codec-catalog-parity.ts` refuses a commit that drifts
|
|
37391
|
+
* one without the other.
|
|
37392
|
+
*
|
|
37393
|
+
* `pcm_s16le` / `pcm_f32le` are LINEAR PCM, and they are here for exactly one
|
|
37394
|
+
* reason: a `{pcm_s16le, 22050 → 8000, s16le}` DECODE session is a pure
|
|
37395
|
+
* libswresample rate conversion, which is what an intercom provider needs when
|
|
37396
|
+
* a HomeKit / Alexa / TTS caller pushes raw PCM at a rate the camera does not
|
|
37397
|
+
* speak. Without them the provider had nothing to call and dropped the frame
|
|
37398
|
+
* (D281). They are ENCODE-capable too so the pairing stays symmetric: an
|
|
37399
|
+
* encode session whose codec is linear PCM is the same swr pass with the
|
|
37400
|
+
* codec stage as a no-op, and a half-populated matrix is how the two backends
|
|
37401
|
+
* come to disagree about what `canHandle` means.
|
|
37249
37402
|
*/
|
|
37250
37403
|
var CODEC_CATALOG = [
|
|
37251
37404
|
{
|
|
@@ -37260,6 +37413,18 @@ var CODEC_CATALOG = [
|
|
|
37260
37413
|
canEncode: true,
|
|
37261
37414
|
label: "PCM A-law (G.711)"
|
|
37262
37415
|
},
|
|
37416
|
+
{
|
|
37417
|
+
codec: "pcm_s16le",
|
|
37418
|
+
canDecode: true,
|
|
37419
|
+
canEncode: true,
|
|
37420
|
+
label: "PCM signed 16-bit LE"
|
|
37421
|
+
},
|
|
37422
|
+
{
|
|
37423
|
+
codec: "pcm_f32le",
|
|
37424
|
+
canDecode: true,
|
|
37425
|
+
canEncode: true,
|
|
37426
|
+
label: "PCM float 32-bit LE"
|
|
37427
|
+
},
|
|
37263
37428
|
{
|
|
37264
37429
|
codec: "g722",
|
|
37265
37430
|
canDecode: true,
|
|
@@ -37315,6 +37480,8 @@ function resolveCodecKey(codec) {
|
|
|
37315
37480
|
case "opus": return "opus";
|
|
37316
37481
|
case "pcm_alaw": return "pcm_alaw";
|
|
37317
37482
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37483
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37484
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37318
37485
|
case "g722": return "g722";
|
|
37319
37486
|
default: return null;
|
|
37320
37487
|
}
|
|
@@ -37324,7 +37491,9 @@ function resolveCodecKey(codec) {
|
|
|
37324
37491
|
/**
|
|
37325
37492
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37326
37493
|
* constants. Returns `null` for names outside this addon's matrix. G.722 maps
|
|
37327
|
-
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`)
|
|
37494
|
+
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`); linear
|
|
37495
|
+
* PCM has no naming oddity — `AV_CODEC_ID_PCM_S16LE` / `AV_CODEC_ID_PCM_F32LE`
|
|
37496
|
+
* exist on node-av's constants object under exactly those names.
|
|
37328
37497
|
*/
|
|
37329
37498
|
function resolveAvCodecId(codec, consts) {
|
|
37330
37499
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37333,6 +37502,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37333
37502
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37334
37503
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37335
37504
|
case "pcm_mulaw": return consts.AV_CODEC_ID_PCM_MULAW;
|
|
37505
|
+
case "pcm_s16le": return consts.AV_CODEC_ID_PCM_S16LE;
|
|
37506
|
+
case "pcm_f32le": return consts.AV_CODEC_ID_PCM_F32LE;
|
|
37336
37507
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37337
37508
|
case null: return null;
|
|
37338
37509
|
}
|