@camstack/addon-decoder-nodeav 1.2.38 → 1.2.41
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 +95 -6
- package/dist/index.mjs +95 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13748,6 +13748,50 @@ var NodeProcessSchema = object({
|
|
|
13748
13748
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
13749
13749
|
uptimeSec: number()
|
|
13750
13750
|
});
|
|
13751
|
+
/**
|
|
13752
|
+
* One retained container-memory reading.
|
|
13753
|
+
*
|
|
13754
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
13755
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
13756
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
13757
|
+
* sampled at different instants.
|
|
13758
|
+
*
|
|
13759
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
13760
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
13761
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
13762
|
+
*/
|
|
13763
|
+
var ContainerMemoryPointSchema = object({
|
|
13764
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
13765
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
13766
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
13767
|
+
currentBytes: number(),
|
|
13768
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
13769
|
+
limitBytes: number().nullable(),
|
|
13770
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
13771
|
+
anonBytes: number().nullable(),
|
|
13772
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
13773
|
+
fileBytes: number().nullable(),
|
|
13774
|
+
/**
|
|
13775
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
13776
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
13777
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
13778
|
+
* nowhere in a `ps` scan.
|
|
13779
|
+
*/
|
|
13780
|
+
shmemBytes: number().nullable(),
|
|
13781
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
13782
|
+
slabBytes: number().nullable(),
|
|
13783
|
+
/**
|
|
13784
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
13785
|
+
*
|
|
13786
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
13787
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
13788
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
13789
|
+
*
|
|
13790
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
13791
|
+
* container today — and on any node with no Intel GPU.
|
|
13792
|
+
*/
|
|
13793
|
+
gpuShmemBytes: number().nullable()
|
|
13794
|
+
}).extend({ atMs: number() });
|
|
13751
13795
|
var DumpHeapSnapshotInputSchema = object({
|
|
13752
13796
|
/** The addon whose runner should dump a heap snapshot. */
|
|
13753
13797
|
addonId: string() });
|
|
@@ -13811,6 +13855,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
13811
13855
|
/** One entry per function seen in the window, heaviest-first. */
|
|
13812
13856
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
13813
13857
|
/**
|
|
13858
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
13859
|
+
*
|
|
13860
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
13861
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
13862
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
13863
|
+
* to compare them will compare two different instants. Same reader, same
|
|
13864
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
13865
|
+
*
|
|
13866
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
13867
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
13868
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
13869
|
+
* container and is precisely the lie this field exists to avoid.
|
|
13870
|
+
*/
|
|
13871
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
13872
|
+
/**
|
|
13814
13873
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
13815
13874
|
* reduction was needed — so a caller can always say what one point covers
|
|
13816
13875
|
* without having to know whether it was reduced.
|
|
@@ -25740,10 +25799,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
25740
25799
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
25741
25800
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
25742
25801
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
25743
|
-
* rows)
|
|
25744
|
-
*
|
|
25745
|
-
*
|
|
25746
|
-
* (`interfaces/recording-config.ts`).
|
|
25802
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
25803
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
25804
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
25805
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
25747
25806
|
*/
|
|
25748
25807
|
var RecordingStatusSchema = object({
|
|
25749
25808
|
deviceId: number(),
|
|
@@ -37390,7 +37449,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37390
37449
|
/**
|
|
37391
37450
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37392
37451
|
* exist only as camera-side inbound streams; the intercom back-channel encodes
|
|
37393
|
-
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue
|
|
37452
|
+
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue —
|
|
37453
|
+
* `scripts/check-audio-codec-catalog-parity.ts` refuses a commit that drifts
|
|
37454
|
+
* one without the other.
|
|
37455
|
+
*
|
|
37456
|
+
* `pcm_s16le` / `pcm_f32le` are LINEAR PCM, and they are here for exactly one
|
|
37457
|
+
* reason: a `{pcm_s16le, 22050 → 8000, s16le}` DECODE session is a pure
|
|
37458
|
+
* libswresample rate conversion, which is what an intercom provider needs when
|
|
37459
|
+
* a HomeKit / Alexa / TTS caller pushes raw PCM at a rate the camera does not
|
|
37460
|
+
* speak. Without them the provider had nothing to call and dropped the frame
|
|
37461
|
+
* (D281). They are ENCODE-capable too so the pairing stays symmetric: an
|
|
37462
|
+
* encode session whose codec is linear PCM is the same swr pass with the
|
|
37463
|
+
* codec stage as a no-op, and a half-populated matrix is how the two backends
|
|
37464
|
+
* come to disagree about what `canHandle` means.
|
|
37394
37465
|
*/
|
|
37395
37466
|
var CODEC_CATALOG = [
|
|
37396
37467
|
{
|
|
@@ -37405,6 +37476,18 @@ var CODEC_CATALOG = [
|
|
|
37405
37476
|
canEncode: true,
|
|
37406
37477
|
label: "PCM A-law (G.711)"
|
|
37407
37478
|
},
|
|
37479
|
+
{
|
|
37480
|
+
codec: "pcm_s16le",
|
|
37481
|
+
canDecode: true,
|
|
37482
|
+
canEncode: true,
|
|
37483
|
+
label: "PCM signed 16-bit LE"
|
|
37484
|
+
},
|
|
37485
|
+
{
|
|
37486
|
+
codec: "pcm_f32le",
|
|
37487
|
+
canDecode: true,
|
|
37488
|
+
canEncode: true,
|
|
37489
|
+
label: "PCM float 32-bit LE"
|
|
37490
|
+
},
|
|
37408
37491
|
{
|
|
37409
37492
|
codec: "g722",
|
|
37410
37493
|
canDecode: true,
|
|
@@ -37460,6 +37543,8 @@ function resolveCodecKey(codec) {
|
|
|
37460
37543
|
case "opus": return "opus";
|
|
37461
37544
|
case "pcm_alaw": return "pcm_alaw";
|
|
37462
37545
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37546
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37547
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37463
37548
|
case "g722": return "g722";
|
|
37464
37549
|
default: return null;
|
|
37465
37550
|
}
|
|
@@ -37469,7 +37554,9 @@ function resolveCodecKey(codec) {
|
|
|
37469
37554
|
/**
|
|
37470
37555
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37471
37556
|
* constants. Returns `null` for names outside this addon's matrix. G.722 maps
|
|
37472
|
-
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`)
|
|
37557
|
+
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`); linear
|
|
37558
|
+
* PCM has no naming oddity — `AV_CODEC_ID_PCM_S16LE` / `AV_CODEC_ID_PCM_F32LE`
|
|
37559
|
+
* exist on node-av's constants object under exactly those names.
|
|
37473
37560
|
*/
|
|
37474
37561
|
function resolveAvCodecId(codec, consts) {
|
|
37475
37562
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37478,6 +37565,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37478
37565
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37479
37566
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37480
37567
|
case "pcm_mulaw": return consts.AV_CODEC_ID_PCM_MULAW;
|
|
37568
|
+
case "pcm_s16le": return consts.AV_CODEC_ID_PCM_S16LE;
|
|
37569
|
+
case "pcm_f32le": return consts.AV_CODEC_ID_PCM_F32LE;
|
|
37481
37570
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37482
37571
|
case null: return null;
|
|
37483
37572
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -13744,6 +13744,50 @@ var NodeProcessSchema = object({
|
|
|
13744
13744
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
13745
13745
|
uptimeSec: number()
|
|
13746
13746
|
});
|
|
13747
|
+
/**
|
|
13748
|
+
* One retained container-memory reading.
|
|
13749
|
+
*
|
|
13750
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
13751
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
13752
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
13753
|
+
* sampled at different instants.
|
|
13754
|
+
*
|
|
13755
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
13756
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
13757
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
13758
|
+
*/
|
|
13759
|
+
var ContainerMemoryPointSchema = object({
|
|
13760
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
13761
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
13762
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
13763
|
+
currentBytes: number(),
|
|
13764
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
13765
|
+
limitBytes: number().nullable(),
|
|
13766
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
13767
|
+
anonBytes: number().nullable(),
|
|
13768
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
13769
|
+
fileBytes: number().nullable(),
|
|
13770
|
+
/**
|
|
13771
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
13772
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
13773
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
13774
|
+
* nowhere in a `ps` scan.
|
|
13775
|
+
*/
|
|
13776
|
+
shmemBytes: number().nullable(),
|
|
13777
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
13778
|
+
slabBytes: number().nullable(),
|
|
13779
|
+
/**
|
|
13780
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
13781
|
+
*
|
|
13782
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
13783
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
13784
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
13785
|
+
*
|
|
13786
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
13787
|
+
* container today — and on any node with no Intel GPU.
|
|
13788
|
+
*/
|
|
13789
|
+
gpuShmemBytes: number().nullable()
|
|
13790
|
+
}).extend({ atMs: number() });
|
|
13747
13791
|
var DumpHeapSnapshotInputSchema = object({
|
|
13748
13792
|
/** The addon whose runner should dump a heap snapshot. */
|
|
13749
13793
|
addonId: string() });
|
|
@@ -13807,6 +13851,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
13807
13851
|
/** One entry per function seen in the window, heaviest-first. */
|
|
13808
13852
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
13809
13853
|
/**
|
|
13854
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
13855
|
+
*
|
|
13856
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
13857
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
13858
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
13859
|
+
* to compare them will compare two different instants. Same reader, same
|
|
13860
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
13861
|
+
*
|
|
13862
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
13863
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
13864
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
13865
|
+
* container and is precisely the lie this field exists to avoid.
|
|
13866
|
+
*/
|
|
13867
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
13868
|
+
/**
|
|
13810
13869
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
13811
13870
|
* reduction was needed — so a caller can always say what one point covers
|
|
13812
13871
|
* without having to know whether it was reduced.
|
|
@@ -25736,10 +25795,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
25736
25795
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
25737
25796
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
25738
25797
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
25739
|
-
* rows)
|
|
25740
|
-
*
|
|
25741
|
-
*
|
|
25742
|
-
* (`interfaces/recording-config.ts`).
|
|
25798
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
25799
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
25800
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
25801
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
25743
25802
|
*/
|
|
25744
25803
|
var RecordingStatusSchema = object({
|
|
25745
25804
|
deviceId: number(),
|
|
@@ -37386,7 +37445,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37386
37445
|
/**
|
|
37387
37446
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37388
37447
|
* exist only as camera-side inbound streams; the intercom back-channel encodes
|
|
37389
|
-
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue
|
|
37448
|
+
* plain `aac`). Kept byte-for-byte in step with the ffmpeg addon's catalogue —
|
|
37449
|
+
* `scripts/check-audio-codec-catalog-parity.ts` refuses a commit that drifts
|
|
37450
|
+
* one without the other.
|
|
37451
|
+
*
|
|
37452
|
+
* `pcm_s16le` / `pcm_f32le` are LINEAR PCM, and they are here for exactly one
|
|
37453
|
+
* reason: a `{pcm_s16le, 22050 → 8000, s16le}` DECODE session is a pure
|
|
37454
|
+
* libswresample rate conversion, which is what an intercom provider needs when
|
|
37455
|
+
* a HomeKit / Alexa / TTS caller pushes raw PCM at a rate the camera does not
|
|
37456
|
+
* speak. Without them the provider had nothing to call and dropped the frame
|
|
37457
|
+
* (D281). They are ENCODE-capable too so the pairing stays symmetric: an
|
|
37458
|
+
* encode session whose codec is linear PCM is the same swr pass with the
|
|
37459
|
+
* codec stage as a no-op, and a half-populated matrix is how the two backends
|
|
37460
|
+
* come to disagree about what `canHandle` means.
|
|
37390
37461
|
*/
|
|
37391
37462
|
var CODEC_CATALOG = [
|
|
37392
37463
|
{
|
|
@@ -37401,6 +37472,18 @@ var CODEC_CATALOG = [
|
|
|
37401
37472
|
canEncode: true,
|
|
37402
37473
|
label: "PCM A-law (G.711)"
|
|
37403
37474
|
},
|
|
37475
|
+
{
|
|
37476
|
+
codec: "pcm_s16le",
|
|
37477
|
+
canDecode: true,
|
|
37478
|
+
canEncode: true,
|
|
37479
|
+
label: "PCM signed 16-bit LE"
|
|
37480
|
+
},
|
|
37481
|
+
{
|
|
37482
|
+
codec: "pcm_f32le",
|
|
37483
|
+
canDecode: true,
|
|
37484
|
+
canEncode: true,
|
|
37485
|
+
label: "PCM float 32-bit LE"
|
|
37486
|
+
},
|
|
37404
37487
|
{
|
|
37405
37488
|
codec: "g722",
|
|
37406
37489
|
canDecode: true,
|
|
@@ -37456,6 +37539,8 @@ function resolveCodecKey(codec) {
|
|
|
37456
37539
|
case "opus": return "opus";
|
|
37457
37540
|
case "pcm_alaw": return "pcm_alaw";
|
|
37458
37541
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37542
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37543
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37459
37544
|
case "g722": return "g722";
|
|
37460
37545
|
default: return null;
|
|
37461
37546
|
}
|
|
@@ -37465,7 +37550,9 @@ function resolveCodecKey(codec) {
|
|
|
37465
37550
|
/**
|
|
37466
37551
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37467
37552
|
* constants. Returns `null` for names outside this addon's matrix. G.722 maps
|
|
37468
|
-
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`)
|
|
37553
|
+
* to `AV_CODEC_ID_ADPCM_G722` (there is no plain `AV_CODEC_ID_G722`); linear
|
|
37554
|
+
* PCM has no naming oddity — `AV_CODEC_ID_PCM_S16LE` / `AV_CODEC_ID_PCM_F32LE`
|
|
37555
|
+
* exist on node-av's constants object under exactly those names.
|
|
37469
37556
|
*/
|
|
37470
37557
|
function resolveAvCodecId(codec, consts) {
|
|
37471
37558
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37474,6 +37561,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37474
37561
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37475
37562
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37476
37563
|
case "pcm_mulaw": return consts.AV_CODEC_ID_PCM_MULAW;
|
|
37564
|
+
case "pcm_s16le": return consts.AV_CODEC_ID_PCM_S16LE;
|
|
37565
|
+
case "pcm_f32le": return consts.AV_CODEC_ID_PCM_F32LE;
|
|
37477
37566
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37478
37567
|
case null: return null;
|
|
37479
37568
|
}
|