@apocaliss92/nodelink-js 0.4.11 → 0.4.13
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/README.md +24 -0
- package/dist/BaichuanVideoStream-HGPU2MZ3.js +7 -0
- package/dist/{DiagnosticsTools-RNIDFEJK.js → DiagnosticsTools-BQOWJ23L.js} +3 -2
- package/dist/DiagnosticsTools-BQOWJ23L.js.map +1 -0
- package/dist/{chunk-EDLMKBG2.js → chunk-2JNXKT3C.js} +151 -2733
- package/dist/chunk-2JNXKT3C.js.map +1 -0
- package/dist/chunk-C57QV7IL.js +2723 -0
- package/dist/chunk-C57QV7IL.js.map +1 -0
- package/dist/{chunk-HGQ53FB3.js → chunk-R5AJV73A.js} +1348 -47
- package/dist/chunk-R5AJV73A.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +1422 -12
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +3 -2
- package/dist/cli/rtsp-server.js.map +1 -1
- package/dist/index.cjs +1929 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1051 -172
- package/dist/index.d.ts +965 -46
- package/dist/index.js +547 -85
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/chunk-EDLMKBG2.js.map +0 -1
- package/dist/chunk-HGQ53FB3.js.map +0 -1
- /package/dist/{DiagnosticsTools-RNIDFEJK.js.map → BaichuanVideoStream-HGPU2MZ3.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -88,9 +88,11 @@ declare const BC_CMD_ID_SUPPORT = 199;
|
|
|
88
88
|
declare const BC_CMD_ID_PING = 93;
|
|
89
89
|
declare const BC_CMD_ID_CHANNEL_INFO_ALL = 145;
|
|
90
90
|
declare const BC_CMD_ID_GET_OSD_DATETIME = 44;
|
|
91
|
+
declare const BC_CMD_ID_SET_OSD_DATETIME = 45;
|
|
91
92
|
declare const BC_CMD_ID_GET_RECORD_CFG = 54;
|
|
92
93
|
declare const BC_CMD_ID_GET_ABILITY_SUPPORT = 58;
|
|
93
94
|
declare const BC_CMD_ID_GET_FTP_TASK = 70;
|
|
95
|
+
declare const BC_CMD_ID_GET_VERSION_INFO = 80;
|
|
94
96
|
declare const BC_CMD_ID_GET_RECORD = 81;
|
|
95
97
|
declare const BC_CMD_ID_GET_HDD_INFO_LIST = 102;
|
|
96
98
|
declare const BC_CMD_ID_GET_WIFI_SIGNAL = 115;
|
|
@@ -132,6 +134,16 @@ declare const BC_CMD_ID_GET_PUSH_TASK = 219;
|
|
|
132
134
|
declare const BC_CMD_ID_SET_PUSH_TASK = 218;
|
|
133
135
|
declare const BC_CMD_ID_GET_AUTO_FOCUS = 224;
|
|
134
136
|
declare const BC_CMD_ID_SET_AUTO_FOCUS = 225;
|
|
137
|
+
declare const BC_CMD_ID_GET_EMAIL = 42;
|
|
138
|
+
declare const BC_CMD_ID_SET_EMAIL = 43;
|
|
139
|
+
declare const BC_CMD_ID_TEST_EMAIL = 141;
|
|
140
|
+
declare const BC_CMD_ID_GET_NTP = 38;
|
|
141
|
+
declare const BC_CMD_ID_SET_NTP = 39;
|
|
142
|
+
declare const BC_CMD_ID_SET_SYSTEM_GENERAL = 105;
|
|
143
|
+
declare const BC_CMD_ID_GET_DST = 106;
|
|
144
|
+
declare const BC_CMD_ID_SET_DST = 107;
|
|
145
|
+
declare const BC_CMD_ID_GET_AUTO_REBOOT = 101;
|
|
146
|
+
declare const BC_CMD_ID_SET_AUTO_REBOOT = 100;
|
|
135
147
|
/** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
|
|
136
148
|
declare const BC_CMD_ID_CMD_123 = 123;
|
|
137
149
|
/** @deprecated Use {@link BC_CMD_ID_SET_LED_STATE} (209). */
|
|
@@ -411,6 +423,12 @@ declare function ensureXmlHeader(xml: string): string;
|
|
|
411
423
|
* pass partial patches without branching at every field.
|
|
412
424
|
*/
|
|
413
425
|
declare function applyXmlTagPatch(xml: string, tag: string, value: string | number | boolean | undefined): string;
|
|
426
|
+
/**
|
|
427
|
+
* Like {@link applyXmlTagPatch} but inserts the tag at the end of the block
|
|
428
|
+
* when it is not already present. Required for fields the camera omits on
|
|
429
|
+
* GET responses but expects on SET (e.g. `<encoderType>` on `setEnc`).
|
|
430
|
+
*/
|
|
431
|
+
declare function upsertXmlTag(xml: string, tag: string, value: string | number | boolean | undefined): string;
|
|
414
432
|
/**
|
|
415
433
|
* Patch a child tag inside a named parent block. Used for nested
|
|
416
434
|
* structures like `<DayNight><mode>...</mode></DayNight>` where the
|
|
@@ -418,15 +436,27 @@ declare function applyXmlTagPatch(xml: string, tag: string, value: string | numb
|
|
|
418
436
|
*/
|
|
419
437
|
declare function patchNestedTag(xml: string, parent: string, child: string, value: string | number | boolean | undefined): string;
|
|
420
438
|
/**
|
|
421
|
-
* Patch
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
|
|
426
|
-
|
|
439
|
+
* Patch fields inside a `<Compression>` stream block (`<mainStream>`,
|
|
440
|
+
* `<subStream>`, or `<thirdStream>`). Used by `setEnc` — Reolink emits all
|
|
441
|
+
* three blocks in the same document so a per-block scope is needed to avoid
|
|
442
|
+
* clobbering the wrong stream.
|
|
443
|
+
*
|
|
444
|
+
* The mapping `videoEncType` ↔ codec uses the convention seen on the wire:
|
|
445
|
+
* 0 = H.264
|
|
446
|
+
* 1 = H.265
|
|
447
|
+
* Both `<frame>` (camera-side preferred) and `<frameRate>` (older reolink_aio
|
|
448
|
+
* naming) are patched defensively — no-op if only one is present.
|
|
449
|
+
*/
|
|
450
|
+
declare function applyStreamPatch(xml: string, streamTag: "mainStream" | "subStream" | "thirdStream", patch: {
|
|
451
|
+
audio?: 0 | 1;
|
|
452
|
+
width?: number;
|
|
453
|
+
height?: number;
|
|
427
454
|
bitRate?: number;
|
|
428
455
|
frameRate?: number;
|
|
429
456
|
videoEncType?: "h264" | "h265";
|
|
457
|
+
encoderType?: "vbr" | "cbr";
|
|
458
|
+
encoderProfile?: "high" | "main" | "baseline";
|
|
459
|
+
gop?: number;
|
|
430
460
|
} | undefined): string;
|
|
431
461
|
/**
|
|
432
462
|
* Normalize human-friendly day/night labels to the camera's expected
|
|
@@ -902,6 +932,49 @@ type BaichuanLedState = {
|
|
|
902
932
|
state?: string;
|
|
903
933
|
lightState?: string;
|
|
904
934
|
};
|
|
935
|
+
/**
|
|
936
|
+
* Snapshot of `<VersionInfo>` returned by Baichuan cmd_id=80
|
|
937
|
+
* (`BC_CMD_ID_GET_VERSION_INFO`) — the same payload the Reolink mobile app
|
|
938
|
+
* displays in "About this device". Distinct from `getSystemGeneral`
|
|
939
|
+
* (cmd_104) which holds time/locale.
|
|
940
|
+
*
|
|
941
|
+
* All fields optional because firmware variants and models include
|
|
942
|
+
* different subsets. Empty XML elements (e.g. `<cc3200Version></cc3200Version>`)
|
|
943
|
+
* come through as the empty string so callers can distinguish "absent"
|
|
944
|
+
* (undefined) from "explicitly empty" ("").
|
|
945
|
+
*/
|
|
946
|
+
interface BaichuanVersionInfo {
|
|
947
|
+
/** User-assigned name (matches the OSD camera name). */
|
|
948
|
+
name?: string;
|
|
949
|
+
/** Model code, e.g. `"E1 Zoom"`, `"RLC-810A"`. */
|
|
950
|
+
type?: string;
|
|
951
|
+
/** Hardware serial number. */
|
|
952
|
+
serialNumber?: string;
|
|
953
|
+
/** Build identifier, typically a date string like `"build 2503281992"`. */
|
|
954
|
+
buildDay?: string;
|
|
955
|
+
/** Internal hardware revision, e.g. `"IPC_NT14NA48MPSD6"`. */
|
|
956
|
+
hardwareVersion?: string;
|
|
957
|
+
/** Config-format version Reolink uses to identify the schema the device speaks. */
|
|
958
|
+
cfgVersion?: string;
|
|
959
|
+
/** Firmware version, e.g. `"v3.2.0.4741_2503281992"`. */
|
|
960
|
+
firmwareVersion?: string;
|
|
961
|
+
/** Extended hardware detail (often hardwareVersion + region/sku suffix). */
|
|
962
|
+
detail?: string;
|
|
963
|
+
/** IE-Client identifier (legacy plug-in tag, usually `"IEClient"`). */
|
|
964
|
+
IEClient?: string;
|
|
965
|
+
/** Legacy MCU firmware version (present on some Reolink wireless models). */
|
|
966
|
+
cc3200Version?: string;
|
|
967
|
+
/** Signal-processor firmware version (rarely populated). */
|
|
968
|
+
spVersion?: string;
|
|
969
|
+
/** File extension Reolink expects for firmware updates (`"pak"`). */
|
|
970
|
+
pakSuffix?: string;
|
|
971
|
+
/** Reolink item / SKU number, e.g. `"E340"`. */
|
|
972
|
+
itemNo?: string;
|
|
973
|
+
/** AI-model bundle version (the on-device people/vehicle/animal detector). */
|
|
974
|
+
aiVersion?: string;
|
|
975
|
+
/** Diagnostic helper string the app sends to support, e.g. `"blackPointsLevel=0"`. */
|
|
976
|
+
helpVersion?: string;
|
|
977
|
+
}
|
|
905
978
|
type BaichuanSleepState = {
|
|
906
979
|
sleep?: number;
|
|
907
980
|
mode?: number;
|
|
@@ -1087,6 +1160,61 @@ interface ReolinkSimpleEvent {
|
|
|
1087
1160
|
/** Present when type === "battery" — pushed by the camera via cmdId 252. */
|
|
1088
1161
|
battery?: Partial<BatteryInfo>;
|
|
1089
1162
|
}
|
|
1163
|
+
/**
|
|
1164
|
+
* A single detection bounding box in normalized [0, 1] coordinates relative to
|
|
1165
|
+
* the source video frame. Using fractions instead of pixels keeps the same box
|
|
1166
|
+
* valid across mainStream / subStream / externStream output and across firmware
|
|
1167
|
+
* resolution changes.
|
|
1168
|
+
*/
|
|
1169
|
+
interface ReolinkDetectionBox {
|
|
1170
|
+
/** Left edge in [0, 1] (0 = left, 1 = right). */
|
|
1171
|
+
x: number;
|
|
1172
|
+
/** Top edge in [0, 1] (0 = top, 1 = bottom). */
|
|
1173
|
+
y: number;
|
|
1174
|
+
/** Width in [0, 1]. */
|
|
1175
|
+
width: number;
|
|
1176
|
+
/** Height in [0, 1]. */
|
|
1177
|
+
height: number;
|
|
1178
|
+
/** AI class label if the camera reports one (e.g. "person", "vehicle"). */
|
|
1179
|
+
label?: string;
|
|
1180
|
+
/** Confidence in [0, 1] if exposed by the camera. */
|
|
1181
|
+
confidence?: number;
|
|
1182
|
+
}
|
|
1183
|
+
/**
|
|
1184
|
+
* Diagnostic state describing how much of the BcMedia additionalHeader the
|
|
1185
|
+
* decoder was able to interpret. Useful for consumers iterating on the format.
|
|
1186
|
+
*/
|
|
1187
|
+
type ReolinkDetectionDecodeState =
|
|
1188
|
+
/** Header marker was missing or malformed. */
|
|
1189
|
+
"invalid-marker"
|
|
1190
|
+
/** Baseline 128-byte header — camera reports no overlay metadata. */
|
|
1191
|
+
| "no-overlay"
|
|
1192
|
+
/** Overlay block present, but coordinates have not been decoded yet. */
|
|
1193
|
+
| "overlay-undecoded"
|
|
1194
|
+
/** Overlay block decoded successfully. */
|
|
1195
|
+
| "overlay-decoded";
|
|
1196
|
+
/**
|
|
1197
|
+
* High-level "detection" event emitted alongside every video frame that carries
|
|
1198
|
+
* a non-empty BcMedia additionalHeader. Mirrors `ReolinkSimpleEvent` but is
|
|
1199
|
+
* sourced from the streaming side-channel rather than from cmd_id 33 push events.
|
|
1200
|
+
*/
|
|
1201
|
+
interface ReolinkDetectionEvent {
|
|
1202
|
+
channel: number;
|
|
1203
|
+
/** Microseconds timestamp from the BcMedia video frame. */
|
|
1204
|
+
microseconds: number;
|
|
1205
|
+
/** Stream profile that produced the underlying frame. */
|
|
1206
|
+
profile: "main" | "sub" | "ext";
|
|
1207
|
+
/** Boxes in [0, 1] fractional coordinates. */
|
|
1208
|
+
boxes: ReolinkDetectionBox[];
|
|
1209
|
+
/** Source frame width (from BcMedia InfoV1/V2) if known. */
|
|
1210
|
+
frameWidth?: number;
|
|
1211
|
+
/** Source frame height (from BcMedia InfoV1/V2) if known. */
|
|
1212
|
+
frameHeight?: number;
|
|
1213
|
+
/** Decoder diagnostic state. */
|
|
1214
|
+
decodeState: ReolinkDetectionDecodeState;
|
|
1215
|
+
/** Raw additionalHeader bytes — kept for downstream decoder work. */
|
|
1216
|
+
rawHeader: Buffer;
|
|
1217
|
+
}
|
|
1090
1218
|
interface TwoWayAudioConfig {
|
|
1091
1219
|
channel: number;
|
|
1092
1220
|
enabled: boolean;
|
|
@@ -1702,6 +1830,70 @@ interface CompressionStream {
|
|
|
1702
1830
|
encoderType?: string | undefined;
|
|
1703
1831
|
[key: string]: unknown;
|
|
1704
1832
|
}
|
|
1833
|
+
/**
|
|
1834
|
+
* One allowable resolution from a `getEncOptions` reply.
|
|
1835
|
+
* `videoEncTypeList` enumerates the codecs supported at this resolution
|
|
1836
|
+
* (mapped to `"h264"`/`"h265"`).
|
|
1837
|
+
*/
|
|
1838
|
+
interface EncResolutionOption {
|
|
1839
|
+
width: number;
|
|
1840
|
+
height: number;
|
|
1841
|
+
/** Codecs available at this resolution. */
|
|
1842
|
+
videoEncTypes: Array<"h264" | "h265">;
|
|
1843
|
+
/** Camera-default framerate at this resolution, if reported. */
|
|
1844
|
+
defaultFramerate?: number;
|
|
1845
|
+
/** Camera-default bitrate (kbps) at this resolution, if reported. */
|
|
1846
|
+
defaultBitrate?: number;
|
|
1847
|
+
/** Camera-default GOP at this resolution, if reported. */
|
|
1848
|
+
defaultGop?: number;
|
|
1849
|
+
/** Allowed framerate values. */
|
|
1850
|
+
framerateOptions: number[];
|
|
1851
|
+
/** Allowed bitrate values (kbps). */
|
|
1852
|
+
bitrateOptions: number[];
|
|
1853
|
+
}
|
|
1854
|
+
/**
|
|
1855
|
+
* Allowable values for a single stream profile (mainStream / subStream / thirdStream).
|
|
1856
|
+
* Aggregated from `getStreamInfoList` (cmd_146) so consumers can populate UI
|
|
1857
|
+
* pickers without re-implementing the parsing logic.
|
|
1858
|
+
*/
|
|
1859
|
+
interface EncStreamOptions {
|
|
1860
|
+
/** Stream profile (one of `mainStream` / `subStream` / `thirdStream`). */
|
|
1861
|
+
type: string;
|
|
1862
|
+
/** Each entry is a `{width, height}` paired with its allowed values. */
|
|
1863
|
+
resolutions: EncResolutionOption[];
|
|
1864
|
+
/** Encoder rate-control modes Reolink exposes in the app. */
|
|
1865
|
+
encoderTypes: Array<"vbr" | "cbr">;
|
|
1866
|
+
/** Encoder profiles Reolink exposes in the app. */
|
|
1867
|
+
encoderProfiles: Array<"high" | "main" | "baseline">;
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Reply from `getEncOptions` — the set of allowable values for `setEnc`,
|
|
1871
|
+
* derived from `getStreamInfoList`. Use this to validate user input or
|
|
1872
|
+
* populate UI selectors.
|
|
1873
|
+
*/
|
|
1874
|
+
interface EncOptions {
|
|
1875
|
+
channel: number;
|
|
1876
|
+
mainStream?: EncStreamOptions;
|
|
1877
|
+
subStream?: EncStreamOptions;
|
|
1878
|
+
thirdStream?: EncStreamOptions;
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Patch payload accepted by `setEnc` for a single stream block
|
|
1882
|
+
* (`mainStream` / `subStream` / `thirdStream`). All fields optional —
|
|
1883
|
+
* unspecified ones are preserved from the device's current config.
|
|
1884
|
+
*/
|
|
1885
|
+
interface EncStreamPatch {
|
|
1886
|
+
audio?: 0 | 1;
|
|
1887
|
+
width?: number;
|
|
1888
|
+
height?: number;
|
|
1889
|
+
bitRate?: number;
|
|
1890
|
+
frameRate?: number;
|
|
1891
|
+
videoEncType?: "h264" | "h265";
|
|
1892
|
+
encoderType?: "vbr" | "cbr";
|
|
1893
|
+
encoderProfile?: "high" | "main" | "baseline";
|
|
1894
|
+
/** Keyframe interval in seconds — patches `<gop><cur>`. */
|
|
1895
|
+
gop?: number;
|
|
1896
|
+
}
|
|
1705
1897
|
/**
|
|
1706
1898
|
* Encoding configuration (getEnc response).
|
|
1707
1899
|
* cmdId=56 (GetEnc) — payload is wrapped in `Compression`, not `Enc`.
|
|
@@ -1900,24 +2092,6 @@ interface VideoInputConfig {
|
|
|
1900
2092
|
};
|
|
1901
2093
|
};
|
|
1902
2094
|
}
|
|
1903
|
-
/**
|
|
1904
|
-
* System general configuration.
|
|
1905
|
-
* cmdId=77 (GetSystemGeneral)
|
|
1906
|
-
*/
|
|
1907
|
-
interface SystemGeneralConfig {
|
|
1908
|
-
body?: {
|
|
1909
|
-
SystemGeneral?: {
|
|
1910
|
-
timeZone?: number | undefined;
|
|
1911
|
-
deviceName?: string | undefined;
|
|
1912
|
-
language?: string | undefined;
|
|
1913
|
-
dstMode?: number | undefined;
|
|
1914
|
-
[key: string]: unknown;
|
|
1915
|
-
};
|
|
1916
|
-
Norm?: {
|
|
1917
|
-
[key: string]: unknown;
|
|
1918
|
-
};
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
2095
|
/**
|
|
1922
2096
|
* Device support/capability flags.
|
|
1923
2097
|
* cmdId=78 (GetSupport)
|
|
@@ -1967,18 +2141,6 @@ interface FtpTaskConfig {
|
|
|
1967
2141
|
};
|
|
1968
2142
|
};
|
|
1969
2143
|
}
|
|
1970
|
-
/**
|
|
1971
|
-
* Email task configuration.
|
|
1972
|
-
*/
|
|
1973
|
-
interface EmailTaskConfig {
|
|
1974
|
-
body?: {
|
|
1975
|
-
EmailTask?: {
|
|
1976
|
-
channelId?: number | undefined;
|
|
1977
|
-
enable?: number | undefined;
|
|
1978
|
-
[key: string]: unknown;
|
|
1979
|
-
};
|
|
1980
|
-
};
|
|
1981
|
-
}
|
|
1982
2144
|
/**
|
|
1983
2145
|
* HDD info list response.
|
|
1984
2146
|
*/
|
|
@@ -2150,6 +2312,167 @@ interface WirelessChimeSilentState {
|
|
|
2150
2312
|
/** Whether the chime is currently active (not silenced). Derived: time === 0 */
|
|
2151
2313
|
active: boolean;
|
|
2152
2314
|
}
|
|
2315
|
+
/** Image vs video attachment for motion alert emails. */
|
|
2316
|
+
type EmailAttachmentType = "picture" | "video" | "none";
|
|
2317
|
+
/** Whether the alert body carries the standard human-readable text. */
|
|
2318
|
+
type EmailTextType = "withText" | "noText";
|
|
2319
|
+
/**
|
|
2320
|
+
* Email SMTP server configuration. Returned by GetEmail (cmdId=42) and
|
|
2321
|
+
* accepted by SetEmail (cmdId=43) and TestEmail (cmdId=141).
|
|
2322
|
+
*
|
|
2323
|
+
* Read-only fields (only present on GET): `senderMaxLen`, `pwdMaxLen`,
|
|
2324
|
+
* `emailAttachAbility` — the camera-reported capability bitmap.
|
|
2325
|
+
*/
|
|
2326
|
+
interface EmailConfig {
|
|
2327
|
+
smtpServer: string;
|
|
2328
|
+
/** Sender email address / SMTP username. Empty when unconfigured. */
|
|
2329
|
+
userName: string;
|
|
2330
|
+
/** SMTP password. Always sent in cleartext — camera limitation. */
|
|
2331
|
+
password: string;
|
|
2332
|
+
/** Recipient 1. */
|
|
2333
|
+
address1: string;
|
|
2334
|
+
/** Recipient 2 (optional). */
|
|
2335
|
+
address2: string;
|
|
2336
|
+
/** Recipient 3 (optional). */
|
|
2337
|
+
address3: string;
|
|
2338
|
+
smtpPort: number;
|
|
2339
|
+
sendNickname: string;
|
|
2340
|
+
/** 1 = attach picture/video, 0 = text-only. */
|
|
2341
|
+
attachment: 0 | 1;
|
|
2342
|
+
attachmentType: EmailAttachmentType;
|
|
2343
|
+
textType: EmailTextType;
|
|
2344
|
+
/** 1 = SSL/TLS, 0 = plain SMTP. */
|
|
2345
|
+
ssl: 0 | 1;
|
|
2346
|
+
/** Throttle between successive motion mails in seconds. Ignored on battery cams. */
|
|
2347
|
+
interval: number;
|
|
2348
|
+
senderMaxLen?: number;
|
|
2349
|
+
pwdMaxLen?: number;
|
|
2350
|
+
/** Bitmap of supported attachment combinations. */
|
|
2351
|
+
emailAttachAbility?: number;
|
|
2352
|
+
}
|
|
2353
|
+
/** Patch payload accepted by SetEmail. All fields optional — only supplied ones are written. */
|
|
2354
|
+
type EmailConfigPatch = Partial<Omit<EmailConfig, "senderMaxLen" | "pwdMaxLen" | "emailAttachAbility">>;
|
|
2355
|
+
/**
|
|
2356
|
+
* Single entry in the EmailTask `typeScheduleList`. `valueTable` is a
|
|
2357
|
+
* 168-char string of '0'/'1' representing the 7-days × 24-hours grid.
|
|
2358
|
+
*/
|
|
2359
|
+
interface EmailTaskScheduleItem {
|
|
2360
|
+
/**
|
|
2361
|
+
* Trigger type. Known: "MD" (motion), "Normal" (continuous record),
|
|
2362
|
+
* "people", "vehicle", "dog_cat", "face", "package", "cry", "visitor",
|
|
2363
|
+
* "doorbell", "none" (placeholder slot).
|
|
2364
|
+
* Treated as string to cover firmware-specific extensions.
|
|
2365
|
+
*/
|
|
2366
|
+
type: string;
|
|
2367
|
+
/** 168-char 0/1 schedule bitmap. */
|
|
2368
|
+
valueTable: string;
|
|
2369
|
+
}
|
|
2370
|
+
/** Email schedule configuration (cmdId=216/217). */
|
|
2371
|
+
interface EmailTaskConfig {
|
|
2372
|
+
channelId: number;
|
|
2373
|
+
enable: 0 | 1;
|
|
2374
|
+
typeScheduleList: EmailTaskScheduleItem[];
|
|
2375
|
+
}
|
|
2376
|
+
/** NTP server configuration (cmdId=38/39). */
|
|
2377
|
+
interface NtpConfig {
|
|
2378
|
+
/** 1 = NTP sync enabled, 0 = disabled. */
|
|
2379
|
+
enable: 0 | 1;
|
|
2380
|
+
/** Hostname or IP of the NTP server. */
|
|
2381
|
+
server: string;
|
|
2382
|
+
/** Sync interval in minutes. */
|
|
2383
|
+
synchronizeInterval: number;
|
|
2384
|
+
/** UDP port. Default 123. */
|
|
2385
|
+
port: number;
|
|
2386
|
+
}
|
|
2387
|
+
type NtpConfigPatch = Partial<NtpConfig>;
|
|
2388
|
+
/** Day-of-week labels accepted by Dst and AutoReboot blocks. */
|
|
2389
|
+
type DayOfWeek = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "everyday";
|
|
2390
|
+
/** Daylight Saving Time configuration (cmdId=106/107). */
|
|
2391
|
+
interface DstConfig {
|
|
2392
|
+
enable: 0 | 1;
|
|
2393
|
+
/** Offset in hours (typically 1). */
|
|
2394
|
+
offset: number;
|
|
2395
|
+
startMonth: number;
|
|
2396
|
+
/** Week-of-month index (1..5). 5 = "last week of the month". */
|
|
2397
|
+
startWeekIndex: number;
|
|
2398
|
+
startWeekday: DayOfWeek;
|
|
2399
|
+
startHour: number;
|
|
2400
|
+
startMinute: number;
|
|
2401
|
+
startSecond: number;
|
|
2402
|
+
endMonth: number;
|
|
2403
|
+
endWeekIndex: number;
|
|
2404
|
+
endWeekday: DayOfWeek;
|
|
2405
|
+
endHour: number;
|
|
2406
|
+
endMinute: number;
|
|
2407
|
+
endSecond: number;
|
|
2408
|
+
/** Schema version (returned by camera, defaults to 0). */
|
|
2409
|
+
version?: number;
|
|
2410
|
+
}
|
|
2411
|
+
type DstConfigPatch = Partial<DstConfig>;
|
|
2412
|
+
/** OSD date format. */
|
|
2413
|
+
type OsdDateFormat = "DMY" | "MDY" | "YMD";
|
|
2414
|
+
/** 24h (0) or 12h (1) clock format. */
|
|
2415
|
+
type TimeFormat = 0 | 1;
|
|
2416
|
+
/**
|
|
2417
|
+
* Full SystemGeneral block returned by cmdId=104. SET (cmdId=105) accepts a
|
|
2418
|
+
* subset (any combination of these fields) plus the mandatory `<year>0</year>`
|
|
2419
|
+
* marker that signals "do not set the manual clock". When you DO want to set
|
|
2420
|
+
* the manual clock, pass year/month/day/hour/minute/second together.
|
|
2421
|
+
*/
|
|
2422
|
+
interface SystemGeneralConfig {
|
|
2423
|
+
/** Timezone offset in seconds. POSIX convention: UTC+1 → -3600. */
|
|
2424
|
+
timeZone: number;
|
|
2425
|
+
osdFormat: OsdDateFormat;
|
|
2426
|
+
year: number;
|
|
2427
|
+
month: number;
|
|
2428
|
+
day: number;
|
|
2429
|
+
hour: number;
|
|
2430
|
+
minute: number;
|
|
2431
|
+
second: number;
|
|
2432
|
+
deviceId: number;
|
|
2433
|
+
timeFormat: TimeFormat;
|
|
2434
|
+
language: string;
|
|
2435
|
+
deviceName: string;
|
|
2436
|
+
loginLock: 0 | 1;
|
|
2437
|
+
lockTime: number;
|
|
2438
|
+
allowedTimes: number;
|
|
2439
|
+
/** 1 when DST is currently active (camera-side). Read-only on most firmwares. */
|
|
2440
|
+
isDst: 0 | 1;
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Patch accepted by SetSystemGeneral. When `manualTime` is provided, the
|
|
2444
|
+
* year/month/day/hour/minute/second fields are sent as-is. When omitted, the
|
|
2445
|
+
* builder injects `<year>0</year>` to skip the manual clock even when other
|
|
2446
|
+
* fields are present. Setting only `deviceName` triggers the
|
|
2447
|
+
* `<deviceNameOnly>1</deviceNameOnly>` flag automatically.
|
|
2448
|
+
*/
|
|
2449
|
+
interface SystemGeneralPatch {
|
|
2450
|
+
timeZone?: number;
|
|
2451
|
+
osdFormat?: OsdDateFormat;
|
|
2452
|
+
timeFormat?: TimeFormat;
|
|
2453
|
+
language?: string;
|
|
2454
|
+
deviceName?: string;
|
|
2455
|
+
loginLock?: 0 | 1;
|
|
2456
|
+
lockTime?: number;
|
|
2457
|
+
allowedTimes?: number;
|
|
2458
|
+
manualTime?: {
|
|
2459
|
+
year: number;
|
|
2460
|
+
month: number;
|
|
2461
|
+
day: number;
|
|
2462
|
+
hour: number;
|
|
2463
|
+
minute: number;
|
|
2464
|
+
second: number;
|
|
2465
|
+
};
|
|
2466
|
+
}
|
|
2467
|
+
/** AutoReboot schedule (cmdId=100/101). */
|
|
2468
|
+
interface AutoRebootConfig {
|
|
2469
|
+
enable: 0 | 1;
|
|
2470
|
+
weekDay: DayOfWeek;
|
|
2471
|
+
hour: number;
|
|
2472
|
+
minute: number;
|
|
2473
|
+
second: number;
|
|
2474
|
+
}
|
|
2475
|
+
type AutoRebootConfigPatch = Partial<AutoRebootConfig>;
|
|
2153
2476
|
|
|
2154
2477
|
type BaichuanClientOptions = {
|
|
2155
2478
|
host: string;
|
|
@@ -2226,6 +2549,23 @@ declare class BaichuanClient extends EventEmitter<{
|
|
|
2226
2549
|
* even if the current client instance is idle/disconnected.
|
|
2227
2550
|
*/
|
|
2228
2551
|
private static readonly streamingRegistry;
|
|
2552
|
+
/**
|
|
2553
|
+
* Per-device set of live BaichuanClient instances.
|
|
2554
|
+
*
|
|
2555
|
+
* Why: when a streaming client unsubscribes (e.g. RTSP grace timer expires
|
|
2556
|
+
* and SocketPool tears the streaming socket down), the global streaming
|
|
2557
|
+
* registry decrements but the GENERAL client of the same device has no
|
|
2558
|
+
* way of knowing — its idle-disconnect timer was last evaluated while
|
|
2559
|
+
* `isDeviceStreamingActive()` was still true (because the streaming socket
|
|
2560
|
+
* was still alive) and wasn't rescheduled. Without this registry the
|
|
2561
|
+
* general socket stays connected, the 60-second session-guard timer keeps
|
|
2562
|
+
* sending getOnlineUserList() to the camera, and a battery camera ends up
|
|
2563
|
+
* waking up every minute (issue #18).
|
|
2564
|
+
*
|
|
2565
|
+
* On streamingRegistry decrement-to-zero we walk this set and kick every
|
|
2566
|
+
* sibling's idle-disconnect timer so it can re-evaluate eligibility.
|
|
2567
|
+
*/
|
|
2568
|
+
private static readonly deviceClients;
|
|
2229
2569
|
/**
|
|
2230
2570
|
* Per-host D2C_DISC backoff state that persists across client instance recreation.
|
|
2231
2571
|
*
|
|
@@ -2314,6 +2654,10 @@ declare class BaichuanClient extends EventEmitter<{
|
|
|
2314
2654
|
private streamTraceStats;
|
|
2315
2655
|
private rxCmdTraceStats;
|
|
2316
2656
|
private readonly alarmEventState;
|
|
2657
|
+
/** Whether this instance is currently in BaichuanClient.deviceClients. */
|
|
2658
|
+
private registeredInDeviceClients;
|
|
2659
|
+
private registerInDeviceClients;
|
|
2660
|
+
private unregisterFromDeviceClients;
|
|
2317
2661
|
constructor(options: BaichuanClientOptions);
|
|
2318
2662
|
private newSocketSessionId;
|
|
2319
2663
|
private logFixed;
|
|
@@ -4198,6 +4542,143 @@ declare class BaichuanRtspServer extends EventEmitter<{
|
|
|
4198
4542
|
} | null;
|
|
4199
4543
|
}
|
|
4200
4544
|
|
|
4545
|
+
/**
|
|
4546
|
+
* BcMedia Parser - Parses Baichuan media packets (video/audio frames)
|
|
4547
|
+
*
|
|
4548
|
+
* BcMedia packets have magic headers that identify the packet type:
|
|
4549
|
+
* - InfoV1: 0x31303031
|
|
4550
|
+
* - InfoV2: 0x32303031
|
|
4551
|
+
* - IFrame: 0x63643030 - 0x63643039 (includes channel number)
|
|
4552
|
+
* - PFrame: 0x63643130 - 0x63643139 (includes channel number)
|
|
4553
|
+
* - AAC: 0x62773530
|
|
4554
|
+
* - ADPCM: 0x62773130
|
|
4555
|
+
*/
|
|
4556
|
+
type BcMediaType = "InfoV1" | "InfoV2" | "Iframe" | "Pframe" | "Aac" | "Adpcm";
|
|
4557
|
+
interface BcMediaIframe {
|
|
4558
|
+
type: "Iframe";
|
|
4559
|
+
videoType: "H264" | "H265";
|
|
4560
|
+
microseconds: number;
|
|
4561
|
+
time?: number;
|
|
4562
|
+
/** Raw additional header (if present) */
|
|
4563
|
+
additionalHeader?: Buffer;
|
|
4564
|
+
/** Additional header size */
|
|
4565
|
+
additionalHeaderSize?: number;
|
|
4566
|
+
/** Unknown u32 field after microseconds */
|
|
4567
|
+
unknown?: number;
|
|
4568
|
+
data: Buffer;
|
|
4569
|
+
}
|
|
4570
|
+
interface BcMediaPframe {
|
|
4571
|
+
type: "Pframe";
|
|
4572
|
+
videoType: "H264" | "H265";
|
|
4573
|
+
microseconds: number;
|
|
4574
|
+
/** Raw additional header (if present) */
|
|
4575
|
+
additionalHeader?: Buffer;
|
|
4576
|
+
/** Additional header size */
|
|
4577
|
+
additionalHeaderSize?: number;
|
|
4578
|
+
/** Unknown u32 field after microseconds */
|
|
4579
|
+
unknown?: number;
|
|
4580
|
+
data: Buffer;
|
|
4581
|
+
}
|
|
4582
|
+
interface BcMediaInfoV1 {
|
|
4583
|
+
type: "InfoV1";
|
|
4584
|
+
videoWidth: number;
|
|
4585
|
+
videoHeight: number;
|
|
4586
|
+
fps: number;
|
|
4587
|
+
startYear: number;
|
|
4588
|
+
startMonth: number;
|
|
4589
|
+
startDay: number;
|
|
4590
|
+
startHour: number;
|
|
4591
|
+
startMin: number;
|
|
4592
|
+
startSeconds: number;
|
|
4593
|
+
endYear: number;
|
|
4594
|
+
endMonth: number;
|
|
4595
|
+
endDay: number;
|
|
4596
|
+
endHour: number;
|
|
4597
|
+
endMin: number;
|
|
4598
|
+
endSeconds: number;
|
|
4599
|
+
}
|
|
4600
|
+
interface BcMediaInfoV2 {
|
|
4601
|
+
type: "InfoV2";
|
|
4602
|
+
videoWidth: number;
|
|
4603
|
+
videoHeight: number;
|
|
4604
|
+
fps: number;
|
|
4605
|
+
startYear: number;
|
|
4606
|
+
startMonth: number;
|
|
4607
|
+
startDay: number;
|
|
4608
|
+
startHour: number;
|
|
4609
|
+
startMin: number;
|
|
4610
|
+
startSeconds: number;
|
|
4611
|
+
endYear: number;
|
|
4612
|
+
endMonth: number;
|
|
4613
|
+
endDay: number;
|
|
4614
|
+
endHour: number;
|
|
4615
|
+
endMin: number;
|
|
4616
|
+
endSeconds: number;
|
|
4617
|
+
}
|
|
4618
|
+
interface BcMediaAac {
|
|
4619
|
+
type: "Aac";
|
|
4620
|
+
data: Buffer;
|
|
4621
|
+
}
|
|
4622
|
+
interface BcMediaAdpcm {
|
|
4623
|
+
type: "Adpcm";
|
|
4624
|
+
data: Buffer;
|
|
4625
|
+
}
|
|
4626
|
+
type BcMedia = BcMediaIframe | BcMediaPframe | BcMediaInfoV1 | BcMediaInfoV2 | BcMediaAac | BcMediaAdpcm;
|
|
4627
|
+
/**
|
|
4628
|
+
* Parse BcMedia packet from binary data.
|
|
4629
|
+
*/
|
|
4630
|
+
declare function parseBcMedia(buf: Buffer): {
|
|
4631
|
+
media: BcMedia;
|
|
4632
|
+
consumed: number;
|
|
4633
|
+
} | null;
|
|
4634
|
+
|
|
4635
|
+
/**
|
|
4636
|
+
* BcMedia Codec - Assembles fragmented BcMedia packets from stream
|
|
4637
|
+
*
|
|
4638
|
+
* BcMedia packets can be fragmented across multiple Baichuan frames.
|
|
4639
|
+
* This codec buffers incomplete packets and assembles them when complete.
|
|
4640
|
+
*/
|
|
4641
|
+
|
|
4642
|
+
/**
|
|
4643
|
+
* Optional listener invoked whenever the codec encounters a 4-byte sequence
|
|
4644
|
+
* at the buffer head that does NOT match any known BcMedia magic and is about
|
|
4645
|
+
* to be skipped as "recovery". Use it to discover undocumented sub-packet
|
|
4646
|
+
* shapes (e.g. AI overlay metadata) without altering the codec's behaviour.
|
|
4647
|
+
*/
|
|
4648
|
+
type UnknownChunkListener = (info: {
|
|
4649
|
+
magic: number;
|
|
4650
|
+
/** Up to 256 bytes starting at the unknown chunk's first byte. */
|
|
4651
|
+
preview: Buffer;
|
|
4652
|
+
/** Number of bytes the codec is about to skip before resyncing. */
|
|
4653
|
+
skipped: number;
|
|
4654
|
+
}) => void;
|
|
4655
|
+
declare class BcMediaCodec {
|
|
4656
|
+
private buffer;
|
|
4657
|
+
private strict;
|
|
4658
|
+
private amountSkipped;
|
|
4659
|
+
private logger;
|
|
4660
|
+
private onUnknownChunk;
|
|
4661
|
+
constructor(strict?: boolean, logger?: Logger);
|
|
4662
|
+
/** Register a listener that fires for every unknown chunk before recovery. */
|
|
4663
|
+
setUnknownChunkListener(listener: UnknownChunkListener | undefined): void;
|
|
4664
|
+
/**
|
|
4665
|
+
* Push data into the codec buffer and try to parse complete BcMedia packets.
|
|
4666
|
+
* Returns an array of complete BcMedia packets found.
|
|
4667
|
+
*
|
|
4668
|
+
* @param chunk - New data chunk to add to buffer
|
|
4669
|
+
* @returns Array of complete BcMedia packets (empty if none complete yet)
|
|
4670
|
+
*/
|
|
4671
|
+
decode(chunk: Buffer): BcMedia[];
|
|
4672
|
+
/**
|
|
4673
|
+
* Get remaining buffer (for debugging)
|
|
4674
|
+
*/
|
|
4675
|
+
getRemainingBuffer(): Buffer;
|
|
4676
|
+
/**
|
|
4677
|
+
* Clear the buffer (useful for resetting the codec)
|
|
4678
|
+
*/
|
|
4679
|
+
clear(): void;
|
|
4680
|
+
}
|
|
4681
|
+
|
|
4201
4682
|
/**
|
|
4202
4683
|
* Baichuan Video Stream - Builds a video stream from the native Baichuan protocol.
|
|
4203
4684
|
*
|
|
@@ -4250,6 +4731,22 @@ declare class BaichuanVideoStream extends EventEmitter<{
|
|
|
4250
4731
|
time?: number;
|
|
4251
4732
|
}
|
|
4252
4733
|
];
|
|
4734
|
+
/**
|
|
4735
|
+
* Raw BcMedia `additionalHeader` block emitted for every I-frame and P-frame.
|
|
4736
|
+
* Carries Reolink's per-frame side-channel metadata (detection bounding boxes).
|
|
4737
|
+
* `frameWidth`/`frameHeight` come from the most recent BcMedia InfoV1/V2 packet
|
|
4738
|
+
* so consumers can normalize pixel coordinates against the actual stream size.
|
|
4739
|
+
*/
|
|
4740
|
+
additionalHeader: [
|
|
4741
|
+
{
|
|
4742
|
+
raw: Buffer;
|
|
4743
|
+
frameType: "Iframe" | "Pframe";
|
|
4744
|
+
videoType: "H264" | "H265";
|
|
4745
|
+
microseconds: number;
|
|
4746
|
+
frameWidth?: number;
|
|
4747
|
+
frameHeight?: number;
|
|
4748
|
+
}
|
|
4749
|
+
];
|
|
4253
4750
|
audioFrame: [Buffer];
|
|
4254
4751
|
error: [Error];
|
|
4255
4752
|
close: [];
|
|
@@ -4268,6 +4765,13 @@ declare class BaichuanVideoStream extends EventEmitter<{
|
|
|
4268
4765
|
private readonly acceptAnyStreamType;
|
|
4269
4766
|
private lockedChannelId;
|
|
4270
4767
|
private bcMediaCodec;
|
|
4768
|
+
/**
|
|
4769
|
+
* Diagnostic-only accessor for the BcMedia codec. Used by tools that need to
|
|
4770
|
+
* inspect unknown chunks (for example to discover undocumented audio
|
|
4771
|
+
* sub-packets the parser currently skips). Not part of the supported public
|
|
4772
|
+
* surface — do not rely on it in application code.
|
|
4773
|
+
*/
|
|
4774
|
+
get _bcMediaCodec(): BcMediaCodec;
|
|
4271
4775
|
private debugH264LogsLeft;
|
|
4272
4776
|
private debugSavedSamples;
|
|
4273
4777
|
private warnedNonAnnexBOnce;
|
|
@@ -4286,6 +4790,9 @@ declare class BaichuanVideoStream extends EventEmitter<{
|
|
|
4286
4790
|
private lastPpsH265;
|
|
4287
4791
|
private lastPrependedParamSetsH265;
|
|
4288
4792
|
private aesStreamDecryptor;
|
|
4793
|
+
private latestFrameWidth;
|
|
4794
|
+
private latestFrameHeight;
|
|
4795
|
+
private detectionTeardown;
|
|
4289
4796
|
/**
|
|
4290
4797
|
* Pending startup error stashed when emitSafeError is called before any
|
|
4291
4798
|
* "error" listener is registered (e.g. camera returns 400 during start()).
|
|
@@ -4977,6 +5484,12 @@ declare class ReolinkBaichuanApi {
|
|
|
4977
5484
|
private sessionGuardIntervalTimer;
|
|
4978
5485
|
private readonly simpleEventListeners;
|
|
4979
5486
|
private simpleEventSubscribed;
|
|
5487
|
+
private readonly detectionEventListeners;
|
|
5488
|
+
private readonly detectionEventStreamHooks;
|
|
5489
|
+
private readonly objectDetectionListeners;
|
|
5490
|
+
private objectDetectionStream;
|
|
5491
|
+
private objectDetectionStreamStartInFlight;
|
|
5492
|
+
private objectDetectionInternalListener;
|
|
4980
5493
|
private simpleEventSubscribeInFlight;
|
|
4981
5494
|
private simpleEventUnsubscribeInFlight;
|
|
4982
5495
|
private simpleEventResubscribeTimer;
|
|
@@ -5394,6 +5907,73 @@ declare class ReolinkBaichuanApi {
|
|
|
5394
5907
|
* When the last listener is removed, the API unsubscribes from Baichuan events.
|
|
5395
5908
|
*/
|
|
5396
5909
|
offSimpleEvent(callback?: (event: ReolinkSimpleEvent) => void | Promise<void>): Promise<void>;
|
|
5910
|
+
/**
|
|
5911
|
+
* Subscribe to per-frame detection events sourced from the BcMedia
|
|
5912
|
+
* `additionalHeader` block on active video streams.
|
|
5913
|
+
*
|
|
5914
|
+
* Mirrors {@link onSimpleEvent} but is fed by the streaming side-channel:
|
|
5915
|
+
* one event fires for every I-frame / P-frame that carries an overlay block.
|
|
5916
|
+
* Coordinates are reported in normalized [0, 1] fractions of the source
|
|
5917
|
+
* frame, so the same box renders correctly on mainStream, subStream, and
|
|
5918
|
+
* externStream.
|
|
5919
|
+
*
|
|
5920
|
+
* Unlike `onSimpleEvent`, no Baichuan subscribe command is involved — events
|
|
5921
|
+
* only flow while a video stream is open. The library hooks every
|
|
5922
|
+
* `BaichuanVideoStream` created via this API for the listener's lifetime.
|
|
5923
|
+
*/
|
|
5924
|
+
onDetection(callback: (event: ReolinkDetectionEvent) => void | Promise<void>): void;
|
|
5925
|
+
/**
|
|
5926
|
+
* Remove a single detection callback, or all of them if `callback` is omitted.
|
|
5927
|
+
*/
|
|
5928
|
+
offDetection(callback?: (event: ReolinkDetectionEvent) => void | Promise<void>): void;
|
|
5929
|
+
/**
|
|
5930
|
+
* Subscribe to AI object detections (people / vehicle / animal / face boxes
|
|
5931
|
+
* with class label and confidence) without managing a video stream yourself.
|
|
5932
|
+
*
|
|
5933
|
+
* Mirrors {@link onSimpleEvent} end-to-end: the API opens a dedicated
|
|
5934
|
+
* substream behind the scenes on the first listener, forwards every box-bearing
|
|
5935
|
+
* `additionalHeader` to your callback, and tears the stream down when the last
|
|
5936
|
+
* listener unsubscribes. The substream is the lightest profile (typically
|
|
5937
|
+
* 640×360) so the additional bandwidth/CPU overhead is minimal.
|
|
5938
|
+
*
|
|
5939
|
+
* Each event carries normalized `[0, 1]` box coordinates, a class label, and
|
|
5940
|
+
* a confidence score — render-ready without further conversion.
|
|
5941
|
+
*/
|
|
5942
|
+
onObjectDetections(callback: (event: ReolinkDetectionEvent) => void | Promise<void>): Promise<void>;
|
|
5943
|
+
/**
|
|
5944
|
+
* Remove one detection callback, or all of them if `callback` is omitted.
|
|
5945
|
+
* When the last listener is removed the auto-managed substream is closed.
|
|
5946
|
+
*/
|
|
5947
|
+
offObjectDetections(callback?: (event: ReolinkDetectionEvent) => void | Promise<void>): Promise<void>;
|
|
5948
|
+
private ensureObjectDetectionStream;
|
|
5949
|
+
private tearDownObjectDetectionStream;
|
|
5950
|
+
/**
|
|
5951
|
+
* Internal: invoked by BaichuanVideoStream when it starts so the API can hook
|
|
5952
|
+
* its `additionalHeader` event. Returns a teardown function the stream calls
|
|
5953
|
+
* on stop. Not intended for direct use by consumers.
|
|
5954
|
+
*/
|
|
5955
|
+
_registerVideoStreamForDetection(stream: {
|
|
5956
|
+
on: (event: "additionalHeader", listener: (info: {
|
|
5957
|
+
raw: Buffer;
|
|
5958
|
+
frameType: "Iframe" | "Pframe";
|
|
5959
|
+
videoType: "H264" | "H265";
|
|
5960
|
+
microseconds: number;
|
|
5961
|
+
frameWidth?: number;
|
|
5962
|
+
frameHeight?: number;
|
|
5963
|
+
}) => void) => void;
|
|
5964
|
+
off: (event: "additionalHeader", listener: (info: {
|
|
5965
|
+
raw: Buffer;
|
|
5966
|
+
frameType: "Iframe" | "Pframe";
|
|
5967
|
+
videoType: "H264" | "H265";
|
|
5968
|
+
microseconds: number;
|
|
5969
|
+
frameWidth?: number;
|
|
5970
|
+
frameHeight?: number;
|
|
5971
|
+
}) => void) => void;
|
|
5972
|
+
}, context: {
|
|
5973
|
+
channel: number;
|
|
5974
|
+
profile: "main" | "sub" | "ext";
|
|
5975
|
+
}): () => void;
|
|
5976
|
+
private dispatchDetectionEvent;
|
|
5397
5977
|
private startSimpleEventResubscribeTimer;
|
|
5398
5978
|
private stopSimpleEventResubscribeTimer;
|
|
5399
5979
|
/**
|
|
@@ -5549,6 +6129,55 @@ declare class ReolinkBaichuanApi {
|
|
|
5549
6129
|
port: "rtsp" | "rtmp" | "onvif" | "http" | "https";
|
|
5550
6130
|
enable: boolean;
|
|
5551
6131
|
}): Promise<void>;
|
|
6132
|
+
/**
|
|
6133
|
+
* Full port-config setter (cmd_id 36). Patches one or more of the six
|
|
6134
|
+
* service ports the camera serves — Server (Baichuan), HTTP, HTTPS,
|
|
6135
|
+
* RTSP, RTMP, ONVIF. Each entry takes an optional `port` (number) and
|
|
6136
|
+
* `enable` (boolean); fields the caller doesn't pass are left alone.
|
|
6137
|
+
*
|
|
6138
|
+
* Sends one block per port that has any field set, then issues a
|
|
6139
|
+
* single cmd_36 with the merged body. The camera accepts multiple
|
|
6140
|
+
* `<XxxPort>` siblings in the same payload.
|
|
6141
|
+
*
|
|
6142
|
+
* Wire format observed on E1 Zoom:
|
|
6143
|
+
*
|
|
6144
|
+
* <body>
|
|
6145
|
+
* <RtspPort version="1.1">
|
|
6146
|
+
* <rtspPort>554</rtspPort>
|
|
6147
|
+
* <enable>1</enable>
|
|
6148
|
+
* </RtspPort>
|
|
6149
|
+
* <HttpsPort version="1.1">
|
|
6150
|
+
* <enable>0</enable>
|
|
6151
|
+
* </HttpsPort>
|
|
6152
|
+
* ...
|
|
6153
|
+
* </body>
|
|
6154
|
+
*/
|
|
6155
|
+
setPortConfig(patch: {
|
|
6156
|
+
server?: {
|
|
6157
|
+
port?: number;
|
|
6158
|
+
enable?: boolean;
|
|
6159
|
+
};
|
|
6160
|
+
http?: {
|
|
6161
|
+
port?: number;
|
|
6162
|
+
enable?: boolean;
|
|
6163
|
+
};
|
|
6164
|
+
https?: {
|
|
6165
|
+
port?: number;
|
|
6166
|
+
enable?: boolean;
|
|
6167
|
+
};
|
|
6168
|
+
rtsp?: {
|
|
6169
|
+
port?: number;
|
|
6170
|
+
enable?: boolean;
|
|
6171
|
+
};
|
|
6172
|
+
rtmp?: {
|
|
6173
|
+
port?: number;
|
|
6174
|
+
enable?: boolean;
|
|
6175
|
+
};
|
|
6176
|
+
onvif?: {
|
|
6177
|
+
port?: number;
|
|
6178
|
+
enable?: boolean;
|
|
6179
|
+
};
|
|
6180
|
+
}): Promise<void>;
|
|
5552
6181
|
/** GetDevInfo via Baichuan: host cmd_id 80, channel cmd_id 318 */
|
|
5553
6182
|
getInfo(channel?: number, options?: {
|
|
5554
6183
|
timeoutMs?: number;
|
|
@@ -6339,6 +6968,15 @@ declare class ReolinkBaichuanApi {
|
|
|
6339
6968
|
*/
|
|
6340
6969
|
setPtzPreset(presetId: number, name: string, channel?: number): Promise<void>;
|
|
6341
6970
|
setPtzPreset(channel: number, presetId: number, name: string): Promise<void>;
|
|
6971
|
+
/**
|
|
6972
|
+
* Recall (move to) a saved PTZ preset.
|
|
6973
|
+
*
|
|
6974
|
+
* cmd_id 19 (PTZ_CONTROL_PRESET) with command="toPos". The camera moves
|
|
6975
|
+
* the head at its own default preset-recall speed; we don't expose
|
|
6976
|
+
* speed here because most firmwares ignore the field on toPos.
|
|
6977
|
+
*/
|
|
6978
|
+
gotoPtzPreset(presetId: number, channel?: number): Promise<void>;
|
|
6979
|
+
gotoPtzPreset(channel: number, presetId: number): Promise<void>;
|
|
6342
6980
|
/**
|
|
6343
6981
|
* Best-effort delete/disable a PTZ preset.
|
|
6344
6982
|
*
|
|
@@ -6513,6 +7151,39 @@ declare class ReolinkBaichuanApi {
|
|
|
6513
7151
|
*/
|
|
6514
7152
|
setMotionDetection(enabled: boolean, sensitivity?: number, channel?: number): Promise<void>;
|
|
6515
7153
|
setMotionDetection(channel: number, enabled: boolean, sensitivity?: number): Promise<void>;
|
|
7154
|
+
/**
|
|
7155
|
+
* Set motion alarm with full control, including the detection-zone grid.
|
|
7156
|
+
*
|
|
7157
|
+
* Wire format observed on E1 Zoom (cmd_id=47 SetMdAlarm body):
|
|
7158
|
+
*
|
|
7159
|
+
* <MD version="1.1">
|
|
7160
|
+
* <channelId>0</channelId>
|
|
7161
|
+
* <enable>1</enable>
|
|
7162
|
+
* <usepir>0</usepir>
|
|
7163
|
+
* <width>60</width> <height>33</height>
|
|
7164
|
+
* <scope>
|
|
7165
|
+
* <columns>96</columns> <rows>64</rows>
|
|
7166
|
+
* <valueTable>{base64 6144-bit bitmap}</valueTable>
|
|
7167
|
+
* </scope>
|
|
7168
|
+
* ... other camera-specific fields ...
|
|
7169
|
+
* </MD>
|
|
7170
|
+
*
|
|
7171
|
+
* We do a read-modify-write of the GET response so any camera-specific
|
|
7172
|
+
* extension fields are preserved untouched. Pass `valueTable` to update
|
|
7173
|
+
* the detection zone — see `encodeMotionScopeBitmap` for the bitmap layout.
|
|
7174
|
+
*
|
|
7175
|
+
* @param channel - 0-based channel
|
|
7176
|
+
* @param enabled - toggle motion detection on/off (optional)
|
|
7177
|
+
* @param sensitivity - 0-50, higher = more sensitive (optional)
|
|
7178
|
+
* @param valueTable - base64-encoded grid bitmap; size must match
|
|
7179
|
+
* `<scope><columns>×<rows></scope>` from the GET (optional)
|
|
7180
|
+
*/
|
|
7181
|
+
setMotionAlarmFull(opts: {
|
|
7182
|
+
channel?: number;
|
|
7183
|
+
enabled?: boolean;
|
|
7184
|
+
sensitivity?: number;
|
|
7185
|
+
valueTable?: string;
|
|
7186
|
+
}): Promise<void>;
|
|
6516
7187
|
/**
|
|
6517
7188
|
* Set AI detection settings via Baichuan.
|
|
6518
7189
|
* cmd_id: 343 (SetAiAlarm)
|
|
@@ -6803,25 +7474,30 @@ declare class ReolinkBaichuanApi {
|
|
|
6803
7474
|
}): Promise<EncConfig>;
|
|
6804
7475
|
/**
|
|
6805
7476
|
* SetEnc via Baichuan (cmdId=57). Read-modify-write — preserves
|
|
6806
|
-
* unspecified fields. Mirrors reolink_aio's `SetEnc
|
|
7477
|
+
* unspecified fields. Mirrors reolink_aio's `SetEnc` plus the additional
|
|
7478
|
+
* `width`/`height`/`encoderType`/`encoderProfile`/`gop`/`thirdStream`
|
|
7479
|
+
* fields observed in the official mobile app (see `pcap/resolution.pcapng`).
|
|
7480
|
+
*
|
|
7481
|
+
* Field meaning per stream:
|
|
7482
|
+
* - `audio` — 0/1 toggle
|
|
7483
|
+
* - `width`/`height` — resolution in pixels. Must be one of the
|
|
7484
|
+
* resolutions returned by {@link getStreamInfoList}.
|
|
7485
|
+
* - `bitRate` — kbps. Must match the table from `getStreamInfoList`.
|
|
7486
|
+
* - `frameRate` — fps. Must match the table from `getStreamInfoList`.
|
|
7487
|
+
* - `videoEncType` — `"h264"` or `"h265"`
|
|
7488
|
+
* - `encoderType` — `"vbr"` or `"cbr"`
|
|
7489
|
+
* - `encoderProfile` — `"high"`, `"main"`, or `"baseline"`
|
|
7490
|
+
* - `gop` — keyframe interval in seconds (sets `<gop><cur>`)
|
|
6807
7491
|
*
|
|
6808
7492
|
* @param channel - Channel number (0-based)
|
|
6809
|
-
* @param patch - Fields to update
|
|
6810
|
-
*
|
|
6811
|
-
* to change.
|
|
7493
|
+
* @param patch - Fields to update. Pass only the fields you want to change;
|
|
7494
|
+
* everything else is preserved from the device's current configuration.
|
|
6812
7495
|
*/
|
|
6813
7496
|
setEnc(channel: number, patch: {
|
|
6814
7497
|
audio?: 0 | 1;
|
|
6815
|
-
mainStream?:
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
videoEncType?: "h264" | "h265";
|
|
6819
|
-
};
|
|
6820
|
-
subStream?: {
|
|
6821
|
-
bitRate?: number;
|
|
6822
|
-
frameRate?: number;
|
|
6823
|
-
videoEncType?: "h264" | "h265";
|
|
6824
|
-
};
|
|
7498
|
+
mainStream?: EncStreamPatch;
|
|
7499
|
+
subStream?: EncStreamPatch;
|
|
7500
|
+
thirdStream?: EncStreamPatch;
|
|
6825
7501
|
}, options?: {
|
|
6826
7502
|
timeoutMs?: number;
|
|
6827
7503
|
}): Promise<void>;
|
|
@@ -7081,6 +7757,35 @@ declare class ReolinkBaichuanApi {
|
|
|
7081
7757
|
getCoordinatePointListFromPushCache(channel?: number): BaichuanCachedPush<BaichuanCoordinatePointListPush> | undefined;
|
|
7082
7758
|
private isNvrLikeDevice;
|
|
7083
7759
|
private sendPcapDerivedSettingsGetXml;
|
|
7760
|
+
/**
|
|
7761
|
+
* Update the OSD timestamp + channel-name overlay via cmd_id=45
|
|
7762
|
+
* (SetOsdDatetime). The schema is the same `<body><OsdDatetime>` +
|
|
7763
|
+
* `<OsdChannelName>` block returned by `getOsdDatetime` — we
|
|
7764
|
+
* read-modify-write so any extension fields the camera sent are
|
|
7765
|
+
* preserved.
|
|
7766
|
+
*
|
|
7767
|
+
* Position is in **camera pixel coordinates** (e.g. (1,1) for top-left,
|
|
7768
|
+
* not preset strings). Set `enable=0` to hide the overlay; the camera
|
|
7769
|
+
* keeps the stored position so re-enabling later restores it.
|
|
7770
|
+
*/
|
|
7771
|
+
setOsdDatetime(channel: number, patch: {
|
|
7772
|
+
datetime?: {
|
|
7773
|
+
enable?: boolean | 0 | 1;
|
|
7774
|
+
topLeftX?: number;
|
|
7775
|
+
topLeftY?: number;
|
|
7776
|
+
language?: string;
|
|
7777
|
+
};
|
|
7778
|
+
channelName?: {
|
|
7779
|
+
name?: string;
|
|
7780
|
+
enable?: boolean | 0 | 1;
|
|
7781
|
+
topLeftX?: number;
|
|
7782
|
+
topLeftY?: number;
|
|
7783
|
+
enWatermark?: boolean | 0 | 1;
|
|
7784
|
+
enBgcolor?: boolean | 0 | 1;
|
|
7785
|
+
};
|
|
7786
|
+
}, options?: {
|
|
7787
|
+
timeoutMs?: number;
|
|
7788
|
+
}): Promise<void>;
|
|
7084
7789
|
getOsdDatetime(channel: number, options?: {
|
|
7085
7790
|
timeoutMs?: number;
|
|
7086
7791
|
}): Promise<BaichuanGetOsdDatetimeResult>;
|
|
@@ -7099,6 +7804,36 @@ declare class ReolinkBaichuanApi {
|
|
|
7099
7804
|
getStreamInfoList(channel: number, options?: {
|
|
7100
7805
|
timeoutMs?: number;
|
|
7101
7806
|
}): Promise<BaichuanStreamInfoList>;
|
|
7807
|
+
/**
|
|
7808
|
+
* Return the set of values `setEnc` will accept on each stream of `channel`.
|
|
7809
|
+
* Aggregates `getStreamInfoList` (cmd_146) into a UI-friendly shape:
|
|
7810
|
+
* per-stream resolutions with their allowed codecs/framerates/bitrates plus
|
|
7811
|
+
* the enumerated encoder modes/profiles Reolink exposes.
|
|
7812
|
+
*
|
|
7813
|
+
* Useful for populating selectors and validating user input before calling
|
|
7814
|
+
* `setEnc` — picking an unsupported combination causes the camera to reject
|
|
7815
|
+
* the SET_ENC command (responseCode != 200).
|
|
7816
|
+
*/
|
|
7817
|
+
getEncOptions(channel: number, options?: {
|
|
7818
|
+
timeoutMs?: number;
|
|
7819
|
+
}): Promise<EncOptions>;
|
|
7820
|
+
/**
|
|
7821
|
+
* Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the
|
|
7822
|
+
* friendly name, model code (e.g. `"E1 Zoom"`), serial number, firmware
|
|
7823
|
+
* version, hardware revision, build day, AI model bundle version, etc.
|
|
7824
|
+
*
|
|
7825
|
+
* This is the same info the Reolink mobile app shows in "About this
|
|
7826
|
+
* device" — distinct from `getSystemGeneral` (cmd_104) which carries
|
|
7827
|
+
* time/locale.
|
|
7828
|
+
*
|
|
7829
|
+
* No channel parameter: this command is device-global on NVRs/Hubs and
|
|
7830
|
+
* camera-global on standalone cameras. Pass an explicit channel via the
|
|
7831
|
+
* underlying `sendXml` only if a specific firmware demands it (none we've
|
|
7832
|
+
* tested do).
|
|
7833
|
+
*/
|
|
7834
|
+
getVersionInfo(options?: {
|
|
7835
|
+
timeoutMs?: number;
|
|
7836
|
+
}): Promise<BaichuanVersionInfo>;
|
|
7102
7837
|
getLedState(channel: number, options?: {
|
|
7103
7838
|
timeoutMs?: number;
|
|
7104
7839
|
}): Promise<BaichuanLedState>;
|
|
@@ -7120,6 +7855,178 @@ declare class ReolinkBaichuanApi {
|
|
|
7120
7855
|
getEmailTask(channel?: number, options?: {
|
|
7121
7856
|
timeoutMs?: number;
|
|
7122
7857
|
}): Promise<EmailTaskConfig>;
|
|
7858
|
+
/**
|
|
7859
|
+
* SetEmailTask via Baichuan (cmdId=216). Updates the email alarm schedule
|
|
7860
|
+
* (per-event-type 7×24 valueTable + master enable).
|
|
7861
|
+
*
|
|
7862
|
+
* Reolink expects the FULL `typeScheduleList` — pass the array from a prior
|
|
7863
|
+
* GET and only flip the entries you care about. Slots you don't track must
|
|
7864
|
+
* be sent back unchanged to avoid the camera dropping them.
|
|
7865
|
+
*/
|
|
7866
|
+
setEmailTask(channel: number | undefined, task: EmailTaskConfig, options?: {
|
|
7867
|
+
timeoutMs?: number;
|
|
7868
|
+
}): Promise<void>;
|
|
7869
|
+
/**
|
|
7870
|
+
* Convenience wrapper that patches the schedule of one or more trigger
|
|
7871
|
+
* types on the camera's EmailTask without touching the others.
|
|
7872
|
+
*
|
|
7873
|
+
* Pass a high-level schedule spec (`always` / `never` / explicit windows)
|
|
7874
|
+
* and the trigger types it should apply to. The method:
|
|
7875
|
+
*
|
|
7876
|
+
* 1. Reads the current EmailTask via GET (so we keep every existing slot).
|
|
7877
|
+
* 2. Builds the new `valueTable` once from `schedule`.
|
|
7878
|
+
* 3. Replaces the `valueTable` of every matching `type` in the list.
|
|
7879
|
+
* 4. Appends entries for any requested type not already present.
|
|
7880
|
+
* 5. Writes the merged list back via SET.
|
|
7881
|
+
*
|
|
7882
|
+
* Returns the list of types that were actually touched.
|
|
7883
|
+
*/
|
|
7884
|
+
patchEmailSchedule(channel: number | undefined, spec: {
|
|
7885
|
+
types: string[];
|
|
7886
|
+
schedule: {
|
|
7887
|
+
kind: "always";
|
|
7888
|
+
} | {
|
|
7889
|
+
kind: "never";
|
|
7890
|
+
} | {
|
|
7891
|
+
kind: "windows";
|
|
7892
|
+
windows: Array<{
|
|
7893
|
+
days: number[];
|
|
7894
|
+
startHour: number;
|
|
7895
|
+
endHour: number;
|
|
7896
|
+
}>;
|
|
7897
|
+
};
|
|
7898
|
+
/** When provided, also flips the EmailTask master `enable` flag. */
|
|
7899
|
+
enable?: 0 | 1;
|
|
7900
|
+
}, options?: {
|
|
7901
|
+
timeoutMs?: number;
|
|
7902
|
+
}): Promise<{
|
|
7903
|
+
touchedTypes: string[];
|
|
7904
|
+
}>;
|
|
7905
|
+
/**
|
|
7906
|
+
* Read the SMTP email configuration (cmdId=42). Returns the full `<Email>`
|
|
7907
|
+
* block including capability hints (`senderMaxLen`, `pwdMaxLen`,
|
|
7908
|
+
* `emailAttachAbility`).
|
|
7909
|
+
*/
|
|
7910
|
+
getEmail(options?: {
|
|
7911
|
+
timeoutMs?: number;
|
|
7912
|
+
}): Promise<EmailConfig>;
|
|
7913
|
+
/**
|
|
7914
|
+
* Patch the SMTP email configuration (cmdId=43). Reads the current config
|
|
7915
|
+
* first then merges the patch — Reolink rejects partial `<Email>` blocks.
|
|
7916
|
+
*/
|
|
7917
|
+
setEmail(patch: EmailConfigPatch, options?: {
|
|
7918
|
+
timeoutMs?: number;
|
|
7919
|
+
}): Promise<void>;
|
|
7920
|
+
/**
|
|
7921
|
+
* Send a test email using either the current config or an override patch
|
|
7922
|
+
* (cmdId=141). Returns true when the camera reports 200 (test succeeded),
|
|
7923
|
+
* false when it reports 482 (test failed — server unreachable / bad creds).
|
|
7924
|
+
* Other non-200 codes propagate as exceptions via `sendXml`.
|
|
7925
|
+
*/
|
|
7926
|
+
testEmail(patch?: EmailConfigPatch, options?: {
|
|
7927
|
+
timeoutMs?: number;
|
|
7928
|
+
}): Promise<boolean>;
|
|
7929
|
+
/**
|
|
7930
|
+
* Read the NTP server configuration (cmdId=38).
|
|
7931
|
+
*/
|
|
7932
|
+
getNtp(options?: {
|
|
7933
|
+
timeoutMs?: number;
|
|
7934
|
+
}): Promise<NtpConfig>;
|
|
7935
|
+
/**
|
|
7936
|
+
* Patch the NTP server configuration (cmdId=39). Reads the current state
|
|
7937
|
+
* first and merges the patch — Reolink rejects partial `<Ntp>` blocks.
|
|
7938
|
+
*/
|
|
7939
|
+
setNtp(patch: NtpConfigPatch, options?: {
|
|
7940
|
+
timeoutMs?: number;
|
|
7941
|
+
}): Promise<void>;
|
|
7942
|
+
/**
|
|
7943
|
+
* Patch SystemGeneral (cmdId=105). Supports partial payloads: include only
|
|
7944
|
+
* the fields you want to change. By default the builder emits `<year>0</year>`
|
|
7945
|
+
* as the "do not set manual clock" marker; pass `manualTime` to actually
|
|
7946
|
+
* set the date/time. Setting only `deviceName` automatically uses the
|
|
7947
|
+
* Reolink Client's `deviceNameOnly=1` shape.
|
|
7948
|
+
*/
|
|
7949
|
+
setSystemGeneral(patch: SystemGeneralPatch, options?: {
|
|
7950
|
+
timeoutMs?: number;
|
|
7951
|
+
}): Promise<void>;
|
|
7952
|
+
/**
|
|
7953
|
+
* Read the Daylight Saving Time configuration (cmdId=106).
|
|
7954
|
+
*/
|
|
7955
|
+
getDst(options?: {
|
|
7956
|
+
timeoutMs?: number;
|
|
7957
|
+
}): Promise<DstConfig>;
|
|
7958
|
+
/**
|
|
7959
|
+
* Patch the DST configuration (cmdId=107). Reads the current state first
|
|
7960
|
+
* and merges the patch.
|
|
7961
|
+
*/
|
|
7962
|
+
setDst(patch: DstConfigPatch, options?: {
|
|
7963
|
+
timeoutMs?: number;
|
|
7964
|
+
}): Promise<void>;
|
|
7965
|
+
/**
|
|
7966
|
+
* Read the auto-reboot schedule (cmdId=101).
|
|
7967
|
+
*/
|
|
7968
|
+
getAutoReboot(options?: {
|
|
7969
|
+
timeoutMs?: number;
|
|
7970
|
+
}): Promise<AutoRebootConfig>;
|
|
7971
|
+
/**
|
|
7972
|
+
* Patch the auto-reboot schedule (cmdId=100).
|
|
7973
|
+
*/
|
|
7974
|
+
setAutoReboot(patch: AutoRebootConfigPatch, options?: {
|
|
7975
|
+
timeoutMs?: number;
|
|
7976
|
+
}): Promise<void>;
|
|
7977
|
+
/**
|
|
7978
|
+
* High-level helper that configures the camera to deliver motion alerts via
|
|
7979
|
+
* SMTP to the local nodelink manager. Orchestrates `setEmail` + `setEmailTask`
|
|
7980
|
+
* in a single call so UI code can offer "auto-configure" without juggling
|
|
7981
|
+
* the underlying commands.
|
|
7982
|
+
*
|
|
7983
|
+
* Pass `runTest: true` to also send a test email (cmdId=141). Returns a
|
|
7984
|
+
* structured result describing each leg of the flow so the caller can show
|
|
7985
|
+
* granular feedback.
|
|
7986
|
+
*
|
|
7987
|
+
* @param params Auto-configuration parameters
|
|
7988
|
+
* @param channel Logical channel (default 0). Used for the EmailTask SET.
|
|
7989
|
+
*/
|
|
7990
|
+
setupEmailPushToManager(params: {
|
|
7991
|
+
/** Manager hostname or IP reachable from the camera's network. */
|
|
7992
|
+
managerHost: string;
|
|
7993
|
+
/** Manager SMTP port. Default 2525. */
|
|
7994
|
+
managerPort?: number;
|
|
7995
|
+
/** Per-camera recipient local-part — typically `cam-<cameraId>`. */
|
|
7996
|
+
recipientLocalPart: string;
|
|
7997
|
+
/** Virtual mail domain (must match the server-side setting). */
|
|
7998
|
+
domain?: string;
|
|
7999
|
+
/** Attachment kind on motion. Default "picture". */
|
|
8000
|
+
attachmentType?: "picture" | "video" | "none";
|
|
8001
|
+
/** Optional sender nickname shown in the From header. */
|
|
8002
|
+
sendNickname?: string;
|
|
8003
|
+
/** Interval throttle in seconds (ignored on battery cams). Default 30. */
|
|
8004
|
+
interval?: number;
|
|
8005
|
+
/** Optional SMTP auth — required when the server's `requireAuth` is on. */
|
|
8006
|
+
authUsername?: string;
|
|
8007
|
+
authPassword?: string;
|
|
8008
|
+
/**
|
|
8009
|
+
* Trigger types to enable in the email schedule. Must match the types
|
|
8010
|
+
* already present in the current EmailTask (we patch their schedule to
|
|
8011
|
+
* full-week 24/7, leaving any other slot untouched).
|
|
8012
|
+
*/
|
|
8013
|
+
triggerTypes?: string[];
|
|
8014
|
+
/** Send a test email after the SET. Default false. */
|
|
8015
|
+
runTest?: boolean;
|
|
8016
|
+
}, channel?: number, options?: {
|
|
8017
|
+
timeoutMs?: number;
|
|
8018
|
+
}): Promise<{
|
|
8019
|
+
setEmail: {
|
|
8020
|
+
applied: true;
|
|
8021
|
+
};
|
|
8022
|
+
setEmailTask: {
|
|
8023
|
+
applied: true;
|
|
8024
|
+
touchedTypes: string[];
|
|
8025
|
+
};
|
|
8026
|
+
testEmail?: {
|
|
8027
|
+
success: boolean;
|
|
8028
|
+
};
|
|
8029
|
+
}>;
|
|
7123
8030
|
/**
|
|
7124
8031
|
* Get siren-on-motion state via AudioTask (cmdId=232).
|
|
7125
8032
|
*
|
|
@@ -9008,6 +9915,9 @@ declare class Go2rtcTcpServer extends EventEmitter<{
|
|
|
9008
9915
|
private resolvedPort;
|
|
9009
9916
|
private nativeFanout;
|
|
9010
9917
|
private nativeStreamActive;
|
|
9918
|
+
private nativeStreamStopping;
|
|
9919
|
+
private nativeStreamRetryTimer;
|
|
9920
|
+
private nativeStreamRetryDelayMs;
|
|
9011
9921
|
private dedicatedSessionRelease;
|
|
9012
9922
|
private detectedVideoType;
|
|
9013
9923
|
private connectedClients;
|
|
@@ -9069,6 +9979,21 @@ declare class Go2rtcTcpServer extends EventEmitter<{
|
|
|
9069
9979
|
* Returns null when the buffer is not a valid ADTS frame.
|
|
9070
9980
|
*/
|
|
9071
9981
|
private static parseAdtsSamplingInfo;
|
|
9982
|
+
/**
|
|
9983
|
+
* Schedule another startNativeStream() attempt after the given delay.
|
|
9984
|
+
* Idempotent: a no-op if a retry is already scheduled, the server is no
|
|
9985
|
+
* longer active, or an explicit stop is in progress. Implements unbounded
|
|
9986
|
+
* exponential backoff (5s → 60s) so a camera that stays unreachable for
|
|
9987
|
+
* minutes (e.g. nightly maintenance reboot) eventually recovers without
|
|
9988
|
+
* manual intervention — see issue #16.
|
|
9989
|
+
*/
|
|
9990
|
+
private scheduleNativeStreamRetry;
|
|
9991
|
+
/**
|
|
9992
|
+
* Cancel any pending retry timer and reset the backoff. Called on explicit
|
|
9993
|
+
* stop and on first-frame-received so the next failure starts the backoff
|
|
9994
|
+
* window from scratch.
|
|
9995
|
+
*/
|
|
9996
|
+
private clearNativeStreamRetry;
|
|
9072
9997
|
private startNativeStream;
|
|
9073
9998
|
private stopNativeStream;
|
|
9074
9999
|
private startStreamHealthMonitor;
|
|
@@ -9368,6 +10293,12 @@ interface BaichuanWebRTCServerOptions {
|
|
|
9368
10293
|
iceAdditionalHostAddresses?: string[];
|
|
9369
10294
|
/** Force relay-only (TURN) if needed */
|
|
9370
10295
|
iceTransportPolicy?: "all" | "relay";
|
|
10296
|
+
/**
|
|
10297
|
+
* Path to ffmpeg used for AAC → Opus audio transcoding. Defaults to
|
|
10298
|
+
* "ffmpeg" on PATH. Pass an empty string to disable audio (the audio track
|
|
10299
|
+
* will still appear in the SDP for SDP-stability, but stay silent).
|
|
10300
|
+
*/
|
|
10301
|
+
ffmpegPath?: string;
|
|
9371
10302
|
/** Logger callback */
|
|
9372
10303
|
logger?: (level: "debug" | "info" | "warn" | "error", message: string) => void;
|
|
9373
10304
|
}
|
|
@@ -9466,6 +10397,14 @@ declare class BaichuanWebRTCServer extends EventEmitter {
|
|
|
9466
10397
|
* H.265 → DataChannel with raw Annex-B frames (decoded by WebCodecs in browser)
|
|
9467
10398
|
*/
|
|
9468
10399
|
private pumpFramesToWebRTC;
|
|
10400
|
+
/**
|
|
10401
|
+
* Lazily start the AAC → Opus transcoder for `session` and wire it to the
|
|
10402
|
+
* audio RTP track. ffmpeg writes RTP-formatted Opus packets back to a UDP
|
|
10403
|
+
* loopback the transcoder owns; we strip the RTP header and rewrap the
|
|
10404
|
+
* Opus payload with our audioTrack's SSRC so the browser receives a
|
|
10405
|
+
* coherent stream.
|
|
10406
|
+
*/
|
|
10407
|
+
private ensureAudioTranscoder;
|
|
9469
10408
|
/**
|
|
9470
10409
|
* Send H.264 frame via RTP media track
|
|
9471
10410
|
* Returns the number of RTP packets sent
|
|
@@ -9724,127 +10663,6 @@ declare function createMjpegBoundary(): string;
|
|
|
9724
10663
|
declare function getMjpegContentType(boundary: string): string;
|
|
9725
10664
|
declare function formatMjpegFrame(frame: Buffer, boundary: string): Buffer;
|
|
9726
10665
|
|
|
9727
|
-
/**
|
|
9728
|
-
* BcMedia Parser - Parses Baichuan media packets (video/audio frames)
|
|
9729
|
-
*
|
|
9730
|
-
* BcMedia packets have magic headers that identify the packet type:
|
|
9731
|
-
* - InfoV1: 0x31303031
|
|
9732
|
-
* - InfoV2: 0x32303031
|
|
9733
|
-
* - IFrame: 0x63643030 - 0x63643039 (includes channel number)
|
|
9734
|
-
* - PFrame: 0x63643130 - 0x63643139 (includes channel number)
|
|
9735
|
-
* - AAC: 0x62773530
|
|
9736
|
-
* - ADPCM: 0x62773130
|
|
9737
|
-
*/
|
|
9738
|
-
type BcMediaType = "InfoV1" | "InfoV2" | "Iframe" | "Pframe" | "Aac" | "Adpcm";
|
|
9739
|
-
interface BcMediaIframe {
|
|
9740
|
-
type: "Iframe";
|
|
9741
|
-
videoType: "H264" | "H265";
|
|
9742
|
-
microseconds: number;
|
|
9743
|
-
time?: number;
|
|
9744
|
-
/** Raw additional header (if present) */
|
|
9745
|
-
additionalHeader?: Buffer;
|
|
9746
|
-
/** Additional header size */
|
|
9747
|
-
additionalHeaderSize?: number;
|
|
9748
|
-
/** Unknown u32 field after microseconds */
|
|
9749
|
-
unknown?: number;
|
|
9750
|
-
data: Buffer;
|
|
9751
|
-
}
|
|
9752
|
-
interface BcMediaPframe {
|
|
9753
|
-
type: "Pframe";
|
|
9754
|
-
videoType: "H264" | "H265";
|
|
9755
|
-
microseconds: number;
|
|
9756
|
-
/** Raw additional header (if present) */
|
|
9757
|
-
additionalHeader?: Buffer;
|
|
9758
|
-
/** Additional header size */
|
|
9759
|
-
additionalHeaderSize?: number;
|
|
9760
|
-
/** Unknown u32 field after microseconds */
|
|
9761
|
-
unknown?: number;
|
|
9762
|
-
data: Buffer;
|
|
9763
|
-
}
|
|
9764
|
-
interface BcMediaInfoV1 {
|
|
9765
|
-
type: "InfoV1";
|
|
9766
|
-
videoWidth: number;
|
|
9767
|
-
videoHeight: number;
|
|
9768
|
-
fps: number;
|
|
9769
|
-
startYear: number;
|
|
9770
|
-
startMonth: number;
|
|
9771
|
-
startDay: number;
|
|
9772
|
-
startHour: number;
|
|
9773
|
-
startMin: number;
|
|
9774
|
-
startSeconds: number;
|
|
9775
|
-
endYear: number;
|
|
9776
|
-
endMonth: number;
|
|
9777
|
-
endDay: number;
|
|
9778
|
-
endHour: number;
|
|
9779
|
-
endMin: number;
|
|
9780
|
-
endSeconds: number;
|
|
9781
|
-
}
|
|
9782
|
-
interface BcMediaInfoV2 {
|
|
9783
|
-
type: "InfoV2";
|
|
9784
|
-
videoWidth: number;
|
|
9785
|
-
videoHeight: number;
|
|
9786
|
-
fps: number;
|
|
9787
|
-
startYear: number;
|
|
9788
|
-
startMonth: number;
|
|
9789
|
-
startDay: number;
|
|
9790
|
-
startHour: number;
|
|
9791
|
-
startMin: number;
|
|
9792
|
-
startSeconds: number;
|
|
9793
|
-
endYear: number;
|
|
9794
|
-
endMonth: number;
|
|
9795
|
-
endDay: number;
|
|
9796
|
-
endHour: number;
|
|
9797
|
-
endMin: number;
|
|
9798
|
-
endSeconds: number;
|
|
9799
|
-
}
|
|
9800
|
-
interface BcMediaAac {
|
|
9801
|
-
type: "Aac";
|
|
9802
|
-
data: Buffer;
|
|
9803
|
-
}
|
|
9804
|
-
interface BcMediaAdpcm {
|
|
9805
|
-
type: "Adpcm";
|
|
9806
|
-
data: Buffer;
|
|
9807
|
-
}
|
|
9808
|
-
type BcMedia = BcMediaIframe | BcMediaPframe | BcMediaInfoV1 | BcMediaInfoV2 | BcMediaAac | BcMediaAdpcm;
|
|
9809
|
-
/**
|
|
9810
|
-
* Parse BcMedia packet from binary data.
|
|
9811
|
-
*/
|
|
9812
|
-
declare function parseBcMedia(buf: Buffer): {
|
|
9813
|
-
media: BcMedia;
|
|
9814
|
-
consumed: number;
|
|
9815
|
-
} | null;
|
|
9816
|
-
|
|
9817
|
-
/**
|
|
9818
|
-
* BcMedia Codec - Assembles fragmented BcMedia packets from stream
|
|
9819
|
-
*
|
|
9820
|
-
* BcMedia packets can be fragmented across multiple Baichuan frames.
|
|
9821
|
-
* This codec buffers incomplete packets and assembles them when complete.
|
|
9822
|
-
*/
|
|
9823
|
-
|
|
9824
|
-
declare class BcMediaCodec {
|
|
9825
|
-
private buffer;
|
|
9826
|
-
private strict;
|
|
9827
|
-
private amountSkipped;
|
|
9828
|
-
private logger;
|
|
9829
|
-
constructor(strict?: boolean, logger?: Logger);
|
|
9830
|
-
/**
|
|
9831
|
-
* Push data into the codec buffer and try to parse complete BcMedia packets.
|
|
9832
|
-
* Returns an array of complete BcMedia packets found.
|
|
9833
|
-
*
|
|
9834
|
-
* @param chunk - New data chunk to add to buffer
|
|
9835
|
-
* @returns Array of complete BcMedia packets (empty if none complete yet)
|
|
9836
|
-
*/
|
|
9837
|
-
decode(chunk: Buffer): BcMedia[];
|
|
9838
|
-
/**
|
|
9839
|
-
* Get remaining buffer (for debugging)
|
|
9840
|
-
*/
|
|
9841
|
-
getRemainingBuffer(): Buffer;
|
|
9842
|
-
/**
|
|
9843
|
-
* Clear the buffer (useful for resetting the codec)
|
|
9844
|
-
*/
|
|
9845
|
-
clear(): void;
|
|
9846
|
-
}
|
|
9847
|
-
|
|
9848
10666
|
/**
|
|
9849
10667
|
* H.264 Format Converter
|
|
9850
10668
|
* Converts H.264 data from length-prefixed (AVCC) to Annex-B (start codes).
|
|
@@ -10116,4 +10934,65 @@ declare class CompositeRtspServer extends EventEmitter<{
|
|
|
10116
10934
|
getClientCount(): number;
|
|
10117
10935
|
}
|
|
10118
10936
|
|
|
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 };
|
|
10937
|
+
/**
|
|
10938
|
+
* Motion-detection zone grid helpers.
|
|
10939
|
+
*
|
|
10940
|
+
* Reolink's GetMdAlarm response (cmd_id=46) carries the active detection
|
|
10941
|
+
* region as a base64-encoded bitmap inside `<scope><valueTable>...</valueTable></scope>`.
|
|
10942
|
+
* The bitmap has one bit per grid cell:
|
|
10943
|
+
*
|
|
10944
|
+
* <scope>
|
|
10945
|
+
* <columns>96</columns>
|
|
10946
|
+
* <rows>64</rows>
|
|
10947
|
+
* <valueTable>{base64 of columns*rows bits, packed MSB-first per byte}</valueTable>
|
|
10948
|
+
* </scope>
|
|
10949
|
+
*
|
|
10950
|
+
* The same shape is reused by AI detection (`<AiDetectCfg><area>...</area>`)
|
|
10951
|
+
* — only the column/row counts differ across firmwares. Use the helpers
|
|
10952
|
+
* here to round-trip between the camera's base64 string and a flat boolean
|
|
10953
|
+
* grid the UI can render and edit.
|
|
10954
|
+
*/
|
|
10955
|
+
interface MotionZoneScope {
|
|
10956
|
+
/** Active region width (effective grid columns, `<width>` in MD). */
|
|
10957
|
+
width: number;
|
|
10958
|
+
/** Active region height (effective grid rows, `<height>` in MD). */
|
|
10959
|
+
height: number;
|
|
10960
|
+
/** Bitmap columns reported by `<scope><columns>`. */
|
|
10961
|
+
columns: number;
|
|
10962
|
+
/** Bitmap rows reported by `<scope><rows>`. */
|
|
10963
|
+
rows: number;
|
|
10964
|
+
/** Flat `width × height` array, row-major. `true` = cell included. */
|
|
10965
|
+
cells: boolean[];
|
|
10966
|
+
}
|
|
10967
|
+
/**
|
|
10968
|
+
* Decode the base64 `valueTable` from a `<scope>` (or `<area>`) into a flat
|
|
10969
|
+
* boolean grid. Bytes are packed MSB-first: bit 7 of byte 0 is cell (0,0).
|
|
10970
|
+
*
|
|
10971
|
+
* The camera ships TWO pairs of dimensions: `<scope><columns>×<rows>`
|
|
10972
|
+
* (bitmap size — typically 96×64) and `<width>×<height>` in the parent
|
|
10973
|
+
* block (the effective motion grid — typically smaller, e.g. 60×33 on
|
|
10974
|
+
* E1 Zoom). The user-editable region matches `width × height`, not the
|
|
10975
|
+
* full bitmap; bits past that are camera-side padding that stays 0.
|
|
10976
|
+
*
|
|
10977
|
+
* When `width`/`height` are omitted we treat the whole bitmap as the
|
|
10978
|
+
* active region (back-compat).
|
|
10979
|
+
*
|
|
10980
|
+
* Throws if the base64 contains too few bytes for `columns*rows` bits.
|
|
10981
|
+
*/
|
|
10982
|
+
declare function decodeMotionScopeBitmap(valueTable: string, columns: number, rows: number, width?: number, height?: number): MotionZoneScope;
|
|
10983
|
+
/**
|
|
10984
|
+
* Encode a `width × height` boolean grid back into the camera's
|
|
10985
|
+
* `columns × rows` `valueTable`. Bits outside the active region stay 0,
|
|
10986
|
+
* matching what the camera ships on the way down.
|
|
10987
|
+
*
|
|
10988
|
+
* `scope.cells.length` must equal `scope.width * scope.height`.
|
|
10989
|
+
*/
|
|
10990
|
+
declare function encodeMotionScopeBitmap(scope: MotionZoneScope): string;
|
|
10991
|
+
/**
|
|
10992
|
+
* Convenience: build an "everything enabled" grid of the given dimensions.
|
|
10993
|
+
* Useful when the camera response has no `<valueTable>` and we want to
|
|
10994
|
+
* start the user off with a clean slate.
|
|
10995
|
+
*/
|
|
10996
|
+
declare function fullCoverageScope(columns: number, rows: number, width?: number, height?: number): MotionZoneScope;
|
|
10997
|
+
|
|
10998
|
+
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, type AutoRebootConfig, type AutoRebootConfigPatch, 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_AUTO_REBOOT, 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_DST, BC_CMD_ID_GET_EMAIL, 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_NTP, 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_VERSION_INFO, 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_AUTO_REBOOT, 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_DST, BC_CMD_ID_SET_EMAIL, 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_NTP, BC_CMD_ID_SET_OSD_DATETIME, 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_SYSTEM_GENERAL, 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_TEST_EMAIL, 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 BaichuanVersionInfo, 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 DayOfWeek, 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 DstConfig, type DstConfigPatch, type DualLensChannelAnalysis, type DualLensChannelInfo, type EmailAttachmentType, type EmailConfig, type EmailConfigPatch, type EmailTaskConfig, type EmailTaskScheduleItem, type EmailTextType, type EncConfig, type EncOptions, type EncResolutionOption, type EncStreamOptions, type EncStreamPatch, type EncryptionProtocol, type Events, type EventsResponse, type FloodlightTaskConfig, type FloodlightTaskState, 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, type MotionZoneScope, MpegTsMuxer, type MpegTsMuxerOptions, NVR_HUB_EXACT_TYPES, NVR_HUB_MODEL_PATTERNS, type NativeVideoStreamVariant, type NtpConfig, type NtpConfigPatch, type NvrChannelsSummaryCacheEntry, type OnlineUserListConfig, type OsdChannel, type OsdConfig, type OsdDateFormat, 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 ReolinkDetectionBox, type ReolinkDetectionDecodeState, type ReolinkDetectionEvent, 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 SystemGeneralPatch, type TalkAbility$1 as TalkAbility, type TalkAudioConfig, type TalkConfig, type TalkSession$1 as TalkSession, type TalkSessionInfo, type TimeFormat, type TimelapseCfgConfig, type TwoWayAudioConfig, type UnknownChunkListener, 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 XmlJsonObject, type XmlJsonPrimitive, type XmlJsonValue, 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, decodeMotionScopeBitmap, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaArpTable, discoverViaDhcpListener, discoverViaHttpScan, discoverViaOnvif, discoverViaTcpPortScan, discoverViaUdpBroadcast, discoverViaUdpDirect, encodeHeader, encodeMotionScopeBitmap, ensureXmlHeader, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, fullCoverageScope, 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, upsertXmlTag, xmlEscape, xmlIndicatesFloodlight, zipDirectory };
|