@camstack/addon-decoder-nodeav 1.2.38 → 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 +32 -2
- package/dist/index.mjs +32 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37390,7 +37390,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37390
37390
|
/**
|
|
37391
37391
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37392
37392
|
* 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
|
|
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.
|
|
37394
37406
|
*/
|
|
37395
37407
|
var CODEC_CATALOG = [
|
|
37396
37408
|
{
|
|
@@ -37405,6 +37417,18 @@ var CODEC_CATALOG = [
|
|
|
37405
37417
|
canEncode: true,
|
|
37406
37418
|
label: "PCM A-law (G.711)"
|
|
37407
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
|
+
},
|
|
37408
37432
|
{
|
|
37409
37433
|
codec: "g722",
|
|
37410
37434
|
canDecode: true,
|
|
@@ -37460,6 +37484,8 @@ function resolveCodecKey(codec) {
|
|
|
37460
37484
|
case "opus": return "opus";
|
|
37461
37485
|
case "pcm_alaw": return "pcm_alaw";
|
|
37462
37486
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37487
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37488
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37463
37489
|
case "g722": return "g722";
|
|
37464
37490
|
default: return null;
|
|
37465
37491
|
}
|
|
@@ -37469,7 +37495,9 @@ function resolveCodecKey(codec) {
|
|
|
37469
37495
|
/**
|
|
37470
37496
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37471
37497
|
* 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`)
|
|
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.
|
|
37473
37501
|
*/
|
|
37474
37502
|
function resolveAvCodecId(codec, consts) {
|
|
37475
37503
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37478,6 +37506,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37478
37506
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37479
37507
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37480
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;
|
|
37481
37511
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37482
37512
|
case null: return null;
|
|
37483
37513
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -37386,7 +37386,19 @@ function resolveAudioCodecAlias(codec) {
|
|
|
37386
37386
|
/**
|
|
37387
37387
|
* Supported codec matrix. `aac_latm` / `mpeg4-generic` are decode-only (they
|
|
37388
37388
|
* 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
|
|
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.
|
|
37390
37402
|
*/
|
|
37391
37403
|
var CODEC_CATALOG = [
|
|
37392
37404
|
{
|
|
@@ -37401,6 +37413,18 @@ var CODEC_CATALOG = [
|
|
|
37401
37413
|
canEncode: true,
|
|
37402
37414
|
label: "PCM A-law (G.711)"
|
|
37403
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
|
+
},
|
|
37404
37428
|
{
|
|
37405
37429
|
codec: "g722",
|
|
37406
37430
|
canDecode: true,
|
|
@@ -37456,6 +37480,8 @@ function resolveCodecKey(codec) {
|
|
|
37456
37480
|
case "opus": return "opus";
|
|
37457
37481
|
case "pcm_alaw": return "pcm_alaw";
|
|
37458
37482
|
case "pcm_mulaw": return "pcm_mulaw";
|
|
37483
|
+
case "pcm_s16le": return "pcm_s16le";
|
|
37484
|
+
case "pcm_f32le": return "pcm_f32le";
|
|
37459
37485
|
case "g722": return "g722";
|
|
37460
37486
|
default: return null;
|
|
37461
37487
|
}
|
|
@@ -37465,7 +37491,9 @@ function resolveCodecKey(codec) {
|
|
|
37465
37491
|
/**
|
|
37466
37492
|
* Resolve a codec name to its branded libav `AVCodecID` using the real
|
|
37467
37493
|
* 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`)
|
|
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.
|
|
37469
37497
|
*/
|
|
37470
37498
|
function resolveAvCodecId(codec, consts) {
|
|
37471
37499
|
switch (resolveCodecKey(codec)) {
|
|
@@ -37474,6 +37502,8 @@ function resolveAvCodecId(codec, consts) {
|
|
|
37474
37502
|
case "opus": return consts.AV_CODEC_ID_OPUS;
|
|
37475
37503
|
case "pcm_alaw": return consts.AV_CODEC_ID_PCM_ALAW;
|
|
37476
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;
|
|
37477
37507
|
case "g722": return consts.AV_CODEC_ID_ADPCM_G722;
|
|
37478
37508
|
case null: return null;
|
|
37479
37509
|
}
|