@apocaliss92/nodelink-js 0.4.7 → 0.4.10

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.d.cts CHANGED
@@ -116,9 +116,29 @@ declare const BC_CMD_ID_GET_AI_CFG = 299;
116
116
  declare const BC_CMD_ID_SET_AI_CFG = 300;
117
117
  declare const BC_CMD_ID_GET_SIREN_STATUS = 547;
118
118
  declare const BC_CMD_ID_SET_AUDIO_TASK = 231;
119
+ declare const BC_CMD_ID_SET_VIDEO_INPUT = 25;
120
+ declare const BC_CMD_ID_SET_DAY_NIGHT_THRESHOLD = 297;
121
+ declare const BC_CMD_ID_GET_ENC = 56;
122
+ declare const BC_CMD_ID_SET_ENC = 57;
123
+ declare const BC_CMD_ID_GET_PRIVACY_MASK = 52;
124
+ declare const BC_CMD_ID_SET_PRIVACY_MASK = 53;
125
+ declare const BC_CMD_ID_SET_AI_DENOISE = 440;
126
+ declare const BC_CMD_ID_SET_LED_STATE = 209;
127
+ declare const BC_CMD_ID_SET_AUDIO_CFG = 265;
128
+ declare const BC_CMD_ID_SET_RECORD = 82;
129
+ declare const BC_CMD_ID_SET_RECORD_CFG = 55;
130
+ declare const BC_CMD_ID_SET_EMAIL_TASK = 216;
131
+ declare const BC_CMD_ID_GET_PUSH_TASK = 219;
132
+ declare const BC_CMD_ID_SET_PUSH_TASK = 218;
133
+ declare const BC_CMD_ID_GET_AUTO_FOCUS = 224;
134
+ declare const BC_CMD_ID_SET_AUTO_FOCUS = 225;
135
+ /** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
119
136
  declare const BC_CMD_ID_CMD_123 = 123;
137
+ /** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
120
138
  declare const BC_CMD_ID_CMD_209 = 209;
139
+ /** @deprecated Use {@link BC_CMD_ID_SET_AUDIO_CFG} (265). */
121
140
  declare const BC_CMD_ID_CMD_265 = 265;
141
+ /** @deprecated Use {@link BC_CMD_ID_SET_AI_DENOISE} (440). */
122
142
  declare const BC_CMD_ID_CMD_440 = 440;
123
143
  declare const BC_CMD_ID_PUSH_VIDEO_INPUT = 78;
124
144
  declare const BC_CMD_ID_PUSH_SERIAL = 79;
@@ -380,6 +400,45 @@ declare function buildFloodlightManualXml(channelId: number, status: number, dur
380
400
  * In practice, many cameras expect FloodlightManual payload for cmd 288.
381
401
  */
382
402
  declare function buildWhiteLedStateXml(channelId: number, state: number): string;
403
+ /**
404
+ * Prepend the XML declaration if the body doesn't already start with
405
+ * one. Reolink rejects payloads without it on most setX commands.
406
+ */
407
+ declare function ensureXmlHeader(xml: string): string;
408
+ /**
409
+ * Replace the text content of `<tag>...</tag>` (first match) with the
410
+ * stringified value. No-op when `value` is undefined — lets callers
411
+ * pass partial patches without branching at every field.
412
+ */
413
+ declare function applyXmlTagPatch(xml: string, tag: string, value: string | number | boolean | undefined): string;
414
+ /**
415
+ * Patch a child tag inside a named parent block. Used for nested
416
+ * structures like `<DayNight><mode>...</mode></DayNight>` where the
417
+ * same `<mode>` tag appears under multiple parents.
418
+ */
419
+ declare function patchNestedTag(xml: string, parent: string, child: string, value: string | number | boolean | undefined): string;
420
+ /**
421
+ * Patch one or more fields inside an `<Enc>` stream block
422
+ * (`<mainStream>` or `<subStream>`). Used by `setEnc` —
423
+ * Reolink emits both blocks in the same document so a per-block scope
424
+ * is needed to avoid clobbering the wrong stream.
425
+ */
426
+ declare function applyStreamPatch(xml: string, streamTag: "mainStream" | "subStream", patch: {
427
+ bitRate?: number;
428
+ frameRate?: number;
429
+ videoEncType?: "h264" | "h265";
430
+ } | undefined): string;
431
+ /**
432
+ * Normalize human-friendly day/night labels to the camera's expected
433
+ * lowercase form. Mirrors reolink_aio's `SetIsp` post-processing
434
+ * (`& → And`, capitalize first letter).
435
+ */
436
+ declare function normalizeDayNightMode(input: string): string;
437
+ /**
438
+ * Normalize "On"/"Off" / "open"/"close" / boolean-ish inputs to the
439
+ * `open`/`close` enum the camera expects on LED-control commands.
440
+ */
441
+ declare function normalizeOpenClose(input: string): string;
383
442
  /**
384
443
  * Build AbilityInfo extension XML for requesting device capabilities.
385
444
  * Requests all available tokens: "system, streaming, PTZ, IO, security, replay, disk, network, alarm, record, video, image"
@@ -682,6 +741,17 @@ interface PirState {
682
741
  state?: {
683
742
  enable?: number;
684
743
  channel?: number;
744
+ /** PIR sensitivity (typically 1..100). Camera-side field is
745
+ * `sensiValue` in the cmd_id 212 response. */
746
+ sensitive?: number;
747
+ /** False-positive reduction toggle (`reduceFalseAlarm` on the
748
+ * wire). 0/1. */
749
+ reduceAlarm?: number;
750
+ /** Cooldown between consecutive PIR triggers (seconds). */
751
+ interval?: number;
752
+ /** Firmware-advertised max value for `interval`. Drives the
753
+ * upper bound of operator-facing sliders. */
754
+ intervalMax?: number;
685
755
  [key: string]: unknown;
686
756
  };
687
757
  }
@@ -1606,6 +1676,209 @@ interface AiAlarmConfig {
1606
1676
  };
1607
1677
  };
1608
1678
  }
1679
+ /**
1680
+ * Per-stream encoding entry inside `Compression`. Captured live on
1681
+ * E1-Zoom (TCP), Doorbell (UDP), Hub channel-0 (Argus 3E).
1682
+ *
1683
+ * Note: the camera-side field name is `frame`, NOT `frameRate`.
1684
+ * `videoEncType` is a numeric enum (`0` = h264, `1` = h265). The
1685
+ * `gop`/`encoderType`/`separateCfg` sub-blocks are firmware-dependent
1686
+ * (Hub-channel cameras carry them; standalone devices may not).
1687
+ */
1688
+ interface CompressionStream {
1689
+ audio?: number | undefined;
1690
+ resolutionName?: string | undefined;
1691
+ width?: number | undefined;
1692
+ height?: number | undefined;
1693
+ frame?: number | undefined;
1694
+ bitRate?: number | undefined;
1695
+ encoderProfile?: string | undefined;
1696
+ videoEncType?: number | undefined;
1697
+ gop?: {
1698
+ cur?: number;
1699
+ max?: number;
1700
+ min?: number;
1701
+ } | undefined;
1702
+ encoderType?: string | undefined;
1703
+ [key: string]: unknown;
1704
+ }
1705
+ /**
1706
+ * Encoding configuration (getEnc response).
1707
+ * cmdId=56 (GetEnc) — payload is wrapped in `Compression`, not `Enc`.
1708
+ */
1709
+ interface EncConfig {
1710
+ body?: {
1711
+ Compression?: {
1712
+ channelId?: number | undefined;
1713
+ isNoTranslateFrame?: number | undefined;
1714
+ mainStream?: CompressionStream | undefined;
1715
+ subStream?: CompressionStream | undefined;
1716
+ thirdStream?: CompressionStream | undefined;
1717
+ separateCfg?: {
1718
+ encodeCfg?: number;
1719
+ [key: string]: unknown;
1720
+ } | undefined;
1721
+ [key: string]: unknown;
1722
+ };
1723
+ };
1724
+ }
1725
+ /**
1726
+ * ISP / image input configuration. Both `getIsp` (cmdId=25) and
1727
+ * `getImage` (cmdId=26) return identical payloads on observed firmwares
1728
+ * — the underlying VideoInput + InputAdvanceCfg blocks. Different
1729
+ * cmdIds preserved for backwards compatibility.
1730
+ */
1731
+ interface IspConfig {
1732
+ body?: {
1733
+ VideoInput?: {
1734
+ channelId?: number | undefined;
1735
+ bright?: number | undefined;
1736
+ contrast?: number | undefined;
1737
+ saturation?: number | undefined;
1738
+ hue?: number | undefined;
1739
+ sharpen?: number | undefined;
1740
+ corridorAbility?: number | undefined;
1741
+ corridorMode?: string | undefined;
1742
+ [key: string]: unknown;
1743
+ };
1744
+ InputAdvanceCfg?: {
1745
+ channelId?: number | undefined;
1746
+ digitalChannel?: number | undefined;
1747
+ separateCfg?: {
1748
+ encType?: number;
1749
+ constantFrameRate?: number;
1750
+ [key: string]: unknown;
1751
+ } | undefined;
1752
+ PowerLineFrequency?: {
1753
+ mode?: string;
1754
+ enable?: number;
1755
+ [key: string]: unknown;
1756
+ } | undefined;
1757
+ Exposure?: {
1758
+ mode?: string;
1759
+ Gainctl?: {
1760
+ defMin?: number;
1761
+ defMax?: number;
1762
+ curMin?: number;
1763
+ curMax?: number;
1764
+ };
1765
+ Shutterctl?: {
1766
+ defMin?: number;
1767
+ defMax?: number;
1768
+ curMin?: number;
1769
+ curMax?: number;
1770
+ };
1771
+ shutterLevel?: string;
1772
+ gainLevel?: number;
1773
+ [key: string]: unknown;
1774
+ } | undefined;
1775
+ Scene?: {
1776
+ mode?: string;
1777
+ modeList?: string;
1778
+ Redgain?: {
1779
+ min?: number;
1780
+ max?: number;
1781
+ cur?: number;
1782
+ };
1783
+ Bluegain?: {
1784
+ min?: number;
1785
+ max?: number;
1786
+ cur?: number;
1787
+ };
1788
+ [key: string]: unknown;
1789
+ } | undefined;
1790
+ DayNight?: {
1791
+ mode?: string;
1792
+ IrcutMode?: string;
1793
+ Threshold?: string;
1794
+ [key: string]: unknown;
1795
+ } | undefined;
1796
+ BLC?: {
1797
+ enable?: number;
1798
+ mode?: string;
1799
+ [key: string]: unknown;
1800
+ } | undefined;
1801
+ [key: string]: unknown;
1802
+ };
1803
+ };
1804
+ }
1805
+ /**
1806
+ * IR / supplemental light state (`getIrLights`). Captured live on every
1807
+ * test camera — `state` is the operator-facing toggle, `lightState` is
1808
+ * the camera's own runtime status. `doorbellLightState` /
1809
+ * `doorbellAbility` only appear on doorbell models.
1810
+ */
1811
+ interface IrLightsConfig {
1812
+ body?: {
1813
+ LedState?: {
1814
+ channelId?: number | undefined;
1815
+ ledVersion?: number | undefined;
1816
+ IRLedBrightness?: number | undefined;
1817
+ state?: string | undefined;
1818
+ lightState?: string | undefined;
1819
+ doorbellLightState?: string | undefined;
1820
+ doorbellAbility?: number | undefined;
1821
+ [key: string]: unknown;
1822
+ };
1823
+ };
1824
+ }
1825
+ /**
1826
+ * Privacy mask configuration (`getMask`). The `Shelter` block always
1827
+ * contains `enable` + `maxNum` + `shelterList`; tracked-shelter sub-
1828
+ * blocks (`trackEnable`, `trackShelterList`) are PTZ-only and
1829
+ * conditional on the camera supporting motion-tracking. Hub-channel
1830
+ * cameras include `separateCfg` + `logicChannel`.
1831
+ */
1832
+ interface MaskConfig {
1833
+ body?: {
1834
+ Shelter?: {
1835
+ channelId?: number | undefined;
1836
+ enable?: number | undefined;
1837
+ maxNum?: number | undefined;
1838
+ shelterList?: unknown;
1839
+ trackEnable?: number | undefined;
1840
+ maxTrackShelterNum?: number | undefined;
1841
+ trackShelterList?: unknown;
1842
+ separateCfg?: {
1843
+ shelter?: number;
1844
+ [key: string]: unknown;
1845
+ } | undefined;
1846
+ logicChannel?: number | undefined;
1847
+ [key: string]: unknown;
1848
+ };
1849
+ };
1850
+ }
1851
+ /**
1852
+ * Audio noise reduction configuration (`getAudioNoise`).
1853
+ * cmdId=439. Note: the wire tag is lowercase `aiDenoise` (capital `V`
1854
+ * in `@_Version`). Mirrors the camera-side schema observed live.
1855
+ */
1856
+ interface AudioNoiseConfig {
1857
+ body?: {
1858
+ aiDenoise?: {
1859
+ channelId?: number | undefined;
1860
+ enable?: number | undefined;
1861
+ level?: number | undefined;
1862
+ [key: string]: unknown;
1863
+ };
1864
+ };
1865
+ }
1866
+ /**
1867
+ * Auto-focus configuration (`getAutoFocus`). cmdId=224.
1868
+ *
1869
+ * The `disable` field is a 0/1 flag — `0` means autofocus is ENABLED.
1870
+ * Non-PTZ cameras may return an empty `{}` or 400 — callers should
1871
+ * narrow `body?.AutoFocus?.disable` defensively.
1872
+ */
1873
+ interface AutoFocusConfig {
1874
+ body?: {
1875
+ AutoFocus?: {
1876
+ channelId?: number | undefined;
1877
+ disable?: number | undefined;
1878
+ [key: string]: unknown;
1879
+ };
1880
+ };
1881
+ }
1609
1882
  /**
1610
1883
  * Video input configuration.
1611
1884
  * cmdId=75 (GetVideoInput)
@@ -2846,6 +3119,250 @@ type CgiAudioAlarmPlayParam = ({
2846
3119
  alarm_mode: "manul";
2847
3120
  manual_switch: number;
2848
3121
  });
3122
+ type CgiIsp = {
3123
+ channel: number;
3124
+ bright?: number;
3125
+ contrast?: number;
3126
+ saturation?: number;
3127
+ sharpen?: number;
3128
+ hue?: number;
3129
+ antiFlicker?: string;
3130
+ exposure?: string;
3131
+ dayNight?: string;
3132
+ backLight?: string;
3133
+ blueGain?: number;
3134
+ redGain?: number;
3135
+ whiteBalance?: string;
3136
+ mirroring?: number;
3137
+ flip?: number;
3138
+ rotation?: number;
3139
+ } & Record<string, JsonValue>;
3140
+ type CgiGetIspValue = {
3141
+ Isp?: CgiIsp;
3142
+ } & Record<string, JsonValue>;
3143
+ type CgiSetIspParam = {
3144
+ Isp: CgiIsp;
3145
+ };
3146
+ type CgiImage = {
3147
+ channel: number;
3148
+ bright?: number;
3149
+ contrast?: number;
3150
+ saturation?: number;
3151
+ hue?: number;
3152
+ sharpen?: number;
3153
+ mirroring?: number;
3154
+ flip?: number;
3155
+ } & Record<string, JsonValue>;
3156
+ type CgiGetImageValue = {
3157
+ Image?: CgiImage;
3158
+ } & Record<string, JsonValue>;
3159
+ type CgiSetImageParam = {
3160
+ Image: CgiImage;
3161
+ };
3162
+ type CgiAudioCfg = {
3163
+ channel: number;
3164
+ /** 0 = unmuted, 1 = muted. */
3165
+ mute?: number;
3166
+ /** 0..100. */
3167
+ volume?: number;
3168
+ } & Record<string, JsonValue>;
3169
+ type CgiGetAudioCfgValue = {
3170
+ AudioCfg?: CgiAudioCfg;
3171
+ } & Record<string, JsonValue>;
3172
+ type CgiSetAudioCfgParam = {
3173
+ AudioCfg: CgiAudioCfg;
3174
+ };
3175
+ type CgiSetEncParam = {
3176
+ Enc: CgiEnc;
3177
+ };
3178
+ type CgiMdAlarmSens = {
3179
+ id?: number;
3180
+ beginHour?: number;
3181
+ beginMin?: number;
3182
+ endHour?: number;
3183
+ endMin?: number;
3184
+ sensitivity?: number;
3185
+ } & Record<string, JsonValue>;
3186
+ type CgiMdAlarmScope = {
3187
+ cols?: number;
3188
+ rows?: number;
3189
+ table?: string;
3190
+ } & Record<string, JsonValue>;
3191
+ type CgiMdAlarm = {
3192
+ channel: number;
3193
+ type?: string;
3194
+ enable?: number;
3195
+ scope?: CgiMdAlarmScope;
3196
+ sens?: CgiMdAlarmSens[];
3197
+ } & Record<string, JsonValue>;
3198
+ type CgiGetMdAlarmValue = {
3199
+ MdAlarm?: CgiMdAlarm;
3200
+ } & Record<string, JsonValue>;
3201
+ type CgiSetMdAlarmParam = {
3202
+ MdAlarm: CgiMdAlarm;
3203
+ };
3204
+ type CgiIrLights = {
3205
+ channel: number;
3206
+ /** "Auto" | "Off" — modern firmwares; some legacy support "On". */
3207
+ state?: string;
3208
+ } & Record<string, JsonValue>;
3209
+ type CgiGetIrLightsValue = {
3210
+ IrLights?: CgiIrLights;
3211
+ } & Record<string, JsonValue>;
3212
+ type CgiSetIrLightsParam = {
3213
+ IrLights: CgiIrLights;
3214
+ };
3215
+ type CgiAiCfg = {
3216
+ channel: number;
3217
+ AiTrack?: number;
3218
+ smartTrack?: number;
3219
+ trackType?: Record<string, number>;
3220
+ } & Record<string, JsonValue>;
3221
+ type CgiGetAiCfgValue = {
3222
+ AiCfg?: CgiAiCfg;
3223
+ } & Record<string, JsonValue>;
3224
+ type CgiSetAiCfgParam = {
3225
+ AiCfg: CgiAiCfg;
3226
+ };
3227
+ type CgiMaskShelter = {
3228
+ enabled?: number;
3229
+ position?: {
3230
+ x?: number;
3231
+ y?: number;
3232
+ w?: number;
3233
+ h?: number;
3234
+ };
3235
+ } & Record<string, JsonValue>;
3236
+ type CgiMask = {
3237
+ channel: number;
3238
+ enable?: number;
3239
+ shelterList?: CgiMaskShelter[];
3240
+ } & Record<string, JsonValue>;
3241
+ type CgiGetMaskValue = {
3242
+ Mask?: CgiMask;
3243
+ } & Record<string, JsonValue>;
3244
+ type CgiSetMaskParam = {
3245
+ Mask: CgiMask;
3246
+ };
3247
+ type CgiAudioNoise = {
3248
+ channel: number;
3249
+ enable?: number;
3250
+ /** 0 = disabled, 1..N = strength tier (model-specific). */
3251
+ level?: number;
3252
+ } & Record<string, JsonValue>;
3253
+ type CgiGetAudioNoiseValue = {
3254
+ AudioNoise?: CgiAudioNoise;
3255
+ } & Record<string, JsonValue>;
3256
+ type CgiSetAudioNoiseParam = {
3257
+ AudioNoise: CgiAudioNoise;
3258
+ };
3259
+ type CgiRecSchedule = {
3260
+ channel: number;
3261
+ enable?: number;
3262
+ /** 7×24 weekly schedule mask, "1"/"0" per slot — present on V20+. */
3263
+ table?: string;
3264
+ } & Record<string, JsonValue>;
3265
+ type CgiRec = {
3266
+ schedule?: CgiRecSchedule;
3267
+ scheduleEnable?: number;
3268
+ enable?: number;
3269
+ packTime?: string;
3270
+ postRec?: string;
3271
+ } & Record<string, JsonValue>;
3272
+ type CgiGetRecValue = {
3273
+ Rec?: CgiRec;
3274
+ } & Record<string, JsonValue>;
3275
+ type CgiSetRecParam = {
3276
+ Rec: CgiRec;
3277
+ };
3278
+ type CgiEmail = {
3279
+ schedule?: {
3280
+ channel?: number;
3281
+ enable?: number;
3282
+ table?: string;
3283
+ };
3284
+ scheduleEnable?: number;
3285
+ enable?: number;
3286
+ smtpServer?: string;
3287
+ smtpPort?: number;
3288
+ userName?: string;
3289
+ password?: string;
3290
+ addr1?: string;
3291
+ addr2?: string;
3292
+ addr3?: string;
3293
+ ssl?: number;
3294
+ attachment?: number;
3295
+ interval?: string;
3296
+ textType?: string;
3297
+ subject?: string;
3298
+ content?: string;
3299
+ } & Record<string, JsonValue>;
3300
+ type CgiGetEmailValue = {
3301
+ Email?: CgiEmail;
3302
+ } & Record<string, JsonValue>;
3303
+ type CgiSetEmailParam = {
3304
+ Email: CgiEmail;
3305
+ };
3306
+ type CgiPush = {
3307
+ schedule?: {
3308
+ channel?: number;
3309
+ enable?: number;
3310
+ table?: string;
3311
+ };
3312
+ scheduleEnable?: number;
3313
+ enable?: number;
3314
+ } & Record<string, JsonValue>;
3315
+ type CgiGetPushValue = {
3316
+ Push?: CgiPush;
3317
+ } & Record<string, JsonValue>;
3318
+ type CgiSetPushParam = {
3319
+ Push: CgiPush;
3320
+ };
3321
+ type CgiAudioAlarm = {
3322
+ schedule?: {
3323
+ channel?: number;
3324
+ enable?: number;
3325
+ table?: string;
3326
+ };
3327
+ scheduleEnable?: number;
3328
+ enable?: number;
3329
+ /** Built-in audio id; varies by camera. Use AudioAlarmPlay for
3330
+ * one-shot test playback. */
3331
+ audioId?: number;
3332
+ /** Times to repeat the audio per trigger. */
3333
+ alarmTimes?: number;
3334
+ audioVolume?: number;
3335
+ } & Record<string, JsonValue>;
3336
+ type CgiGetAudioAlarmValue = {
3337
+ Audio?: CgiAudioAlarm;
3338
+ } & Record<string, JsonValue>;
3339
+ type CgiSetAudioAlarmParam = {
3340
+ Audio: CgiAudioAlarm;
3341
+ };
3342
+ type CgiAutoFocus = {
3343
+ channel: number;
3344
+ /** 0 = enabled (default), 1 = disabled. Reolink names it `disable`
3345
+ * rather than `enable` because AF is on by default. */
3346
+ disable?: number;
3347
+ } & Record<string, JsonValue>;
3348
+ type CgiGetAutoFocusValue = {
3349
+ AutoFocus?: CgiAutoFocus;
3350
+ } & Record<string, JsonValue>;
3351
+ type CgiSetAutoFocusParam = {
3352
+ AutoFocus: CgiAutoFocus;
3353
+ };
3354
+ type CgiAiAlarm = {
3355
+ channel: number;
3356
+ ai_type: string;
3357
+ sensitivity?: number;
3358
+ stayTime?: number;
3359
+ } & Record<string, JsonValue>;
3360
+ type CgiGetAiAlarmValue = {
3361
+ AiAlarm?: CgiAiAlarm;
3362
+ } & Record<string, JsonValue>;
3363
+ type CgiSetAiAlarmParam = {
3364
+ AiAlarm: CgiAiAlarm;
3365
+ };
2849
3366
  type CgiNetPort = Record<string, JsonValue>;
2850
3367
  type CgiBattery = {
2851
3368
  batteryPercent?: number;
@@ -3085,6 +3602,45 @@ declare class ReolinkCgiApi {
3085
3602
  GetPirInfo(channel?: number): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3086
3603
  SetPirInfo(pirInfo: CgiSetPirInfoParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3087
3604
  GetPtzPreset(channel?: number): Promise<ReolinkCmdResponse[]>;
3605
+ GetIsp(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetIspValue>>>;
3606
+ SetIsp(isp: CgiSetIspParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3607
+ GetImage(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetImageValue>>>;
3608
+ SetImage(image: CgiSetImageParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3609
+ GetAudioCfg(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioCfgValue>>>;
3610
+ SetAudioCfg(audio: CgiSetAudioCfgParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3611
+ SetEnc(enc: CgiSetEncParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3612
+ GetMdAlarm(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetMdAlarmValue>>>;
3613
+ SetMdAlarm(md: CgiSetMdAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3614
+ GetIrLights(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetIrLightsValue>>>;
3615
+ SetIrLights(ir: CgiSetIrLightsParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3616
+ GetAiCfg(channel?: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAiCfgValue>>>;
3617
+ SetAiCfg(ai: CgiSetAiCfgParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3618
+ GetMask(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetMaskValue>>>;
3619
+ SetMask(mask: CgiSetMaskParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3620
+ GetAudioNoise(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioNoiseValue>>>;
3621
+ SetAudioNoise(noise: CgiSetAudioNoiseParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3622
+ GetRec(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetRecValue>>>;
3623
+ SetRec(rec: CgiSetRecParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3624
+ /** Newer firmwares advertise `GetRecV20` / `SetRecV20` with the
3625
+ * weekly-schedule `table` field. Same payload shape as `Rec`. */
3626
+ GetRecV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetRecValue>>>;
3627
+ SetRecV20(rec: CgiSetRecParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3628
+ GetEmail(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetEmailValue>>>;
3629
+ SetEmail(email: CgiSetEmailParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3630
+ /** V20 variant on newer firmwares with weekly-schedule `table`. */
3631
+ GetEmailV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetEmailValue>>>;
3632
+ SetEmailV20(email: CgiSetEmailParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3633
+ GetPush(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetPushValue>>>;
3634
+ SetPush(push: CgiSetPushParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3635
+ GetPushV20(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetPushValue>>>;
3636
+ SetPushV20(push: CgiSetPushParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3637
+ GetAudioAlarm(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAudioAlarmValue>>>;
3638
+ SetAudioAlarm(audio: CgiSetAudioAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3639
+ SetAudioAlarmV20(audio: CgiSetAudioAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3640
+ GetAutoFocus(channel: number): Promise<Array<ReolinkCmdResponseExt<CgiGetAutoFocusValue>>>;
3641
+ SetAutoFocus(af: CgiSetAutoFocusParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3642
+ GetAiAlarm(channel: number, aiType: string): Promise<Array<ReolinkCmdResponseExt<CgiGetAiAlarmValue>>>;
3643
+ SetAiAlarm(ai: CgiSetAiAlarmParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3088
3644
  GetAudioAlarmV20(channel?: number): Promise<ReolinkCmdResponse[]>;
3089
3645
  AudioAlarmPlay(params: CgiAudioAlarmPlayParam): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
3090
3646
  GetNetPort(): Promise<Array<ReolinkCmdResponseExt<JsonValue>>>;
@@ -3350,13 +3906,34 @@ interface BaichuanRtspServerOptions {
3350
3906
  * - "rfc4571": RFC4571 framing: 2-byte length + RTP packet
3351
3907
  */
3352
3908
  tcpRtpFraming?: "rtsp-interleaved" | "rfc4571";
3353
- /** Credentials for RTSP authentication (optional) */
3909
+ /**
3910
+ * Credentials for RTSP authentication (optional).
3911
+ *
3912
+ * Each entry carries either the plaintext `password` or a pre-computed
3913
+ * Digest `ha1 = MD5(username ":" realm ":" password)`. The HA1 variant is
3914
+ * preferred when the consumer stores only hashed credentials (e.g. the
3915
+ * manager reuses dashboard-user HA1 values without ever holding plaintext).
3916
+ *
3917
+ * When both are supplied, `ha1` wins for Digest validation while `password`
3918
+ * is used for Basic authentication.
3919
+ */
3354
3920
  credentials?: Array<{
3355
3921
  username: string;
3356
3922
  password: string;
3923
+ ha1?: string;
3924
+ } | {
3925
+ username: string;
3926
+ password?: string;
3927
+ ha1: string;
3357
3928
  }>;
3358
3929
  /** Require authentication for RTSP connections (default: false if no credentials set) */
3359
3930
  requireAuth?: boolean;
3931
+ /**
3932
+ * Digest authentication realm advertised to clients. Must match the realm
3933
+ * used when pre-computing HA1 values in `credentials[*].ha1`.
3934
+ * Default: "BaichuanRtspServer" (kept for backward compatibility).
3935
+ */
3936
+ authRealm?: string;
3360
3937
  /**
3361
3938
  * External identifier for dedicated socket session.
3362
3939
  * When provided, a dedicated BaichuanClient is created for the stream,
@@ -3369,6 +3946,18 @@ interface BaichuanRtspServerOptions {
3369
3946
  * start() still performs metadata fetch and codec detection.
3370
3947
  */
3371
3948
  externalListener?: boolean;
3949
+ /**
3950
+ * When true, the server runs in **mux mode**: `start()` skips creating
3951
+ * or listening on any TCP server (a shared multiplexer — e.g.
3952
+ * `LocalRtspMux` — owns the public RTSP port and routes accepted sockets
3953
+ * here via `injectSocket()`). `stop()` likewise skips closing a TCP
3954
+ * server it does not own.
3955
+ *
3956
+ * Semantically equivalent to `externalListener: true`, but expressed from
3957
+ * the point of view of the multiplexer that will drive this instance.
3958
+ * Either flag is sufficient; both may be set together.
3959
+ */
3960
+ muxMode?: boolean;
3372
3961
  /**
3373
3962
  * Ms after the last RTSP client disconnects before stopping the native Baichuan stream.
3374
3963
  * 0 = keep the native stream running (matches rtsp proxy idle timeout 0 / always-mounted sources).
@@ -3380,6 +3969,18 @@ interface BaichuanRtspServerOptions {
3380
3969
  * 0 = disable. Default 15000 when nativeStreamIdleStopMs > 0, else 0.
3381
3970
  */
3382
3971
  nativeStreamPrimeIdleStopMs?: number;
3972
+ /**
3973
+ * When true, `start()` does NOT fetch stream metadata from the camera —
3974
+ * the metadata fetch is deferred to the first DESCRIBE. Useful for
3975
+ * battery / UDP cameras so binding the RTSP port at boot does not wake
3976
+ * them up when no client is listening.
3977
+ *
3978
+ * Trade-off: the very first DESCRIBE pays the metadata round-trip
3979
+ * latency. Subsequent connections hit the cached metadata.
3980
+ *
3981
+ * Default: false (keep existing behaviour).
3982
+ */
3983
+ lazyMetadata?: boolean;
3383
3984
  }
3384
3985
  /**
3385
3986
  * BaichuanRtspServer - RTSP server that serves a Baichuan video stream.
@@ -3417,6 +4018,7 @@ declare class BaichuanRtspServer extends EventEmitter<{
3417
4018
  private authNonces;
3418
4019
  private readonly AUTH_REALM;
3419
4020
  private readonly NONCE_TIMEOUT_MS;
4021
+ private readonly lazyMetadata;
3420
4022
  private connectedClients;
3421
4023
  private nativeStreamActive;
3422
4024
  private clientConnectionServer;
@@ -3436,10 +4038,20 @@ declare class BaichuanRtspServer extends EventEmitter<{
3436
4038
  private tempStreamGenerator;
3437
4039
  private nativeFanout;
3438
4040
  private noClientAutoStopTimer;
4041
+ /** Fires if camera never sends frames after stream start (sleeping), even with clients connected. */
4042
+ private noFrameDeadlineTimer;
3439
4043
  /** After last RTSP client; 0 = never auto-stop native stream. */
3440
4044
  private readonly nativeStreamIdleStopMs;
3441
4045
  /** Primed-but-no-PLAY timeout; 0 = disabled. */
3442
4046
  private readonly nativeStreamPrimeIdleStopMs;
4047
+ /**
4048
+ * Max time to wait for the first camera frame after stream start.
4049
+ * If no frames arrive within this window, the native stream is stopped
4050
+ * (camera is sleeping). Prevents the BaichuanVideoStream watchdog from
4051
+ * firing and waking the camera when no real viewer is watching.
4052
+ * 0 = disabled. Defaults to nativeStreamPrimeIdleStopMs * 2 when > 0.
4053
+ */
4054
+ private readonly nativeStreamNoFrameDeadlineMs;
3443
4055
  private readonly PREBUFFER_MAX_MS;
3444
4056
  private prebuffer;
3445
4057
  private static isAdtsAacFrame;
@@ -3450,6 +4062,8 @@ declare class BaichuanRtspServer extends EventEmitter<{
3450
4062
  private static splitAnnexBNals;
3451
4063
  private static stripAdtsHeader;
3452
4064
  constructor(options: BaichuanRtspServerOptions);
4065
+ /** Number of currently connected RTSP clients. */
4066
+ get clientCount(): number;
3453
4067
  /**
3454
4068
  * Generate a new nonce for Digest authentication
3455
4069
  */
@@ -3475,6 +4089,7 @@ declare class BaichuanRtspServer extends EventEmitter<{
3475
4089
  */
3476
4090
  private generateWwwAuthenticateHeader;
3477
4091
  private clearNoClientAutoStopTimer;
4092
+ private clearNoFrameDeadlineTimer;
3478
4093
  private setFlowVideoType;
3479
4094
  /**
3480
4095
  * Start the RTSP server.
@@ -3487,6 +4102,21 @@ declare class BaichuanRtspServer extends EventEmitter<{
3487
4102
  * @param initialBuffer - Any bytes already read during path parsing/auth
3488
4103
  */
3489
4104
  acceptConnection(socket: net.Socket, initialBuffer?: Buffer): void;
4105
+ /**
4106
+ * Inject an already-accepted client socket from a multiplexer
4107
+ * (e.g. `LocalRtspMux`) that owns the listening port.
4108
+ *
4109
+ * The mux reads the first RTSP request line to determine the target path,
4110
+ * then hands the socket over. Any bytes already consumed during routing
4111
+ * are replayed back onto the socket via `unshift()` so the RTSP parser in
4112
+ * `handleRtspConnection` sees the complete original request.
4113
+ *
4114
+ * @param socket - Client TCP socket, already accepted by the mux.
4115
+ * @param preReadData - Bytes the mux has already pulled off the socket
4116
+ * while parsing the request line. Replayed via `socket.unshift()`
4117
+ * before any further reads.
4118
+ */
4119
+ injectSocket(socket: net.Socket, preReadData: Buffer): void;
3490
4120
  /**
3491
4121
  * Handle RTSP connection from a client.
3492
4122
  */
@@ -4361,7 +4991,17 @@ declare class ReolinkBaichuanApi {
4361
4991
  private statePollingInterval;
4362
4992
  private udpSleepInferenceInterval;
4363
4993
  private readonly udpLastInferredSleepStateByChannel;
4994
+ /**
4995
+ * Per-channel pending sleep-state candidate for hysteresis.
4996
+ * When the inference flips to a new state we require N consecutive polls
4997
+ * of that same state before committing it — this filters out transient
4998
+ * flapping caused by non-waking traffic drifting in/out of the 10 s
4999
+ * getSleepStatus() observation window during stream teardown.
5000
+ */
5001
+ private readonly udpPendingSleepStateByChannel;
4364
5002
  private readonly udpSleepInferenceIntervalMs;
5003
+ /** Consecutive inference polls required to commit a new sleeping/awake state. */
5004
+ private readonly udpSleepInferenceHysteresisPolls;
4365
5005
  private lastMotionState;
4366
5006
  private lastAiState;
4367
5007
  private aiStatePollingDisabled;
@@ -6150,6 +6790,185 @@ declare class ReolinkBaichuanApi {
6150
6790
  * Fetches events/motion/AI state for all channels via CGI and merges results per channel.
6151
6791
  */
6152
6792
  getAllChannelsEvents(options?: Parameters<ReolinkCgiApi["getAllChannelsEvents"]>[0]): ReturnType<ReolinkCgiApi["getAllChannelsEvents"]>;
6793
+ /**
6794
+ * GetEnc via Baichuan (cmdId=56). Returns the `<Compression>` block:
6795
+ * per-stream `mainStream` / `subStream` / `thirdStream` with `audio`
6796
+ * flag, `width`, `height`, `frame` (NOT `frameRate`), `bitRate`,
6797
+ * `videoEncType` (0=h264, 1=h265), `encoderProfile`, `gop`. Mirrors
6798
+ * reolink_aio's `GetEnc` — note the wire payload wraps everything
6799
+ * in `Compression`, not `Enc`.
6800
+ */
6801
+ getEnc(channel?: number, options?: {
6802
+ timeoutMs?: number;
6803
+ }): Promise<EncConfig>;
6804
+ /**
6805
+ * SetEnc via Baichuan (cmdId=57). Read-modify-write — preserves
6806
+ * unspecified fields. Mirrors reolink_aio's `SetEnc`.
6807
+ *
6808
+ * @param channel - Channel number (0-based)
6809
+ * @param patch - Fields to update on `mainStream` and/or `subStream`,
6810
+ * plus a top-level `audio` toggle (0/1). Pass only what you want
6811
+ * to change.
6812
+ */
6813
+ setEnc(channel: number, patch: {
6814
+ audio?: 0 | 1;
6815
+ mainStream?: {
6816
+ bitRate?: number;
6817
+ frameRate?: number;
6818
+ videoEncType?: "h264" | "h265";
6819
+ };
6820
+ subStream?: {
6821
+ bitRate?: number;
6822
+ frameRate?: number;
6823
+ videoEncType?: "h264" | "h265";
6824
+ };
6825
+ }, options?: {
6826
+ timeoutMs?: number;
6827
+ }): Promise<void>;
6828
+ /**
6829
+ * SetImage via Baichuan (cmdId=25, read via cmdId=26). Patches the
6830
+ * `<VideoInput>` block: bright / contrast / saturation / hue /
6831
+ * sharpen. Mirrors reolink_aio's `SetImage`.
6832
+ */
6833
+ setImage(channel: number, patch: {
6834
+ bright?: number;
6835
+ contrast?: number;
6836
+ saturation?: number;
6837
+ hue?: number;
6838
+ sharpen?: number;
6839
+ }, options?: {
6840
+ timeoutMs?: number;
6841
+ }): Promise<void>;
6842
+ /**
6843
+ * SetIsp via Baichuan (cmdId=25 for image side, cmdId=297 for
6844
+ * dayNightThreshold). Patches the `<InputAdvanceCfg>` block:
6845
+ * `DayNight/mode`, `Exposure/mode`, `binning_mode`, `hdrSwitch`.
6846
+ * Mirrors reolink_aio's `SetIsp`.
6847
+ *
6848
+ * @param channel - Channel number (0-based)
6849
+ * @param patch - Fields to update. `dayNight` accepts the camera's
6850
+ * raw enum (`color`, `auto`, `blackAndWhite`, …) — pass it as the
6851
+ * camera reports it (PascalCase / dotted forms get normalized
6852
+ * server-side).
6853
+ */
6854
+ setIsp(channel: number, patch: {
6855
+ dayNight?: string;
6856
+ exposure?: string;
6857
+ binningMode?: number;
6858
+ hdr?: 0 | 1;
6859
+ dayNightThreshold?: number;
6860
+ }, options?: {
6861
+ timeoutMs?: number;
6862
+ }): Promise<void>;
6863
+ /**
6864
+ * GetIsp via Baichuan (cmdId=26). Convenience alias of
6865
+ * `getVideoInput()` so callers that switched from CGI keep the
6866
+ * familiar name. Both return the merged VideoInput +
6867
+ * InputAdvanceCfg blob.
6868
+ */
6869
+ getIsp(channel?: number, options?: {
6870
+ timeoutMs?: number;
6871
+ }): Promise<IspConfig>;
6872
+ /** GetImage via Baichuan (cmdId=26). Same payload as `getIsp` —
6873
+ * Reolink merged VideoInput + InputAdvanceCfg under one cmdId. */
6874
+ getImage(channel?: number, options?: {
6875
+ timeoutMs?: number;
6876
+ }): Promise<IspConfig>;
6877
+ /**
6878
+ * GetIrLights via Baichuan (cmdId=208). Returns LedState block:
6879
+ * `IRLedBrightness`, `state` (ir on/off), `lightState` (status LED
6880
+ * open/close), `doorbellLightState`. Mirrors reolink_aio's
6881
+ * `get_status_led`.
6882
+ */
6883
+ getIrLights(channel?: number, options?: {
6884
+ timeoutMs?: number;
6885
+ }): Promise<IrLightsConfig>;
6886
+ /**
6887
+ * SetIrLights via Baichuan (cmdId=209, read via cmdId=208). Patches
6888
+ * IR LED + status LED + doorbell LED + IR brightness. Mirrors
6889
+ * reolink_aio's `set_status_led`.
6890
+ *
6891
+ * @param channel - Channel number (0-based)
6892
+ * @param patch - `irState` ("On" | "Off" | "Auto"), `lightState`
6893
+ * (status LED), `doorbellLightState`, `irBrightness` (0..255).
6894
+ * Camera-side accepts lowercase strings (`open`/`close`); the
6895
+ * helper normalizes from the friendly variants.
6896
+ */
6897
+ setIrLights(channel: number, patch: {
6898
+ irState?: "On" | "Off" | "Auto" | string;
6899
+ lightState?: "On" | "Off" | string;
6900
+ doorbellLightState?: "On" | "Off" | string;
6901
+ irBrightness?: number;
6902
+ }, options?: {
6903
+ timeoutMs?: number;
6904
+ }): Promise<void>;
6905
+ /**
6906
+ * SetAudioCfg via Baichuan (cmdId=265, read via cmdId=264). Patches
6907
+ * volume / talk-and-reply / visitor settings. Mirrors reolink_aio's
6908
+ * `SetAudioCfg`.
6909
+ */
6910
+ setAudioCfg(channel: number, patch: {
6911
+ volume?: number;
6912
+ talkAndReplyVolume?: number;
6913
+ visitorVolume?: number;
6914
+ visitorLoudspeaker?: number;
6915
+ }, options?: {
6916
+ timeoutMs?: number;
6917
+ }): Promise<void>;
6918
+ /**
6919
+ * GetMask (privacy mask) via Baichuan (cmdId=52). Returns the
6920
+ * `<Shelter>` block — `enable` flag + `shelterList`. Mirrors
6921
+ * reolink_aio's `GetMask`.
6922
+ */
6923
+ getMask(channel?: number, options?: {
6924
+ timeoutMs?: number;
6925
+ }): Promise<MaskConfig>;
6926
+ /**
6927
+ * SetMask (privacy mask) via Baichuan (cmdId=53, read via cmdId=52).
6928
+ * Toggles the `<Shelter><enable>` flag. Mirrors reolink_aio's
6929
+ * `SetMask` (which only touches enable too — shelter zone editing
6930
+ * goes through a separate flow).
6931
+ */
6932
+ setMask(channel: number, patch: {
6933
+ enable?: 0 | 1 | boolean;
6934
+ }, options?: {
6935
+ timeoutMs?: number;
6936
+ }): Promise<void>;
6937
+ /**
6938
+ * GetAudioNoise via Baichuan (cmdId=439). Reads `enable` + `level`
6939
+ * from the aiDenoise block. Mirrors reolink_aio's `GetAudioNoise`.
6940
+ *
6941
+ * Note: `getAiDenoise` already returns the same payload typed as
6942
+ * `AiDenoiseConfig`. This getter exists for naming parity with
6943
+ * reolink_aio + the reolink CGI.
6944
+ */
6945
+ getAudioNoise(channel?: number, options?: {
6946
+ timeoutMs?: number;
6947
+ }): Promise<AudioNoiseConfig>;
6948
+ /**
6949
+ * SetAudioNoise via Baichuan (cmdId=440, read via cmdId=439).
6950
+ * Mirrors reolink_aio's `SetAudioNoise` — `level <= 0` flips the
6951
+ * enable flag off; positive values turn it on and update the level.
6952
+ */
6953
+ setAudioNoise(channel: number, level: number, options?: {
6954
+ timeoutMs?: number;
6955
+ }): Promise<void>;
6956
+ /**
6957
+ * GetAutoFocus via Baichuan (cmdId=224). Returns the `<AutoFocus>`
6958
+ * block — only `disable` (0 = AF on, 1 = AF off). Mirrors
6959
+ * reolink_aio's `GetAutoFocus`.
6960
+ */
6961
+ getAutoFocus(channel: number, options?: {
6962
+ timeoutMs?: number;
6963
+ }): Promise<AutoFocusConfig>;
6964
+ /**
6965
+ * SetAutoFocus via Baichuan (cmdId=225). Mirrors reolink_aio's
6966
+ * `SetAutoFocus`. Note: write-only command — the payload is built
6967
+ * from scratch (no read-modify-write needed).
6968
+ */
6969
+ setAutoFocus(channel: number, disable: 0 | 1 | boolean, options?: {
6970
+ timeoutMs?: number;
6971
+ }): Promise<void>;
6153
6972
  /**
6154
6973
  * Passthrough to ReolinkCgiApi.getAllChannelsBatteryInfo.
6155
6974
  * Fetches battery info for all channels via CGI (merged with channel status sleep flag).
@@ -7486,6 +8305,64 @@ declare function computeDeviceCapabilities(params: {
7486
8305
  */
7487
8306
  declare function xmlIndicatesFloodlight(xml: string): boolean;
7488
8307
 
8308
+ /**
8309
+ * Pure helpers for the UDP sleep-state inference running inside
8310
+ * `ReolinkBaichuanApi.startUdpSleepInference()`.
8311
+ *
8312
+ * The inference polls `getSleepStatus()` every 2 s. That helper reads a rolling
8313
+ * 10 s tx/rx-history window and infers whether the battery camera is asleep or
8314
+ * awake. During stream teardown or idle-disconnect sequences, non-waking
8315
+ * keepalive / battery-info traffic drifts in and out of the window, which can
8316
+ * cause the inferred state to flap rapidly:
8317
+ *
8318
+ * awake → sleeping → awake → sleeping → awake → ...
8319
+ *
8320
+ * Emitting every flap as a `sleeping`/`awake` event floods downstream consumers
8321
+ * (events-manager, MQTT, Home Assistant) with phantom state changes even
8322
+ * though the camera has not been touched. Hysteresis smooths this out: a new
8323
+ * state must be observed on N consecutive polls before it is committed and an
8324
+ * event is emitted. N=2 adds a 2 s detection latency (acceptable for battery
8325
+ * cameras) while eliminating single-poll noise entirely.
8326
+ */
8327
+
8328
+ interface SleepInferencePending {
8329
+ state: SleepState;
8330
+ count: number;
8331
+ }
8332
+ interface SleepInferenceInput {
8333
+ /** State returned by the current getSleepStatus() poll — must not be "unknown". */
8334
+ inferred: Exclude<SleepState, "unknown">;
8335
+ /** Previously committed state (undefined = first observation after inference start). */
8336
+ committed: SleepState | undefined;
8337
+ /** Pending candidate state and consecutive match count, if any. */
8338
+ pending: SleepInferencePending | undefined;
8339
+ /** Consecutive polls of the same inferred state required to commit. */
8340
+ hysteresisPolls: number;
8341
+ }
8342
+ interface SleepInferenceDecision {
8343
+ /** The event to dispatch, or null if no event should fire this poll. */
8344
+ emit: "sleeping" | "awake" | null;
8345
+ /** New committed state to store (never "unknown"). */
8346
+ nextCommitted: SleepState;
8347
+ /** New pending candidate to store, or undefined to clear it. */
8348
+ nextPending: SleepInferencePending | undefined;
8349
+ }
8350
+ /**
8351
+ * Decide whether a new sleep-inference poll should emit an event, given the
8352
+ * previously committed state and any pending hysteresis candidate.
8353
+ *
8354
+ * Rules:
8355
+ * 1. First observation (committed === undefined): always adopt as committed.
8356
+ * Emit "sleeping" but not "awake" — awake is the implicit default, so
8357
+ * emitting on startup would be noisy.
8358
+ * 2. Inferred matches committed: stable, clear any pending candidate.
8359
+ * 3. Inferred differs from committed but matches the pending candidate:
8360
+ * increment count. When count reaches hysteresisPolls, commit and emit.
8361
+ * 4. Inferred differs from committed AND from any pending candidate:
8362
+ * restart the candidate at count=1 (does not emit).
8363
+ */
8364
+ declare function decideSleepInferenceTransition(input: SleepInferenceInput): SleepInferenceDecision;
8365
+
7489
8366
  type RtspStreamProfile = "main" | "sub" | "ext";
7490
8367
  declare function buildRtspPath(channel: number, stream: RtspStreamProfile): string;
7491
8368
  declare function buildRtspUrl(params: {
@@ -7677,6 +8554,8 @@ declare function createNativeStream(api: ReolinkBaichuanApi, channel: number, pr
7677
8554
  variant?: NativeVideoStreamVariant;
7678
8555
  /** Optional dedicated BaichuanClient for stream isolation. When omitted, uses api.client (shared). */
7679
8556
  client?: BaichuanClient;
8557
+ /** Cancellation signal — aborting wakes the idle sleep and exits the generator promptly. */
8558
+ signal?: AbortSignal;
7680
8559
  }): AsyncGenerator<{
7681
8560
  audio: boolean;
7682
8561
  data: Buffer;
@@ -8050,6 +8929,15 @@ declare function createReplayHttpServer(options: ReplayHttpServerOptions): Promi
8050
8929
  * get IDR-aligned fast startup without waiting for the next keyframe.
8051
8930
  */
8052
8931
 
8932
+ type NativeFrame = {
8933
+ audio: boolean;
8934
+ data: Buffer;
8935
+ codec: string | null;
8936
+ sampleRate: number | null;
8937
+ microseconds: number | null;
8938
+ videoType?: "H264" | "H265";
8939
+ isKeyframe?: boolean;
8940
+ };
8053
8941
  interface Go2rtcTcpServerOptions {
8054
8942
  /** API instance (required). */
8055
8943
  api: ReolinkBaichuanApi;
@@ -8130,6 +9018,7 @@ declare class Go2rtcTcpServer extends EventEmitter<{
8130
9018
  private totalFramesReceived;
8131
9019
  private totalVideoFramesWritten;
8132
9020
  private prebuffer;
9021
+ private audioInfo;
8133
9022
  constructor(options: Go2rtcTcpServerOptions);
8134
9023
  /** Start listening. Resolves once the TCP server is bound. */
8135
9024
  start(): Promise<void>;
@@ -8141,18 +9030,45 @@ declare class Go2rtcTcpServer extends EventEmitter<{
8141
9030
  get go2rtcSourceUrl(): string | undefined;
8142
9031
  /** Number of currently connected clients. */
8143
9032
  get clientCount(): number;
9033
+ /**
9034
+ * Subscribe to the raw native stream for diagnostic purposes.
9035
+ * The subscriber receives the same frames the MPEG-TS muxer consumes
9036
+ * (pre-muxing). Counts as a "consumer" so the native stream is kept alive
9037
+ * for the lifetime of the subscription. If the stream is not already
9038
+ * running (battery camera, prestart=false), this starts it.
9039
+ */
9040
+ subscribeDiagnostic(id: string): Promise<AsyncGenerator<NativeFrame, void, unknown>>;
9041
+ /** Unsubscribe a diagnostic session and release its consumer slot. */
9042
+ unsubscribeDiagnostic(id: string): void;
9043
+ /**
9044
+ * Returns ADTS AAC audio metadata detected from the native stream, or
9045
+ * null if no audio frame has been observed yet (e.g. video-only cameras
9046
+ * or before the first audio packet arrives).
9047
+ */
9048
+ getAudioInfo(): {
9049
+ codec: "aac-adts";
9050
+ sampleRate: number;
9051
+ channels: number;
9052
+ configHex: string;
9053
+ } | null;
8144
9054
  private handleClient;
8145
9055
  private feedClient;
8146
9056
  /**
8147
- * Convert a native frame to wire-ready Annex-B.
8148
- * Audio frames are skipped raw TCP carries only video (Annex-B).
8149
- * go2rtc auto-detects the codec from SPS/PPS/VPS NALUs.
9057
+ * Convert a native video frame to Annex-B.
9058
+ * Returns null for audio frames (handled separately by muxAudio).
8150
9059
  */
8151
- private convertFrame;
9060
+ private convertVideoFrame;
8152
9061
  /** Check if an Annex-B buffer contains a keyframe (IDR for H.264, IRAP for H.265). */
8153
9062
  private isAnnexBKeyframe;
8154
9063
  /** Split Annex-B byte stream into individual NAL units. */
8155
9064
  private static splitAnnexBNals;
9065
+ /** True if `b` starts with an ADTS AAC syncword (0xFFF). */
9066
+ private static isAdtsAacFrame;
9067
+ /**
9068
+ * Parse an ADTS header into {sampleRate, channels, AudioSpecificConfig hex}.
9069
+ * Returns null when the buffer is not a valid ADTS frame.
9070
+ */
9071
+ private static parseAdtsSamplingInfo;
8156
9072
  private startNativeStream;
8157
9073
  private stopNativeStream;
8158
9074
  private startStreamHealthMonitor;
@@ -8161,6 +9077,73 @@ declare class Go2rtcTcpServer extends EventEmitter<{
8161
9077
  private scheduleStop;
8162
9078
  }
8163
9079
 
9080
+ /**
9081
+ * MPEG-TS Muxer for H.264/H.265 video + ADTS AAC audio.
9082
+ *
9083
+ * Produces 188-byte MPEG-TS packets suitable for feeding to go2rtc via a
9084
+ * plain TCP connection (`tcp://127.0.0.1:{port}`). go2rtc auto-detects the
9085
+ * container format from the 0x47 sync byte and extracts both video and audio.
9086
+ *
9087
+ * Stream layout:
9088
+ * PID 0x0000 — PAT (Program Association Table)
9089
+ * PID 0x1000 — PMT (Program Map Table)
9090
+ * PID 0x0100 — Video elementary stream (H.264 or H.265, Annex-B)
9091
+ * PID 0x0101 — Audio elementary stream (AAC-ADTS, stream type 0x0F)
9092
+ *
9093
+ * Each `MpegTsMuxer` instance is independent: continuity counters are
9094
+ * per-instance so multiple concurrent streams do not corrupt each other.
9095
+ *
9096
+ * Usage:
9097
+ * const muxer = new MpegTsMuxer({ videoType: "H265", includeAudio: true });
9098
+ * const tsBytes = muxer.muxVideo(annexBBuffer, ptsUs, isKeyframe);
9099
+ * const tsBytes = muxer.muxAudio(adtsBuffer, ptsUs);
9100
+ */
9101
+ interface MpegTsMuxerOptions {
9102
+ /** Video codec type. */
9103
+ videoType: "H264" | "H265";
9104
+ /**
9105
+ * Whether to include an audio PID (0x0101) in the PMT.
9106
+ * When true, audio frames muxed via muxAudio() are wrapped in PES packets
9107
+ * on PID 0x0101 (AAC-ADTS, stream type 0x0F).
9108
+ * Default: true.
9109
+ */
9110
+ includeAudio?: boolean;
9111
+ }
9112
+ /**
9113
+ * Stateful MPEG-TS muxer. Each instance has its own continuity counters —
9114
+ * create one per output stream (or per client connection for prebuffer replay).
9115
+ */
9116
+ declare class MpegTsMuxer {
9117
+ private readonly videoStreamType;
9118
+ private readonly includeAudio;
9119
+ private patCc;
9120
+ private pmtCc;
9121
+ private videoCc;
9122
+ private audioCc;
9123
+ private framesSinceTableSend;
9124
+ private tablesSent;
9125
+ constructor(options: MpegTsMuxerOptions);
9126
+ /**
9127
+ * Mux a video frame (Annex-B H.264 or H.265) into MPEG-TS packets.
9128
+ * PAT and PMT are emitted before keyframes and periodically.
9129
+ *
9130
+ * @param annexBData - Annex-B video data (with start codes)
9131
+ * @param ptsUs - Presentation timestamp in microseconds
9132
+ * @param isKeyframe - Whether this is an IDR / IRAP frame
9133
+ */
9134
+ muxVideo(annexBData: Buffer, ptsUs: number, isKeyframe: boolean): Buffer;
9135
+ /**
9136
+ * Mux an audio frame (ADTS AAC) into MPEG-TS packets.
9137
+ * Returns an empty Buffer when includeAudio is false.
9138
+ *
9139
+ * @param adtsData - Raw ADTS AAC frame (starting with 0xFF 0xF1/0xF9 syncword)
9140
+ * @param ptsUs - Presentation timestamp in microseconds
9141
+ */
9142
+ muxAudio(adtsData: Buffer, ptsUs: number): Buffer;
9143
+ /** Reset all continuity counters and table state (e.g. after stream restart). */
9144
+ reset(): void;
9145
+ }
9146
+
8164
9147
  /**
8165
9148
  * Baichuan HTTP Stream Server - Serves a Baichuan video stream over HTTP (MPEG-TS).
8166
9149
  * A simpler alternative to an RTSP server.
@@ -9133,4 +10116,4 @@ declare class CompositeRtspServer extends EventEmitter<{
9133
10116
  getClientCount(): number;
9134
10117
  }
9135
10118
 
9136
- export { type AIDetectionState, type AIEvent, type AIState, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiKey, type AiTypesCacheEntry, type AnyBuffer, type AudioAlarmParams, type AudioCfgConfig, type AudioConfig, type AudioTaskConfig, type AutoDetectInputs, type AutoDetectMode, type AutoDetectResult, AutodiscoveryClient, type AutodiscoveryClientOptions, BC_AES_IV, BC_CLASS_FILE_DOWNLOAD, BC_CLASS_LEGACY, BC_CLASS_MODERN_20, BC_CLASS_MODERN_24, BC_CLASS_MODERN_24_ALT, BC_CMD_ID_ABILITY_INFO, BC_CMD_ID_ALARM_EVENT_LIST, BC_CMD_ID_AUDIO_ALARM_PLAY, BC_CMD_ID_CHANNEL_INFO_ALL, BC_CMD_ID_CMD_123, BC_CMD_ID_CMD_209, BC_CMD_ID_CMD_265, BC_CMD_ID_CMD_440, BC_CMD_ID_COVER_PREVIEW, BC_CMD_ID_COVER_RESPONSE, BC_CMD_ID_COVER_STANDALONE_458, BC_CMD_ID_COVER_STANDALONE_459, BC_CMD_ID_COVER_STANDALONE_460, BC_CMD_ID_COVER_STANDALONE_461, BC_CMD_ID_COVER_STANDALONE_462, BC_CMD_ID_DING_DONG_CTRL, BC_CMD_ID_DING_DONG_OPT, BC_CMD_ID_FILE_INFO_LIST_CLOSE, BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO, BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD, BC_CMD_ID_FILE_INFO_LIST_GET, BC_CMD_ID_FILE_INFO_LIST_OPEN, BC_CMD_ID_FILE_INFO_LIST_REPLAY, BC_CMD_ID_FILE_INFO_LIST_STOP, BC_CMD_ID_FIND_REC_VIDEO_CLOSE, BC_CMD_ID_FIND_REC_VIDEO_GET, BC_CMD_ID_FIND_REC_VIDEO_OPEN, BC_CMD_ID_FLOODLIGHT_STATUS_LIST, BC_CMD_ID_GET_ABILITY_SUPPORT, BC_CMD_ID_GET_ACCESS_USER_LIST, BC_CMD_ID_GET_AI_ALARM, BC_CMD_ID_GET_AI_CFG, BC_CMD_ID_GET_AI_DENOISE, BC_CMD_ID_GET_AUDIO_ALARM, BC_CMD_ID_GET_AUDIO_CFG, BC_CMD_ID_GET_AUDIO_TASK, BC_CMD_ID_GET_BATTERY_INFO, BC_CMD_ID_GET_BATTERY_INFO_LIST, BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD, BC_CMD_ID_GET_DAY_RECORDS, BC_CMD_ID_GET_DING_DONG_CFG, BC_CMD_ID_GET_DING_DONG_LIST, BC_CMD_ID_GET_DING_DONG_SILENT, BC_CMD_ID_GET_EMAIL_TASK, BC_CMD_ID_GET_FTP_TASK, BC_CMD_ID_GET_HDD_INFO_LIST, BC_CMD_ID_GET_KIT_AP_CFG, BC_CMD_ID_GET_LED_STATE, BC_CMD_ID_GET_MOTION_ALARM, BC_CMD_ID_GET_ONLINE_USER_LIST, BC_CMD_ID_GET_OSD_DATETIME, BC_CMD_ID_GET_PIR_INFO, BC_CMD_ID_GET_PTZ_POSITION, BC_CMD_ID_GET_PTZ_PRESET, BC_CMD_ID_GET_RECORD, BC_CMD_ID_GET_RECORD_CFG, BC_CMD_ID_GET_REC_ENC_CFG, BC_CMD_ID_GET_SIREN_STATUS, BC_CMD_ID_GET_SLEEP_STATE, BC_CMD_ID_GET_STREAM_INFO_LIST, BC_CMD_ID_GET_SUPPORT, BC_CMD_ID_GET_SYSTEM_GENERAL, BC_CMD_ID_GET_TIMELAPSE_CFG, BC_CMD_ID_GET_VIDEO_INPUT, BC_CMD_ID_GET_WHITE_LED, BC_CMD_ID_GET_WIFI, BC_CMD_ID_GET_WIFI_SIGNAL, BC_CMD_ID_GET_ZOOM_FOCUS, BC_CMD_ID_LOGIN, BC_CMD_ID_LOGOUT, BC_CMD_ID_PING, BC_CMD_ID_PTZ_CONTROL, BC_CMD_ID_PTZ_CONTROL_PRESET, BC_CMD_ID_PUSH_COORDINATE_POINT_LIST, BC_CMD_ID_PUSH_DINGDONG_LIST, BC_CMD_ID_PUSH_NET_INFO, BC_CMD_ID_PUSH_SERIAL, BC_CMD_ID_PUSH_SLEEP_STATUS, BC_CMD_ID_PUSH_VIDEO_INPUT, BC_CMD_ID_QUICK_REPLY_PLAY, BC_CMD_ID_SET_AI_ALARM, BC_CMD_ID_SET_AI_CFG, BC_CMD_ID_SET_AUDIO_TASK, BC_CMD_ID_SET_DING_DONG_CFG, BC_CMD_ID_SET_DING_DONG_SILENT, BC_CMD_ID_SET_MOTION_ALARM, BC_CMD_ID_SET_PIR_INFO, BC_CMD_ID_SET_WHITE_LED_STATE, BC_CMD_ID_SET_WHITE_LED_TASK, BC_CMD_ID_SET_ZOOM_FOCUS, BC_CMD_ID_SUPPORT, BC_CMD_ID_TALK, BC_CMD_ID_TALK_ABILITY, BC_CMD_ID_TALK_CONFIG, BC_CMD_ID_TALK_RESET, BC_CMD_ID_UDP_KEEP_ALIVE, BC_CMD_ID_VIDEO, BC_CMD_ID_VIDEO_STOP, BC_MAGIC, BC_MAGIC_REV, BC_TCP_DEFAULT_PORT, BC_XML_KEY, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFrame, BaichuanFrameParser, type BaichuanGetOsdDatetimeResult, type BaichuanHeader, BaichuanHlsServer, type BaichuanHlsServerOptions, BaichuanHttpStreamServer, type BaichuanHttpStreamServerOptions, type BaichuanLedState, BaichuanMjpegServer, type BaichuanMjpegServerOptions, type BaichuanNetInfoPush, type BaichuanOsdChannelName, type BaichuanOsdDatetime, type BaichuanRecordCfg, type BaichuanRecordSchedule, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSleepState, type BaichuanSleepStatusPush, type BaichuanStreamEncodeTable, type BaichuanStreamInfo, type BaichuanStreamInfoList, type BaichuanTransport, type BaichuanVideoInputPush, BaichuanVideoStream, type BaichuanVideoStreamOptions, BaichuanWebRTCServer, type BaichuanWebRTCServerOptions, type BaichuanWifi, type BaichuanWifiSignal, type BatteryInfo, type BatteryInfoResponse, type BcMedia, type BcMediaAac, type BcMediaAdpcm, BcMediaAnnexBDecoder, type BcMediaAnnexBDecoderStats, type BcMediaAnnexBInfo, type BcMediaAudioFrame, type BcMediaAudioType, BcMediaCodec, type BcMediaIframe, type BcMediaInfoV1, type BcMediaInfoV2, type BcMediaPframe, type BcMediaType, type BcMediaVideoFrame, type BcMediaVideoType, type BcUdpDiscoveryMethod, BcUdpStream, type BcUdpStreamOptions, type CgiAbility, type CgiAbilityChn, type CgiAbilityLeaf, type CgiAiKey, type CgiAiStateValue, type CgiAudioAlarmPlayParam, type CgiBattery, type CgiChannelStatusEntry, type CgiChnTypeInfoValue, type CgiDetectionState, type CgiDevInfo, type CgiDeviceInfoEntries, type CgiEnc, type CgiEncStream, type CgiEncValue, type CgiGetAbilityResponse, type CgiGetAbilityValue, type CgiGetAiStateResponse, type CgiGetChannelstatusResponse, type CgiGetChannelstatusValue, type CgiGetChnTypeInfoResponse, type CgiGetDevInfoResponse, type CgiGetDevInfoValue, type CgiGetEncResponse, type CgiGetOsdValue, type CgiGetRtspUrlResponse, type CgiGetRtspUrlValue, type CgiGetVideoclipsParams, type CgiNetPort, type CgiOsd, type CgiPirInfo, type CgiPtzPreset, type CgiSetOsdParam, type CgiSetPirInfoParam, type CgiSetWhiteLedParam, type CgiWhiteLed, type ChannelPushCacheEntry, type ChannelPushDataEntry, type ChannelRecordingFile, type ChannelStreamMetadata, type ChimeAlarmCfg, type ChimeCfg, type ChimeDevice, type ChimeParams, type CollectNvrDiagnosticsOptions, CompositeRtspServer, type CompositeRtspServerOptions, CompositeStream, type CompositeStreamOptions, type CompositeStreamPipOptions, DUAL_LENS_DUAL_MOTION_MODELS, DUAL_LENS_MODELS, DUAL_LENS_SINGLE_MOTION_MODELS, type DayNightThresholdConfig, type DebugConfig, type DebugOptions, type DeviceAbilities, type DeviceCapabilities, type DeviceCapabilitiesCacheEntry, type DeviceCapabilitiesDebugInfo, type DeviceCapabilitiesResult, type DeviceInfoResponse, type DeviceInputData, type DeviceObjectType, type DeviceStatusResponse, type DeviceSupportFlags, type DeviceType, type DiagnosticsCollectorResult, type DiagnosticsStreamKind, type DiscoveredDevice, type DiscoveryOptions, type DownloadRecordingParams, type DualLensChannelAnalysis, type DualLensChannelInfo, type EmailTaskConfig, type EncryptionProtocol, type Events, type EventsResponse, type FloodlightTaskConfig, type FtpTaskConfig, type GetRecordingVideoResult, type GetRecordingVideoStats, type GetVideoclipsParams, type GetVodUrlParams, Go2rtcTcpServer, type Go2rtcTcpServerOptions, H264RtpDepacketizer, H265RtpDepacketizer, type HardwiredChimeState, type HddInfoListConfig, type HlsCodec, type HlsHttpResponse, type HlsServerStatus, type HlsSession, HlsSessionManager, type HlsSessionManagerOptions, type HlsSessionParams, Intercom, type IntercomOptions, type JsonObject, type JsonPrimitive, type JsonValue, type LastSleepProbe, type LogLevel, type Logger, type LoggerCallback, type LoginResponseValue, type MaxEncryption, type MediaStream, type MjpegFrame, MjpegTransformer, type MjpegTransformerOptions, type ModelFixtureCaptureResult, type MotionAlarmConfig, type MotionEvent, NVR_HUB_EXACT_TYPES, NVR_HUB_MODEL_PATTERNS, type NativeVideoStreamVariant, type NvrChannelsSummaryCacheEntry, type OnlineUserListConfig, type OsdChannel, type OsdConfig, type OsdTime, type ParsedRecordingFileName, type PipPosition, type PirConfig, type PirState, type PlaybackSnapshotStreamInfo, type PtzCommand, type PtzPosition, type PtzPreset, type RecEncConfig, type RecordingAudioCodec, type RecordingDetectionClass, type RecordingDevType, type RecordingFile, type RecordingPlaybackUrls, type RecordingStreamType, type RecordingVideoCodec, type RecordingVodFlags, type RecordingVodStreamHint, type RecordingsCacheEntry, type RecordingsQueueItem, type ReolinkAiNotification, ReolinkBaichuanApi, type ReolinkBaichuanChannelIdentity, type ReolinkBaichuanChannelInfo, type ReolinkBaichuanDeviceSummary, type ReolinkBaichuanNetworkInfo, type ReolinkBaichuanPorts, ReolinkCgiApi, type ReolinkCmdRequest, type ReolinkCmdResponse, type ReolinkCmdResponseExt, type ReolinkDayNightNotification, type ReolinkDeviceInfo, type ReolinkDeviceInfoTag, type ReolinkEvent, ReolinkHttpClient, type ReolinkHttpClientOptions, type ReolinkJson, type ReolinkMotionNotification, type ReolinkNvrChannelInfo, type ReolinkNvrDeviceGroupSummary, type ReolinkNvrDeviceGroupsResult, type ReolinkSimpleEvent, type ReolinkSimpleEventType, type ReolinkSupportedStream, type ReolinkVideoStreamOptionsResult, type ReolinkVisitorNotification, type ReplayHttpServer, type ReplayHttpServerOptions, type ResponseMediaStreamOptions, type Rfc4571ApiFactoryContext, type Rfc4571Client, Rfc4571Muxer, type Rfc4571ReplayServer, type Rfc4571ReplayServerOptions, type Rfc4571TcpServer, type Rfc4571TcpServerOptions, type RtpPacketizationOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type SirenState, type SirenStatusConfig, type SleepState, type SleepStatus, type StreamMetadata, type StreamProfile, type StreamSamplingOptions, type StreamSamplingSelection, type SupportConfig, type SupportInfo, type SupportItem, type SystemGeneralConfig, type TalkAbility$1 as TalkAbility, type TalkAudioConfig, type TalkConfig, type TalkSession$1 as TalkSession, type TalkSessionInfo, type TimelapseCfgConfig, type TwoWayAudioConfig, type VideoCodec, type VideoInputConfig, type VideoParamSets, type VideoStreamOptions, type VideoStreamOptionsCacheEntry, type VideoType, type VideoclipClientInfo, type VideoclipModeDecision, type VideoclipThumbnailResult, type VideoclipTranscodeMode, type VodFile, type VodSearchResponse, type VodSearchResult, type VodSearchStatus, type WakeUpOptions, type WebRTCAnswer, type WebRTCIceCandidate, type WebRTCOffer, type WebRTCSessionInfo, type WhiteLedConfig, type WhiteLedState, type WirelessChimeSilentState, type ZoomFocusStatus, type ZoomFocusTriplet, abilitiesHasAny, aesDecrypt, aesEncrypt, asLogger, autoDetectDeviceType, bcDecrypt, bcEncrypt, bcHeaderHasPayloadOffset, buildAacAudioSpecificConfigHex, buildAbilityInfoExtensionXml, buildBinaryExtensionXml, buildChannelExtensionXml, buildFloodlightManualXml, buildHlsRedirectUrl, buildLoginXml, buildLogoutXml, buildPreviewStopXml, buildPreviewStopXmlV11, buildPreviewXml, buildPreviewXmlV11, buildPtzControlXml, buildPtzPresetXml, buildPtzPresetXmlV2, buildRfc4571Sdp, buildRtspPath, buildRtspUrl, buildSirenManualXml, buildSirenTimesXml, buildStartZoomFocusXml, buildWhiteLedStateXml, captureModelFixtures, collectCgiDiagnostics, collectMultifocalDiagnostics, collectNativeDiagnostics, collectNvrDiagnostics, computeDeviceCapabilities, computeExpectedStreamCompatibility, convertToAnnexB as convertH265ToAnnexB, convertToAnnexB$1 as convertToAnnexB, convertToLengthPrefixed, createBaichuanEndpointsServer, createDebugGateLogger, createDiagnosticsBundle, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideVideoclipTranscodeMode, decodeHeader, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaArpTable, discoverViaDhcpListener, discoverViaHttpScan, discoverViaOnvif, discoverViaTcpPortScan, discoverViaUdpBroadcast, discoverViaUdpDirect, encodeHeader, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, getConstructedVideoStreamOptions, getGlobalLogger, getH265NalType, getMjpegContentType, getSupportItemForChannel, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isTcpFailureThatShouldFallbackToUdp, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, maskUid, md5HexUpper, md5StrModern, normalizeUid, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseSupportXml, printNvrDiagnostics, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, sanitizeFixtureData, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, testChannelStreams, xmlEscape, xmlIndicatesFloodlight, zipDirectory };
10119
+ export { type AIDetectionState, type AIEvent, type AIState, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiKey, type AiTypesCacheEntry, type AnyBuffer, type AudioAlarmParams, type AudioCfgConfig, type AudioConfig, type AudioNoiseConfig, type AudioTaskConfig, type AutoDetectInputs, type AutoDetectMode, type AutoDetectResult, type AutoFocusConfig, AutodiscoveryClient, type AutodiscoveryClientOptions, BC_AES_IV, BC_CLASS_FILE_DOWNLOAD, BC_CLASS_LEGACY, BC_CLASS_MODERN_20, BC_CLASS_MODERN_24, BC_CLASS_MODERN_24_ALT, BC_CMD_ID_ABILITY_INFO, BC_CMD_ID_ALARM_EVENT_LIST, BC_CMD_ID_AUDIO_ALARM_PLAY, BC_CMD_ID_CHANNEL_INFO_ALL, BC_CMD_ID_CMD_123, BC_CMD_ID_CMD_209, BC_CMD_ID_CMD_265, BC_CMD_ID_CMD_440, BC_CMD_ID_COVER_PREVIEW, BC_CMD_ID_COVER_RESPONSE, BC_CMD_ID_COVER_STANDALONE_458, BC_CMD_ID_COVER_STANDALONE_459, BC_CMD_ID_COVER_STANDALONE_460, BC_CMD_ID_COVER_STANDALONE_461, BC_CMD_ID_COVER_STANDALONE_462, BC_CMD_ID_DING_DONG_CTRL, BC_CMD_ID_DING_DONG_OPT, BC_CMD_ID_FILE_INFO_LIST_CLOSE, BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO, BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD, BC_CMD_ID_FILE_INFO_LIST_GET, BC_CMD_ID_FILE_INFO_LIST_OPEN, BC_CMD_ID_FILE_INFO_LIST_REPLAY, BC_CMD_ID_FILE_INFO_LIST_STOP, BC_CMD_ID_FIND_REC_VIDEO_CLOSE, BC_CMD_ID_FIND_REC_VIDEO_GET, BC_CMD_ID_FIND_REC_VIDEO_OPEN, BC_CMD_ID_FLOODLIGHT_STATUS_LIST, BC_CMD_ID_GET_ABILITY_SUPPORT, BC_CMD_ID_GET_ACCESS_USER_LIST, BC_CMD_ID_GET_AI_ALARM, BC_CMD_ID_GET_AI_CFG, BC_CMD_ID_GET_AI_DENOISE, BC_CMD_ID_GET_AUDIO_ALARM, BC_CMD_ID_GET_AUDIO_CFG, BC_CMD_ID_GET_AUDIO_TASK, BC_CMD_ID_GET_AUTO_FOCUS, BC_CMD_ID_GET_BATTERY_INFO, BC_CMD_ID_GET_BATTERY_INFO_LIST, BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD, BC_CMD_ID_GET_DAY_RECORDS, BC_CMD_ID_GET_DING_DONG_CFG, BC_CMD_ID_GET_DING_DONG_LIST, BC_CMD_ID_GET_DING_DONG_SILENT, BC_CMD_ID_GET_EMAIL_TASK, BC_CMD_ID_GET_ENC, BC_CMD_ID_GET_FTP_TASK, BC_CMD_ID_GET_HDD_INFO_LIST, BC_CMD_ID_GET_KIT_AP_CFG, BC_CMD_ID_GET_LED_STATE, BC_CMD_ID_GET_MOTION_ALARM, BC_CMD_ID_GET_ONLINE_USER_LIST, BC_CMD_ID_GET_OSD_DATETIME, BC_CMD_ID_GET_PIR_INFO, BC_CMD_ID_GET_PRIVACY_MASK, BC_CMD_ID_GET_PTZ_POSITION, BC_CMD_ID_GET_PTZ_PRESET, BC_CMD_ID_GET_PUSH_TASK, BC_CMD_ID_GET_RECORD, BC_CMD_ID_GET_RECORD_CFG, BC_CMD_ID_GET_REC_ENC_CFG, BC_CMD_ID_GET_SIREN_STATUS, BC_CMD_ID_GET_SLEEP_STATE, BC_CMD_ID_GET_STREAM_INFO_LIST, BC_CMD_ID_GET_SUPPORT, BC_CMD_ID_GET_SYSTEM_GENERAL, BC_CMD_ID_GET_TIMELAPSE_CFG, BC_CMD_ID_GET_VIDEO_INPUT, BC_CMD_ID_GET_WHITE_LED, BC_CMD_ID_GET_WIFI, BC_CMD_ID_GET_WIFI_SIGNAL, BC_CMD_ID_GET_ZOOM_FOCUS, BC_CMD_ID_LOGIN, BC_CMD_ID_LOGOUT, BC_CMD_ID_PING, BC_CMD_ID_PTZ_CONTROL, BC_CMD_ID_PTZ_CONTROL_PRESET, BC_CMD_ID_PUSH_COORDINATE_POINT_LIST, BC_CMD_ID_PUSH_DINGDONG_LIST, BC_CMD_ID_PUSH_NET_INFO, BC_CMD_ID_PUSH_SERIAL, BC_CMD_ID_PUSH_SLEEP_STATUS, BC_CMD_ID_PUSH_VIDEO_INPUT, BC_CMD_ID_QUICK_REPLY_PLAY, BC_CMD_ID_SET_AI_ALARM, BC_CMD_ID_SET_AI_CFG, BC_CMD_ID_SET_AI_DENOISE, BC_CMD_ID_SET_AUDIO_CFG, BC_CMD_ID_SET_AUDIO_TASK, BC_CMD_ID_SET_AUTO_FOCUS, BC_CMD_ID_SET_DAY_NIGHT_THRESHOLD, BC_CMD_ID_SET_DING_DONG_CFG, BC_CMD_ID_SET_DING_DONG_SILENT, BC_CMD_ID_SET_EMAIL_TASK, BC_CMD_ID_SET_ENC, BC_CMD_ID_SET_LED_STATE, BC_CMD_ID_SET_MOTION_ALARM, BC_CMD_ID_SET_PIR_INFO, BC_CMD_ID_SET_PRIVACY_MASK, BC_CMD_ID_SET_PUSH_TASK, BC_CMD_ID_SET_RECORD, BC_CMD_ID_SET_RECORD_CFG, BC_CMD_ID_SET_VIDEO_INPUT, BC_CMD_ID_SET_WHITE_LED_STATE, BC_CMD_ID_SET_WHITE_LED_TASK, BC_CMD_ID_SET_ZOOM_FOCUS, BC_CMD_ID_SUPPORT, BC_CMD_ID_TALK, BC_CMD_ID_TALK_ABILITY, BC_CMD_ID_TALK_CONFIG, BC_CMD_ID_TALK_RESET, BC_CMD_ID_UDP_KEEP_ALIVE, BC_CMD_ID_VIDEO, BC_CMD_ID_VIDEO_STOP, BC_MAGIC, BC_MAGIC_REV, BC_TCP_DEFAULT_PORT, BC_XML_KEY, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFrame, BaichuanFrameParser, type BaichuanGetOsdDatetimeResult, type BaichuanHeader, BaichuanHlsServer, type BaichuanHlsServerOptions, BaichuanHttpStreamServer, type BaichuanHttpStreamServerOptions, type BaichuanLedState, BaichuanMjpegServer, type BaichuanMjpegServerOptions, type BaichuanNetInfoPush, type BaichuanOsdChannelName, type BaichuanOsdDatetime, type BaichuanRecordCfg, type BaichuanRecordSchedule, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSleepState, type BaichuanSleepStatusPush, type BaichuanStreamEncodeTable, type BaichuanStreamInfo, type BaichuanStreamInfoList, type BaichuanTransport, type BaichuanVideoInputPush, BaichuanVideoStream, type BaichuanVideoStreamOptions, BaichuanWebRTCServer, type BaichuanWebRTCServerOptions, type BaichuanWifi, type BaichuanWifiSignal, type BatteryInfo, type BatteryInfoResponse, type BcMedia, type BcMediaAac, type BcMediaAdpcm, BcMediaAnnexBDecoder, type BcMediaAnnexBDecoderStats, type BcMediaAnnexBInfo, type BcMediaAudioFrame, type BcMediaAudioType, BcMediaCodec, type BcMediaIframe, type BcMediaInfoV1, type BcMediaInfoV2, type BcMediaPframe, type BcMediaType, type BcMediaVideoFrame, type BcMediaVideoType, type BcUdpDiscoveryMethod, BcUdpStream, type BcUdpStreamOptions, type CgiAbility, type CgiAbilityChn, type CgiAbilityLeaf, type CgiAiAlarm, type CgiAiCfg, type CgiAiKey, type CgiAiStateValue, type CgiAudioAlarm, type CgiAudioAlarmPlayParam, type CgiAudioCfg, type CgiAudioNoise, type CgiAutoFocus, type CgiBattery, type CgiChannelStatusEntry, type CgiChnTypeInfoValue, type CgiDetectionState, type CgiDevInfo, type CgiDeviceInfoEntries, type CgiEmail, type CgiEnc, type CgiEncStream, type CgiEncValue, type CgiGetAbilityResponse, type CgiGetAbilityValue, type CgiGetAiAlarmValue, type CgiGetAiCfgValue, type CgiGetAiStateResponse, type CgiGetAudioAlarmValue, type CgiGetAudioCfgValue, type CgiGetAudioNoiseValue, type CgiGetAutoFocusValue, type CgiGetChannelstatusResponse, type CgiGetChannelstatusValue, type CgiGetChnTypeInfoResponse, type CgiGetDevInfoResponse, type CgiGetDevInfoValue, type CgiGetEmailValue, type CgiGetEncResponse, type CgiGetImageValue, type CgiGetIrLightsValue, type CgiGetIspValue, type CgiGetMaskValue, type CgiGetMdAlarmValue, type CgiGetOsdValue, type CgiGetPushValue, type CgiGetRecValue, type CgiGetRtspUrlResponse, type CgiGetRtspUrlValue, type CgiGetVideoclipsParams, type CgiImage, type CgiIrLights, type CgiIsp, type CgiMask, type CgiMaskShelter, type CgiMdAlarm, type CgiMdAlarmScope, type CgiMdAlarmSens, type CgiNetPort, type CgiOsd, type CgiPirInfo, type CgiPtzPreset, type CgiPush, type CgiRec, type CgiRecSchedule, type CgiSetAiAlarmParam, type CgiSetAiCfgParam, type CgiSetAudioAlarmParam, type CgiSetAudioCfgParam, type CgiSetAudioNoiseParam, type CgiSetAutoFocusParam, type CgiSetEmailParam, type CgiSetEncParam, type CgiSetImageParam, type CgiSetIrLightsParam, type CgiSetIspParam, type CgiSetMaskParam, type CgiSetMdAlarmParam, type CgiSetOsdParam, type CgiSetPirInfoParam, type CgiSetPushParam, type CgiSetRecParam, type CgiSetWhiteLedParam, type CgiWhiteLed, type ChannelPushCacheEntry, type ChannelPushDataEntry, type ChannelRecordingFile, type ChannelStreamMetadata, type ChimeAlarmCfg, type ChimeCfg, type ChimeDevice, type ChimeParams, type CollectNvrDiagnosticsOptions, CompositeRtspServer, type CompositeRtspServerOptions, CompositeStream, type CompositeStreamOptions, type CompositeStreamPipOptions, type CompressionStream, DUAL_LENS_DUAL_MOTION_MODELS, DUAL_LENS_MODELS, DUAL_LENS_SINGLE_MOTION_MODELS, type DayNightThresholdConfig, type DebugConfig, type DebugOptions, type DeviceAbilities, type DeviceCapabilities, type DeviceCapabilitiesCacheEntry, type DeviceCapabilitiesDebugInfo, type DeviceCapabilitiesResult, type DeviceInfoResponse, type DeviceInputData, type DeviceObjectType, type DeviceStatusResponse, type DeviceSupportFlags, type DeviceType, type DiagnosticsCollectorResult, type DiagnosticsStreamKind, type DiscoveredDevice, type DiscoveryOptions, type DownloadRecordingParams, type DualLensChannelAnalysis, type DualLensChannelInfo, type EmailTaskConfig, type EncConfig, type EncryptionProtocol, type Events, type EventsResponse, type FloodlightTaskConfig, type FtpTaskConfig, type GetRecordingVideoResult, type GetRecordingVideoStats, type GetVideoclipsParams, type GetVodUrlParams, Go2rtcTcpServer, type Go2rtcTcpServerOptions, H264RtpDepacketizer, H265RtpDepacketizer, type HardwiredChimeState, type HddInfoListConfig, type HlsCodec, type HlsHttpResponse, type HlsServerStatus, type HlsSession, HlsSessionManager, type HlsSessionManagerOptions, type HlsSessionParams, Intercom, type IntercomOptions, type IrLightsConfig, type IspConfig, type JsonObject, type JsonPrimitive, type JsonValue, type LastSleepProbe, type LogLevel, type Logger, type LoggerCallback, type LoginResponseValue, type MaskConfig, type MaxEncryption, type MediaStream, type MjpegFrame, MjpegTransformer, type MjpegTransformerOptions, type ModelFixtureCaptureResult, type MotionAlarmConfig, type MotionEvent, MpegTsMuxer, type MpegTsMuxerOptions, NVR_HUB_EXACT_TYPES, NVR_HUB_MODEL_PATTERNS, type NativeVideoStreamVariant, type NvrChannelsSummaryCacheEntry, type OnlineUserListConfig, type OsdChannel, type OsdConfig, type OsdTime, type ParsedRecordingFileName, type PipPosition, type PirConfig, type PirState, type PlaybackSnapshotStreamInfo, type PtzCommand, type PtzPosition, type PtzPreset, type RecEncConfig, type RecordingAudioCodec, type RecordingDetectionClass, type RecordingDevType, type RecordingFile, type RecordingPlaybackUrls, type RecordingStreamType, type RecordingVideoCodec, type RecordingVodFlags, type RecordingVodStreamHint, type RecordingsCacheEntry, type RecordingsQueueItem, type ReolinkAiNotification, ReolinkBaichuanApi, type ReolinkBaichuanChannelIdentity, type ReolinkBaichuanChannelInfo, type ReolinkBaichuanDeviceSummary, type ReolinkBaichuanNetworkInfo, type ReolinkBaichuanPorts, ReolinkCgiApi, type ReolinkCmdRequest, type ReolinkCmdResponse, type ReolinkCmdResponseExt, type ReolinkDayNightNotification, type ReolinkDeviceInfo, type ReolinkDeviceInfoTag, type ReolinkEvent, ReolinkHttpClient, type ReolinkHttpClientOptions, type ReolinkJson, type ReolinkMotionNotification, type ReolinkNvrChannelInfo, type ReolinkNvrDeviceGroupSummary, type ReolinkNvrDeviceGroupsResult, type ReolinkSimpleEvent, type ReolinkSimpleEventType, type ReolinkSupportedStream, type ReolinkVideoStreamOptionsResult, type ReolinkVisitorNotification, type ReplayHttpServer, type ReplayHttpServerOptions, type ResponseMediaStreamOptions, type Rfc4571ApiFactoryContext, type Rfc4571Client, Rfc4571Muxer, type Rfc4571ReplayServer, type Rfc4571ReplayServerOptions, type Rfc4571TcpServer, type Rfc4571TcpServerOptions, type RtpPacketizationOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type SirenState, type SirenStatusConfig, type SleepInferenceDecision, type SleepInferenceInput, type SleepInferencePending, type SleepState, type SleepStatus, type StreamMetadata, type StreamProfile, type StreamSamplingOptions, type StreamSamplingSelection, type SupportConfig, type SupportInfo, type SupportItem, type SystemGeneralConfig, type TalkAbility$1 as TalkAbility, type TalkAudioConfig, type TalkConfig, type TalkSession$1 as TalkSession, type TalkSessionInfo, type TimelapseCfgConfig, type TwoWayAudioConfig, type VideoCodec, type VideoInputConfig, type VideoParamSets, type VideoStreamOptions, type VideoStreamOptionsCacheEntry, type VideoType, type VideoclipClientInfo, type VideoclipModeDecision, type VideoclipThumbnailResult, type VideoclipTranscodeMode, type VodFile, type VodSearchResponse, type VodSearchResult, type VodSearchStatus, type WakeUpOptions, type WebRTCAnswer, type WebRTCIceCandidate, type WebRTCOffer, type WebRTCSessionInfo, type WhiteLedConfig, type WhiteLedState, type WirelessChimeSilentState, type ZoomFocusStatus, type ZoomFocusTriplet, abilitiesHasAny, aesDecrypt, aesEncrypt, applyStreamPatch, applyXmlTagPatch, asLogger, autoDetectDeviceType, bcDecrypt, bcEncrypt, bcHeaderHasPayloadOffset, buildAacAudioSpecificConfigHex, buildAbilityInfoExtensionXml, buildBinaryExtensionXml, buildChannelExtensionXml, buildFloodlightManualXml, buildHlsRedirectUrl, buildLoginXml, buildLogoutXml, buildPreviewStopXml, buildPreviewStopXmlV11, buildPreviewXml, buildPreviewXmlV11, buildPtzControlXml, buildPtzPresetXml, buildPtzPresetXmlV2, buildRfc4571Sdp, buildRtspPath, buildRtspUrl, buildSirenManualXml, buildSirenTimesXml, buildStartZoomFocusXml, buildWhiteLedStateXml, captureModelFixtures, collectCgiDiagnostics, collectMultifocalDiagnostics, collectNativeDiagnostics, collectNvrDiagnostics, computeDeviceCapabilities, computeExpectedStreamCompatibility, convertToAnnexB as convertH265ToAnnexB, convertToAnnexB$1 as convertToAnnexB, convertToLengthPrefixed, createBaichuanEndpointsServer, createDebugGateLogger, createDiagnosticsBundle, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideSleepInferenceTransition, decideVideoclipTranscodeMode, decodeHeader, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaArpTable, discoverViaDhcpListener, discoverViaHttpScan, discoverViaOnvif, discoverViaTcpPortScan, discoverViaUdpBroadcast, discoverViaUdpDirect, encodeHeader, ensureXmlHeader, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, getConstructedVideoStreamOptions, getGlobalLogger, getH265NalType, getMjpegContentType, getSupportItemForChannel, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isTcpFailureThatShouldFallbackToUdp, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, maskUid, md5HexUpper, md5StrModern, normalizeDayNightMode, normalizeOpenClose, normalizeUid, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseSupportXml, patchNestedTag, printNvrDiagnostics, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, sanitizeFixtureData, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, testChannelStreams, xmlEscape, xmlIndicatesFloodlight, zipDirectory };