@camstack/addon-pipeline 1.2.220 → 1.2.222
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 +614 -4
- package/dist/audio-analyzer/index.mjs +614 -4
- package/dist/{default-detection-model-x6oNMBDH.js → default-detection-model-B7kn9xHR.js} +1 -1
- package/dist/{default-detection-model-DBNEc3iw.mjs → default-detection-model-BSX8cVHY.mjs} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-ClihWGOZ.mjs → dist-BNzfbpF6.mjs} +294 -5
- package/dist/{dist-ByPsWlTa.js → dist-DZsjVFey.js} +311 -4
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CNPnaux4.js → node-BhQ8dDQC.js} +1 -1
- package/dist/{node-DiaTmz84.mjs → node-uYIx2aZF.mjs} +1 -1
- package/dist/pipeline-runner/index.js +123 -20
- package/dist/pipeline-runner/index.mjs +123 -20
- package/dist/{process-memory-9KqRtUHt.js → process-memory-BozKb5-g.js} +1 -1
- package/dist/{process-memory-D4t8hpJd.mjs → process-memory-CkoLpOV-.mjs} +1 -1
- package/dist/recorder/index.js +12 -6
- package/dist/recorder/index.mjs +12 -6
- package/dist/{segment-demux-js-CZefXDLx.js → segment-demux-js-Cvszh55p.js} +1 -1
- package/dist/{segment-demux-js-CFFXVae4.mjs → segment-demux-js-Dh1dn_AT.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CtdpN7Sz.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BZG3prqU.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CyMYDKfM.mjs +26 -0
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DICVQkNi.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CKUGpDns.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-McoUiljf.mjs → hostInit-Cyo0CFo3.mjs} +3 -3
- package/dist/stream-broker/index.js +222 -102
- package/dist/stream-broker/index.mjs +222 -102
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-7hqrrd88.mjs +0 -26
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { o as readProcessCost } from "../node-
|
|
4
|
-
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-
|
|
2
|
+
import { A as YAMNET_TO_MACRO, At as runtimeDevices$1, C as PoolMemoryWatchdog, Ft as supportedRuntimes$1, K as detectionPipelineCapability, Lt as errMsg, Ot as resolvePoolMemoryPolicy, Tt as resolveClusterStepModelId, V as defaultDeviceFor$1, Wt as BaseAddon, Y as enumerateInferenceDevices, Yt as createEvent, Z as evaluateZoneRules, Zt as hydrateSchema, _n as union, _t as pickClusterStepSettings, an as sleep, at as loadContributionCapability, bt as pipelineExecutorCapability, c as DEFAULT_CLUSTER_STEP_MODELS, gn as string, gt as pickClusterStepModels, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, mt as overlayClusterStepSettings, nn as parseJsonUnknown, pn as object, rt as inferModelProvider, sn as array, t as APPLE_SA_TO_MACRO, tn as nodePin, vn as EventCategory } from "../dist-BNzfbpF6.mjs";
|
|
3
|
+
import { o as readProcessCost } from "../node-uYIx2aZF.mjs";
|
|
4
|
+
import { a as ALL_PIPELINE_STEPS, c as getStep, d as landmarkPrecisionVerdict, l as getStepDefinition, n as resolveDefaultDetectionModel, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as resolveModelForFormat } from "../default-detection-model-BSX8cVHY.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-CkoLpOV-.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";
|
|
@@ -5345,6 +5345,118 @@ var ZodIssueCode = {
|
|
|
5345
5345
|
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
5346
5346
|
var ZodFirstPartyTypeKind;
|
|
5347
5347
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5348
|
+
//#endregion
|
|
5349
|
+
//#region ../types/dist/sleep-BnujYGPe.mjs
|
|
5350
|
+
/**
|
|
5351
|
+
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5352
|
+
* window to float samples (D455).
|
|
5353
|
+
*
|
|
5354
|
+
* ## Why a format at all
|
|
5355
|
+
*
|
|
5356
|
+
* D450 took the plane off its 8 → 16 kHz upsample: it carries the SOURCE
|
|
5357
|
+
* RATE, and the one consumer that needs 16 kHz resamples next to the model.
|
|
5358
|
+
* It left the FORMAT alone — the broker still turned each G.711 byte into a
|
|
5359
|
+
* 4-byte f32le sample before the bytes entered the transport, so every leg of
|
|
5360
|
+
* the plane carried four times the source. The plane crosses hub-main twice on
|
|
5361
|
+
* the way to the analyzer, and the fleet's G.711 cameras are ~79 % of it.
|
|
5362
|
+
*
|
|
5363
|
+
* So the plane carries the source BYTES too, and whoever needs floats expands
|
|
5364
|
+
* them where it needs them. That is the same argument D450 made for the rate,
|
|
5365
|
+
* one step further along the same wire.
|
|
5366
|
+
*
|
|
5367
|
+
* ## Why the expansion lives here
|
|
5368
|
+
*
|
|
5369
|
+
* Two packages need it and they must never disagree: `addon-pipeline`'s broker
|
|
5370
|
+
* (which still has to serve a subscriber that did NOT ask for coded bytes —
|
|
5371
|
+
* `AudioChunkPlane` expands per subscription) and
|
|
5372
|
+
* `addon-pipeline-orchestrator`'s `AudioWindowAccumulator` (which flushes an
|
|
5373
|
+
* f32le window to the analyzer cap, whose `AudioChunkInput` contract is
|
|
5374
|
+
* unchanged and stays f32le). Both bundle the bare `@camstack/types` entry
|
|
5375
|
+
* into their own dist (`self-contained` externals), so this travels with a
|
|
5376
|
+
* `camstack deploy` and needs no published server.
|
|
5377
|
+
*
|
|
5378
|
+
* A second μ-law table anywhere else is the defect this module exists to
|
|
5379
|
+
* prevent. (`stream-broker.ts`'s `mulawToPcm` / `alawToPcm` are the ENCODE
|
|
5380
|
+
* direction for the WebRTC egress — a different transform, not a copy.)
|
|
5381
|
+
*
|
|
5382
|
+
* ## Absent means f32le
|
|
5383
|
+
*
|
|
5384
|
+
* `format` is optional on the wire and its absence means `f32le` — today's
|
|
5385
|
+
* bytes, byte for byte. A peer that never heard of the field is served what it
|
|
5386
|
+
* has always been served, because the broker only emits a coded window to a
|
|
5387
|
+
* subscription that DECLARED it accepts one (`AudioSubscribeOptions.accept`).
|
|
5388
|
+
* That is the D448 `rawForward` negotiation, and it is what makes this
|
|
5389
|
+
* deployable one addon at a time across three nodes.
|
|
5390
|
+
*/
|
|
5391
|
+
/** Every byte format the audio chunk plane can carry. `f32le` is the default. */
|
|
5392
|
+
var AUDIO_CHUNK_FORMATS = [
|
|
5393
|
+
"f32le",
|
|
5394
|
+
"pcmu",
|
|
5395
|
+
"pcma"
|
|
5396
|
+
];
|
|
5397
|
+
/**
|
|
5398
|
+
* Bytes one sample of `format` occupies. This is the number every duration
|
|
5399
|
+
* calculation over a chunk's `data` must use — a window accumulator that
|
|
5400
|
+
* hard-codes 4 reports a quarter of the audio it actually holds and flushes
|
|
5401
|
+
* four-second windows to a classifier expecting one.
|
|
5402
|
+
*/
|
|
5403
|
+
function audioChunkBytesPerSample(format) {
|
|
5404
|
+
return format === "f32le" ? 4 : 1;
|
|
5405
|
+
}
|
|
5406
|
+
/**
|
|
5407
|
+
* Expand a CODED audio window to freshly-owned f32le bytes, 4-byte aligned at
|
|
5408
|
+
* offset 0, so a caller can build a `Float32Array` view over them directly.
|
|
5409
|
+
* The input may be a msgpack subview at any offset; nothing here reads it as
|
|
5410
|
+
* anything but bytes.
|
|
5411
|
+
*
|
|
5412
|
+
* `f32le` is accepted and returns a copy, but a caller that already knows the
|
|
5413
|
+
* format is `f32le` should not call this at all — it has the bytes. Both
|
|
5414
|
+
* callers branch on the format first for exactly that reason, and the copy
|
|
5415
|
+
* here exists so the return type is always owned rather than sometimes
|
|
5416
|
+
* aliasing the argument.
|
|
5417
|
+
*/
|
|
5418
|
+
function expandAudioChunkToF32le(data, format) {
|
|
5419
|
+
if (format === "f32le") {
|
|
5420
|
+
const copy = new Uint8Array(data.byteLength);
|
|
5421
|
+
copy.set(data);
|
|
5422
|
+
return copy;
|
|
5423
|
+
}
|
|
5424
|
+
const table = format === "pcmu" ? ULAW_TABLE : ALAW_TABLE;
|
|
5425
|
+
const out = new Float32Array(data.length);
|
|
5426
|
+
for (let i = 0; i < data.length; i++) out[i] = table[data[i]];
|
|
5427
|
+
return new Uint8Array(out.buffer);
|
|
5428
|
+
}
|
|
5429
|
+
/**
|
|
5430
|
+
* Build the μ-law decode table (ITU-T G.711). Each of the 256 byte values maps
|
|
5431
|
+
* to a 16-bit PCM sample, normalised to [-1.0, 1.0] for f32le output.
|
|
5432
|
+
*
|
|
5433
|
+
* Moved here verbatim from `audio-rtp-decoder.ts`, which no longer decodes:
|
|
5434
|
+
* it buffers the coded bytes and the plane's consumers expand.
|
|
5435
|
+
*/
|
|
5436
|
+
function buildUlawTable() {
|
|
5437
|
+
const table = new Float32Array(256);
|
|
5438
|
+
for (let i = 0; i < 256; i++) {
|
|
5439
|
+
const complemented = ~i & 255;
|
|
5440
|
+
const sign = (complemented & 128) !== 0 ? -1 : 1;
|
|
5441
|
+
const exponent = complemented >> 4 & 7;
|
|
5442
|
+
table[i] = sign * ((8 * (complemented & 15) + 132 << exponent) - 132) / 32768;
|
|
5443
|
+
}
|
|
5444
|
+
return table;
|
|
5445
|
+
}
|
|
5446
|
+
/** Build the A-law decode table (ITU-T G.711). */
|
|
5447
|
+
function buildAlawTable() {
|
|
5448
|
+
const table = new Float32Array(256);
|
|
5449
|
+
for (let i = 0; i < 256; i++) {
|
|
5450
|
+
const xored = i ^ 85;
|
|
5451
|
+
const sign = (xored & 128) !== 0 ? 1 : -1;
|
|
5452
|
+
const exponent = xored >> 4 & 7;
|
|
5453
|
+
const mantissa = xored & 15;
|
|
5454
|
+
table[i] = sign * (exponent === 0 ? 16 * mantissa + 8 : 16 * mantissa + 264 << exponent - 1) / 32768;
|
|
5455
|
+
}
|
|
5456
|
+
return table;
|
|
5457
|
+
}
|
|
5458
|
+
var ULAW_TABLE = buildUlawTable();
|
|
5459
|
+
var ALAW_TABLE = buildAlawTable();
|
|
5348
5460
|
Object.fromEntries([
|
|
5349
5461
|
{
|
|
5350
5462
|
id: "overview",
|
|
@@ -6717,11 +6829,20 @@ var SubscribeFramesResultSchema = object({
|
|
|
6717
6829
|
* (the wire-serialisable supertype of `Buffer`) to match `DecodedFrameSchema`
|
|
6718
6830
|
* / `EncodedPacketSchema`'s precedent; a `Buffer` is assignable to it.
|
|
6719
6831
|
*/
|
|
6832
|
+
var AudioChunkFormatSchema = _enum(AUDIO_CHUNK_FORMATS);
|
|
6720
6833
|
var DecodedAudioChunkSchema = object({
|
|
6721
6834
|
data: _instanceof(Uint8Array),
|
|
6722
6835
|
sampleRate: number().int().positive(),
|
|
6723
6836
|
channels: number().int().positive(),
|
|
6724
|
-
timestamp: number()
|
|
6837
|
+
timestamp: number(),
|
|
6838
|
+
/**
|
|
6839
|
+
* Byte format of `data`. ABSENT MEANS `f32le` — today's bytes, byte for
|
|
6840
|
+
* byte, for any peer that never heard of this field. A coded window
|
|
6841
|
+
* (`pcmu` / `pcma`, one byte per sample) is only ever emitted to a
|
|
6842
|
+
* subscription that DECLARED it accepts one, so absence can never mean
|
|
6843
|
+
* "coded bytes a consumer will read as floats" (D455).
|
|
6844
|
+
*/
|
|
6845
|
+
format: AudioChunkFormatSchema.optional()
|
|
6725
6846
|
});
|
|
6726
6847
|
/**
|
|
6727
6848
|
* Input for `stream-broker.subscribeAudioChunks` (Phase 5 / D9). The
|
|
@@ -6733,7 +6854,18 @@ var DecodedAudioChunkSchema = object({
|
|
|
6733
6854
|
var SubscribeAudioChunksInputSchema = object({
|
|
6734
6855
|
brokerId: string(),
|
|
6735
6856
|
/** Short caller-identity tag (`audio-analyzer`, …) for `listClients`. */
|
|
6736
|
-
tag: string().optional()
|
|
6857
|
+
tag: string().optional(),
|
|
6858
|
+
/**
|
|
6859
|
+
* Byte formats this subscriber can READ, best first. The broker serves the
|
|
6860
|
+
* chunk's own format when it is in this list and expands to `f32le`
|
|
6861
|
+
* otherwise, so a subscriber is never handed bytes it cannot interpret.
|
|
6862
|
+
*
|
|
6863
|
+
* Absent (or without the source format) means `f32le` — the behaviour every
|
|
6864
|
+
* subscriber had before D455, unchanged. This is the negotiation half of
|
|
6865
|
+
* the source-bytes lever: it is what lets the broker and its consumers
|
|
6866
|
+
* deploy one at a time across three nodes.
|
|
6867
|
+
*/
|
|
6868
|
+
accept: array(AudioChunkFormatSchema).readonly().optional()
|
|
6737
6869
|
});
|
|
6738
6870
|
/** Result of `stream-broker.subscribeAudioChunks`. */
|
|
6739
6871
|
var SubscribeAudioChunksResultSchema = object({
|
|
@@ -12340,6 +12472,51 @@ var AudioAnalysisSettingsSchema = object({
|
|
|
12340
12472
|
minConfidence: number().min(0).max(1).default(.3),
|
|
12341
12473
|
allowedClasses: array(string()).default([])
|
|
12342
12474
|
});
|
|
12475
|
+
/**
|
|
12476
|
+
* `attachDevice` — the analyzer PULLS a camera's audio from the broker (D461).
|
|
12477
|
+
*
|
|
12478
|
+
* Until D461 the orchestrator drained the broker's chunk plane, accumulated
|
|
12479
|
+
* ~1 s windows and pushed them back out as `analyseChunk`. It neither produced
|
|
12480
|
+
* nor consumed the audio: the PCM crossed hub-main twice for a process that
|
|
12481
|
+
* only buffered it. `attachDevice` inverts the direction — the analyzer opens
|
|
12482
|
+
* its own `subscribeAudioChunks` against the broker and the subscriber IS the
|
|
12483
|
+
* decoder, so the coded G.711 bytes D455 put on the plane stay coded all the
|
|
12484
|
+
* way to the one expansion that feeds the model.
|
|
12485
|
+
*
|
|
12486
|
+
* The orchestrator still owns the POLICY (the `audioMode` gate, the on-motion
|
|
12487
|
+
* window, the per-device node assignment, the settings read) and therefore
|
|
12488
|
+
* still owns the attach/detach pair. It no longer owns the bytes.
|
|
12489
|
+
*/
|
|
12490
|
+
var AudioAttachDeviceInputSchema = object({
|
|
12491
|
+
deviceId: number(),
|
|
12492
|
+
/** Broker id (`<deviceId>/<camStreamId>`) carrying this camera's audio. */
|
|
12493
|
+
brokerId: string(),
|
|
12494
|
+
/**
|
|
12495
|
+
* `clusterRoles.ingestNode` — the node whose broker owns the source dial.
|
|
12496
|
+
* Every `streamBroker` call the attachment makes is pinned to it, exactly as
|
|
12497
|
+
* the orchestrator's poller pinned them before the move.
|
|
12498
|
+
*/
|
|
12499
|
+
ingestNodeId: string(),
|
|
12500
|
+
/**
|
|
12501
|
+
* Resolved once by the orchestrator at attach time, exactly as it was read
|
|
12502
|
+
* once per subscription before D461. The analyzer does NOT re-resolve per
|
|
12503
|
+
* window: a settings change re-attaches, which is what always happened.
|
|
12504
|
+
*/
|
|
12505
|
+
settings: AudioAnalysisSettingsSchema
|
|
12506
|
+
});
|
|
12507
|
+
var AudioAttachDeviceResultSchema = object({
|
|
12508
|
+
/** False only when the analyzer is shutting down and refused to attach. */
|
|
12509
|
+
attached: boolean(),
|
|
12510
|
+
/**
|
|
12511
|
+
* True when the attachment replaced a live one for the same device. An
|
|
12512
|
+
* attach is idempotent by REPLACEMENT — two pollers on one camera would
|
|
12513
|
+
* double the broker's fanout and neither would know about the other.
|
|
12514
|
+
*/
|
|
12515
|
+
replaced: boolean()
|
|
12516
|
+
});
|
|
12517
|
+
var AudioDetachDeviceResultSchema = object({
|
|
12518
|
+
/** False when no attachment existed — detach is idempotent. */
|
|
12519
|
+
detached: boolean() });
|
|
12343
12520
|
var AudioClassificationResultSchema = object({
|
|
12344
12521
|
labels: array(AudioClassificationLabelSchema).readonly(),
|
|
12345
12522
|
rawLabels: array(AudioClassificationLabelSchema).readonly().optional(),
|
|
@@ -12388,6 +12565,21 @@ var audioAnalyzerCapability = {
|
|
|
12388
12565
|
settings: AudioAnalysisSettingsSchema
|
|
12389
12566
|
}), AudioAnalysisResultSchema.nullable(), { kind: "mutation" }),
|
|
12390
12567
|
classify: method(AudioChunkInputSchema, AudioClassificationResultSchema, { timeoutMs: 3e4 }),
|
|
12568
|
+
/**
|
|
12569
|
+
* Start pulling this camera's audio from the broker, in THIS process.
|
|
12570
|
+
* Returns as soon as the attachment exists — the first
|
|
12571
|
+
* `subscribeAudioChunks` retries with backoff behind it, because the
|
|
12572
|
+
* broker for a camStream may not be registered yet (that tolerance moved
|
|
12573
|
+
* with the poller, D461). Replaces any live attachment for the device.
|
|
12574
|
+
*/
|
|
12575
|
+
attachDevice: method(AudioAttachDeviceInputSchema, AudioAttachDeviceResultSchema, { kind: "mutation" }),
|
|
12576
|
+
/**
|
|
12577
|
+
* Stop pulling this camera's audio and release the broker subscription.
|
|
12578
|
+
* Idempotent. A detach that never arrives is the one failure mode this
|
|
12579
|
+
* split adds, which is why `AudioChunkPlane` reaps a subscription nobody
|
|
12580
|
+
* drains rather than trusting it (D461).
|
|
12581
|
+
*/
|
|
12582
|
+
detachDevice: method(object({ deviceId: number() }), AudioDetachDeviceResultSchema, { kind: "mutation" }),
|
|
12391
12583
|
isReady: method(_void(), boolean()),
|
|
12392
12584
|
dispose: method(_void(), _void(), { kind: "mutation" }),
|
|
12393
12585
|
/**
|
|
@@ -22899,6 +23091,14 @@ var NativeCropResultSchema = object({
|
|
|
22899
23091
|
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
22900
23092
|
*/
|
|
22901
23093
|
jpeg: string().optional(),
|
|
23094
|
+
/**
|
|
23095
|
+
* The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
|
|
23096
|
+
* `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
|
|
23097
|
+
* `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
|
|
23098
|
+
* `bytes` above has crossed this boundary as a `Uint8Array` all along — so
|
|
23099
|
+
* base64 was buying nothing but a multi-megabyte string in the relay's heap.
|
|
23100
|
+
*/
|
|
23101
|
+
jpegBytes: _instanceof(Uint8Array).optional(),
|
|
22902
23102
|
width: number().int().positive(),
|
|
22903
23103
|
height: number().int().positive(),
|
|
22904
23104
|
/**
|
|
@@ -22965,7 +23165,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
|
|
|
22965
23165
|
})]);
|
|
22966
23166
|
/** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
|
|
22967
23167
|
var ParkedTrackFrameSchema = object({
|
|
22968
|
-
|
|
23168
|
+
/**
|
|
23169
|
+
* Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
|
|
23170
|
+
* `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
|
|
23171
|
+
* Exactly one of the two is present.
|
|
23172
|
+
*/
|
|
23173
|
+
jpeg: string().optional(),
|
|
23174
|
+
/** The same JPEG as bytes, for a caller that declared it reads them (D462). */
|
|
23175
|
+
jpegBytes: _instanceof(Uint8Array).optional(),
|
|
22969
23176
|
width: number().int().positive(),
|
|
22970
23177
|
height: number().int().positive(),
|
|
22971
23178
|
/** The frame instant the parcel shows (the caller's clock, echoed back). */
|
|
@@ -23616,6 +23823,13 @@ var pipelineRunnerCapability = {
|
|
|
23616
23823
|
bbox: NativeCropBboxSchema,
|
|
23617
23824
|
maxWidth: number().int().positive().optional(),
|
|
23618
23825
|
/**
|
|
23826
|
+
* The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
|
|
23827
|
+
* back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
|
|
23828
|
+
* wire — never assume consent: a pre-D462 caller parses the field as
|
|
23829
|
+
* base64 and bytes would decode to garbage rather than fail.
|
|
23830
|
+
*/
|
|
23831
|
+
acceptJpegBytes: boolean().optional(),
|
|
23832
|
+
/**
|
|
23619
23833
|
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
23620
23834
|
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
23621
23835
|
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
@@ -23788,7 +24002,14 @@ var pipelineRunnerCapability = {
|
|
|
23788
24002
|
getParkedTrackFrame: method(object({
|
|
23789
24003
|
deviceId: number(),
|
|
23790
24004
|
trackId: string(),
|
|
23791
|
-
kind: ParkedFrameKindSchema
|
|
24005
|
+
kind: ParkedFrameKindSchema,
|
|
24006
|
+
/**
|
|
24007
|
+
* The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
|
|
24008
|
+
* back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
|
|
24009
|
+
* wire — never assume consent: a pre-D462 caller parses the field as
|
|
24010
|
+
* base64 and bytes would decode to garbage rather than fail.
|
|
24011
|
+
*/
|
|
24012
|
+
acceptJpegBytes: boolean().optional()
|
|
23792
24013
|
}), ParkedTrackFrameSchema.nullable()),
|
|
23793
24014
|
/**
|
|
23794
24015
|
* Drop every parcel of a track — the hub closed it. Idempotent. A track
|
|
@@ -34037,12 +34258,24 @@ Object.freeze({
|
|
|
34037
34258
|
addonId: null,
|
|
34038
34259
|
access: "create"
|
|
34039
34260
|
},
|
|
34261
|
+
"audioAnalyzer.attachDevice": {
|
|
34262
|
+
capName: "audio-analyzer",
|
|
34263
|
+
capScope: "system",
|
|
34264
|
+
addonId: null,
|
|
34265
|
+
access: "create"
|
|
34266
|
+
},
|
|
34040
34267
|
"audioAnalyzer.classify": {
|
|
34041
34268
|
capName: "audio-analyzer",
|
|
34042
34269
|
capScope: "system",
|
|
34043
34270
|
addonId: null,
|
|
34044
34271
|
access: "view"
|
|
34045
34272
|
},
|
|
34273
|
+
"audioAnalyzer.detachDevice": {
|
|
34274
|
+
capName: "audio-analyzer",
|
|
34275
|
+
capScope: "system",
|
|
34276
|
+
addonId: null,
|
|
34277
|
+
access: "create"
|
|
34278
|
+
},
|
|
34046
34279
|
"audioAnalyzer.dispose": {
|
|
34047
34280
|
capName: "audio-analyzer",
|
|
34048
34281
|
capScope: "system",
|
|
@@ -39886,11 +40119,21 @@ Object.freeze({
|
|
|
39886
40119
|
form: "single",
|
|
39887
40120
|
optional: false
|
|
39888
40121
|
}],
|
|
40122
|
+
"audioAnalyzer.attachDevice": [{
|
|
40123
|
+
name: "deviceId",
|
|
40124
|
+
form: "single",
|
|
40125
|
+
optional: false
|
|
40126
|
+
}],
|
|
39889
40127
|
"audioAnalyzer.classify": [{
|
|
39890
40128
|
name: "deviceId",
|
|
39891
40129
|
form: "single",
|
|
39892
40130
|
optional: true
|
|
39893
40131
|
}],
|
|
40132
|
+
"audioAnalyzer.detachDevice": [{
|
|
40133
|
+
name: "deviceId",
|
|
40134
|
+
form: "single",
|
|
40135
|
+
optional: false
|
|
40136
|
+
}],
|
|
39894
40137
|
"audioMetrics.getCurrentSnapshot": [{
|
|
39895
40138
|
name: "deviceId",
|
|
39896
40139
|
form: "single",
|
|
@@ -41742,6 +41985,51 @@ Object.freeze({
|
|
|
41742
41985
|
"network-access": "ingress",
|
|
41743
41986
|
"smtp-provider": "email"
|
|
41744
41987
|
});
|
|
41988
|
+
var G711_SCALE_CORRECTION_DB = {
|
|
41989
|
+
PCMU: 20 * Math.log10(4),
|
|
41990
|
+
PCMA: 20 * Math.log10(8)
|
|
41991
|
+
};
|
|
41992
|
+
/**
|
|
41993
|
+
* Restate a dBFS number that was MEASURED through the pre-epoch decoder as the
|
|
41994
|
+
* same intent on the ITU-T scale (D460).
|
|
41995
|
+
*
|
|
41996
|
+
* ## When this applies, and when it is the wrong thing to reach for
|
|
41997
|
+
*
|
|
41998
|
+
* An absolute-dBFS number in this repo is one of two things, and only one of
|
|
41999
|
+
* them converts:
|
|
42000
|
+
*
|
|
42001
|
+
* - **A statement about the scale** — "-55 dBFS is near silence", "-25 dBFS
|
|
42002
|
+
* is loud". It was true on the ITU-T scale before the epoch and it is true
|
|
42003
|
+
* after. The defect was never in the number; it was that 19 of this hub's
|
|
42004
|
+
* 25 cameras did not obey it. Converting such a number takes something
|
|
42005
|
+
* correct and makes it wrong, in order to preserve a bug.
|
|
42006
|
+
* - **A measurement taken through the old decoder** — a value someone read
|
|
42007
|
+
* off a meter that under-reported by exactly 4× (PCMU) or 8× (PCMA). It
|
|
42008
|
+
* describes a sound that was really {@link G711_SCALE_CORRECTION_DB} dB
|
|
42009
|
+
* louder. That is what this function is for.
|
|
42010
|
+
*
|
|
42011
|
+
* Telling the two apart is a question about PROVENANCE, not about arithmetic,
|
|
42012
|
+
* and it cannot be answered from the number. It is answered by the comment the
|
|
42013
|
+
* author left — which is why `scripts/check-dbfs-era.mts` makes leaving one
|
|
42014
|
+
* mandatory.
|
|
42015
|
+
*
|
|
42016
|
+
* ## Why a function and not a typed-in number
|
|
42017
|
+
*
|
|
42018
|
+
* `-55 + 12.04` written into a source file is, six months later, completely
|
|
42019
|
+
* indistinguishable from a threshold somebody simply preferred. Calling this
|
|
42020
|
+
* keeps the derivation, the law, and the original measurement all visible at
|
|
42021
|
+
* the call site, so a future reader can disagree with the *premise* instead of
|
|
42022
|
+
* having to reverse-engineer the sum.
|
|
42023
|
+
*
|
|
42024
|
+
* **This is not a runtime gain.** It converts an authored CONSTANT once, where
|
|
42025
|
+
* it is declared. It must never be applied to a live sample or a stored
|
|
42026
|
+
* `AudioEvent.dbfs`: the decoder is correct now, and a second authority
|
|
42027
|
+
* adjusting numbers the decoder already got right is the original defect with
|
|
42028
|
+
* an extra place to argue with (D459).
|
|
42029
|
+
*/
|
|
42030
|
+
function ituDbfsFromPreEpoch(law, authoredDbfs) {
|
|
42031
|
+
return authoredDbfs + G711_SCALE_CORRECTION_DB[law];
|
|
42032
|
+
}
|
|
41745
42033
|
/**
|
|
41746
42034
|
* audio-condition — the authoring logic behind the sustained-sound condition
|
|
41747
42035
|
* (`NcConditions.audio`), pure and UI-framework-free.
|
|
@@ -41792,6 +42080,7 @@ var AUDIO_KIND_PREFIX = "audio-";
|
|
|
41792
42080
|
function audioKindId(macroId) {
|
|
41793
42081
|
return macroId.startsWith(AUDIO_KIND_PREFIX) ? macroId : `${AUDIO_KIND_PREFIX}${macroId}`;
|
|
41794
42082
|
}
|
|
42083
|
+
Math.round(ituDbfsFromPreEpoch("PCMU", -55));
|
|
41795
42084
|
/** Schema defaults — an untouched sub-field must author exactly these. */
|
|
41796
42085
|
var NC_AUDIO_DEFAULTS = {
|
|
41797
42086
|
hitPercent: 60,
|
|
@@ -43325,4 +43614,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
43325
43614
|
return out;
|
|
43326
43615
|
}
|
|
43327
43616
|
//#endregion
|
|
43328
|
-
export {
|
|
43617
|
+
export { evictionPolicyOfLocation as $, makeProfileBrokerId as $t, YAMNET_TO_MACRO as A, runtimeDevices as At, declareLogChannel as B, buildFfmpegArgs as Bt, PoolMemoryWatchdog as C, recordingExportCapability as Ct, RecordingConfigSchema as D, resolveLocationMode as Dt, RECORDING_EXPORT_MAX_READ_BYTES as E, resolveEgressDecodeHwAccel as Et, batteryCapability as F, supportedRuntimes as Ft, deriveRecordingMode as G, CAM_PROFILE_ORDER as Gt, defineCustomActions as H, isSoftwareDecode as Ht, cameraStreamsCapability as I, webrtcSessionCapability as It, egressTransportFromRequest as J, audioChunkBytesPerSample as Jt, detectionPipelineCapability as K, DeviceFeature as Kt, createHwAccelCache as L, errMsg as Lt, audioAnalysisCapability as M, storageOccupancyCapability as Mt, audioAnalyzerCapability as N, streamBrokerCapability as Nt, RecordingSignalStatusSchema as O, resolvePoolMemoryPolicy as Ot, audioKindId as P, stripRetiredBandPreBufferSec as Pt, evictionPolicyForMode as Q, isEvent as Qt, createLogChannelsProvider as R, AUDIO_PRESETS as Rt, OpsLogEntrySchema as S, recordingCapability as St, RATE_CONTROL_TIGHT as T, resolveClusterStepModelId as Tt, deriveBatteryPresence as U, BOOT_RECOVERY_BACKOFF_MS as Ut, defaultDeviceFor as V, invocationFromEncodeProfile as Vt, deriveDetailCropRect as W, BaseAddon as Wt, evaluateSensorEdge as X, expandAudioChunkToF32le as Xt, enumerateInferenceDevices as Y, createEvent as Yt, evaluateZoneRules as Z, hydrateSchema as Zt, FailureCounters as _, union as _n, pickClusterStepSettings as _t, COCO_80_LABELS as a, sleep as an, loadContributionCapability as at, NativeLeaseAdmissionSchema as b, pipelineExecutorCapability as bt, DEFAULT_CLUSTER_STEP_MODELS as c, boolean as cn, maskUrlCredentials as ct, DEFAULT_EVENTS_BAND_BUFFER_SEC as d, literal as dn, migrateLegacyDeviceSignalConfig as dt, makeSourceBrokerId as en, failureContributionCapability as et, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as f, number as fn, modeMayWrite as ft, ExportRecordSchema as g, string as gn, pickClusterStepModels as gt, EncodeProfileSchema as h, record as hn, parseProcStatus as ht, BatteryStatusSchema as i, selectAssignedProfileSlots as in, isFirstLevelMacroClass as it, addonWidgetsSourceCapability as j, storageEvictableCapability as jt, RingBuffer as k, resolveRecordingProfiles as kt, DEFAULT_CLUSTER_STEP_SETTINGS as l, discriminatedUnion as ln, mayReadLocation as lt, DEVICE_BACKEND_TO_FORMAT as m, preprocess as mn, overlayClusterStepSettings as mt, AUDIO_BACKEND_CHOICES as n, parseJsonUnknown as nn, hfModelUrl as nt, COCO_TO_MACRO as o, _enum as on, logChannelsCapability as ot, DEFAULT_NATIVE_LEASE_SETTINGS as p, object as pn, motionDetectionCapability as pt, egressTranscodeSharingKey as q, DeviceType as qt, AUDIO_MACRO_LABELS as r, parseProfileBrokerId as rn, inferModelProvider as rt, DEFAULT_AUDIO_ANALYZER_CONFIG as s, array as sn, mapAudioLabelToMacro as st, APPLE_SA_TO_MACRO as t, nodePin as tn, gbToBytes as tt, DEFAULT_DETAIL_CROP_CONVENTION as u, lazy as un, mayWriteToLocation as ut, G711_SCALE_CORRECTION_DB as v, EventCategory as vn, pickDetailCropConvention as vt, RATE_CONTROL_RELAXED as w, recordingSignalCapability as wt, NativeLeaseSettingsSchema as x, pipelineRunnerCapability as xt, HF_BASE_URL as y, pickNativeLeaseOverride as yt, customAction as z, Fmp4BoxSplitter as zt };
|