@apocaliss92/nodelink-js 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DiagnosticsTools-K4MF2VXZ.js → DiagnosticsTools-QJ3CRYGA.js} +2 -2
- package/dist/{chunk-XDVBNZGR.js → chunk-IQVVVSXO.js} +48 -16
- package/dist/{chunk-XDVBNZGR.js.map → chunk-IQVVVSXO.js.map} +1 -1
- package/dist/{chunk-EAHRVNEX.js → chunk-Q4AXRV2G.js} +214 -36
- package/dist/chunk-Q4AXRV2G.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +250 -48
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +261 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +70 -1
- package/dist/index.d.ts +72 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-EAHRVNEX.js.map +0 -1
- /package/dist/{DiagnosticsTools-K4MF2VXZ.js.map → DiagnosticsTools-QJ3CRYGA.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -291,9 +291,44 @@ declare function decodeHeader(buf: AnyBuffer): {
|
|
|
291
291
|
* - expects each message to start with the magic header
|
|
292
292
|
* - supports multiple messages per TCP chunk
|
|
293
293
|
* - waits for full body before emitting
|
|
294
|
+
*
|
|
295
|
+
* Accumulation strategy: incoming chunks are appended to a pending list
|
|
296
|
+
* (O(1) per chunk) and only concatenated into a contiguous `this.buffer`
|
|
297
|
+
* when a parse is actually attempted. This avoids the previous O(n²)
|
|
298
|
+
* behavior where every TCP chunk re-copied the whole retained buffer —
|
|
299
|
+
* costly for large video frames fragmented across many small chunks.
|
|
300
|
+
*
|
|
301
|
+
* The observable behavior (the exact sequence of frames emitted, magic
|
|
302
|
+
* realignment, multi-message chunks, waiting for a complete body) is
|
|
303
|
+
* identical to the prior `Buffer.concat`-per-chunk implementation.
|
|
294
304
|
*/
|
|
295
305
|
declare class BaichuanFrameParser {
|
|
306
|
+
/** Retained-but-unconsumed contiguous bytes from previous push() calls. */
|
|
296
307
|
private buffer;
|
|
308
|
+
/** Chunks received since the last materialization, not yet concatenated. */
|
|
309
|
+
private pending;
|
|
310
|
+
/** Total bytes held in `pending` (kept in sync to avoid re-summing). */
|
|
311
|
+
private pendingLen;
|
|
312
|
+
/**
|
|
313
|
+
* Total contiguous bytes (`buffer` + `pending`) required before the next
|
|
314
|
+
* parse attempt can make progress. While buffered bytes stay below this,
|
|
315
|
+
* incoming chunks are merely stashed in `pending` with no copy. This is
|
|
316
|
+
* the mechanism that turns the worst case (a large frame fragmented over
|
|
317
|
+
* many small TCP chunks) from O(n²) into O(n): we concatenate once, when
|
|
318
|
+
* enough bytes have arrived, instead of on every chunk.
|
|
319
|
+
*
|
|
320
|
+
* Starts at 4 — the minimum needed to inspect the magic header.
|
|
321
|
+
*/
|
|
322
|
+
private needed;
|
|
323
|
+
/**
|
|
324
|
+
* Collapse `this.buffer` + all `pending` chunks into a single contiguous
|
|
325
|
+
* buffer. The retained leftover is copied at most once per materialize(),
|
|
326
|
+
* and materialize() only runs when `needed` bytes are available — so a
|
|
327
|
+
* fragmented frame is assembled with a single concat, not one per chunk.
|
|
328
|
+
*/
|
|
329
|
+
private materialize;
|
|
330
|
+
/** Total buffered bytes, whether materialized or still pending. */
|
|
331
|
+
private get available();
|
|
297
332
|
push(chunk: Buffer): BaichuanFrame[];
|
|
298
333
|
}
|
|
299
334
|
|
|
@@ -3039,6 +3074,37 @@ declare class BaichuanClient extends EventEmitter<{
|
|
|
3039
3074
|
login(maxEncryption?: MaxEncryption): Promise<void>;
|
|
3040
3075
|
}
|
|
3041
3076
|
|
|
3077
|
+
/**
|
|
3078
|
+
* Ask the kernel which local IP it would use to send a UDP packet to
|
|
3079
|
+
* `destHost:destPort`. Uses `dgram.Socket.connect()` to bind a fresh
|
|
3080
|
+
* socket on a wildcard, then reads back `address()` which now reports
|
|
3081
|
+
* the kernel-selected source. Closes the probe socket before returning
|
|
3082
|
+
* — never sends a real packet.
|
|
3083
|
+
*
|
|
3084
|
+
* Throws on EHOSTUNREACH / EAI_FAIL / connect timeout. Caller treats
|
|
3085
|
+
* "throws" as "couldn't tell" rather than as a hard error.
|
|
3086
|
+
*/
|
|
3087
|
+
declare function probeEgressForHost(destHost: string, destPort: number): Promise<{
|
|
3088
|
+
localAddress: string;
|
|
3089
|
+
localPort: number;
|
|
3090
|
+
}>;
|
|
3091
|
+
/**
|
|
3092
|
+
* Cheap IPv4-only same-subnet check.
|
|
3093
|
+
*
|
|
3094
|
+
* Returns:
|
|
3095
|
+
* - `"same"` — `destHost` falls inside the subnet of the interface
|
|
3096
|
+
* that owns `srcInfo.localAddress`. The kernel picked the matching NIC.
|
|
3097
|
+
* - `"mismatch"` — the kernel-picked source IP belongs to an interface
|
|
3098
|
+
* whose subnet does NOT contain `destHost`. Classic multi-NIC
|
|
3099
|
+
* misrouting: the dest is on the LAN but our packets are leaving via
|
|
3100
|
+
* Tailscale / VPN / Docker bridge with a source IP the cam will reject.
|
|
3101
|
+
* - `"unknown"` — `destHost` isn't a parseable IPv4 literal (probably
|
|
3102
|
+
* a hostname), or none of our interfaces match the source IP. Don't
|
|
3103
|
+
* guess — say so.
|
|
3104
|
+
*/
|
|
3105
|
+
declare function isSameSubnetAsAnyLocalIface(destHost: string, srcInfo: {
|
|
3106
|
+
localAddress: string;
|
|
3107
|
+
}): "same" | "mismatch" | "unknown";
|
|
3042
3108
|
type BcUdpStreamOptions = {
|
|
3043
3109
|
/** Local discovery via UID (typical for battery cameras). */
|
|
3044
3110
|
mode: "uid";
|
|
@@ -3089,6 +3155,8 @@ type BcUdpDiscoveryMethod = "local-broadcast" | "local-direct" | "remote" | "map
|
|
|
3089
3155
|
* instead of silently hammering loopback with 30s of UDP timeouts.
|
|
3090
3156
|
*/
|
|
3091
3157
|
declare function isUnroutableForP2P(ip: string): boolean;
|
|
3158
|
+
/** Test-only: wipe the dedup/cache state between specs. */
|
|
3159
|
+
declare function _clearP2pLookupDedupForTests(): void;
|
|
3092
3160
|
/**
|
|
3093
3161
|
* Implements BCUDP as a reliable "byte stream" (ACK + resend).
|
|
3094
3162
|
*/
|
|
@@ -3151,6 +3219,7 @@ declare class BcUdpStream extends EventEmitter<{
|
|
|
3151
3219
|
private getLocalIPv4;
|
|
3152
3220
|
private discoveryUidP2p;
|
|
3153
3221
|
private p2pUidLookup;
|
|
3222
|
+
private _doP2pUidLookupWork;
|
|
3154
3223
|
private p2pUidLookupOne;
|
|
3155
3224
|
private p2pRegister;
|
|
3156
3225
|
private p2pConnect;
|
|
@@ -12225,4 +12294,4 @@ interface CreateEmailPushServerParams {
|
|
|
12225
12294
|
declare function getCameraEmailAddress(cameraId: string, domain: string): string;
|
|
12226
12295
|
declare function createEmailPushServer(params: CreateEmailPushServerParams): EmailPushServerInstance;
|
|
12227
12296
|
|
|
12228
|
-
export { type AIDetectionState, type AIEvent, type AIState, ALL_UDP_DISCOVERY_METHODS, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiDetectCfgZone, 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_DEVICE_DETECT, BC_CMD_ID_DEVICE_DETECT_CANDIDATES, 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_SNAPSHOT, 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_UID, 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 BackchannelCodec, type BackchannelRoute, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFloodlightStatusPush, 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, BaichuanRtspBackchannelServer, type BaichuanRtspBackchannelServerOptions, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSirenStatusPush, 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, type CreateEmailPushServerParams, DEFAULT_SHELTER_CANVAS, 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 EmailPushEvent, type EmailPushInferredType, type EmailPushLogger, type EmailPushServerConfig, type EmailPushServerInstance, type EmailPushServerStatus, type EmailPushTlsOptions, 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 LoadTlsParams, 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 MotionSensitivityBand, 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 PrivacyMaskZones, 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, RtspBackchannel, type RtspBackchannelOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type ShelterCanvas, type ShelterRect, 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 TrackShelterRect, type TwoWayAudioConfig, type UdpDiscoveryMethod, 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, _resetEmailPushBusForTests, abilitiesHasAny, aesDecrypt, aesEncrypt, alawToPcm16, 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, createEmailPushServer, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideSleepInferenceTransition, decideVideoclipTranscodeMode, decodeAiDetectCfg, decodeHeader, decodeMotionScopeBitmap, decodePrivacyMaskZones, decodeShelterCoord, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaArpTable, discoverViaDhcpListener, discoverViaHttpScan, discoverViaOnvif, discoverViaTcpPortScan, discoverViaUdpBroadcast, discoverViaUdpDirect, emitEmailPushEvent, encodeHeader, encodeImaAdpcm, encodeMotionScopeBitmap, encodeMotionSensitivityListXml, encodeShelterCoord, encodeShelterListXml, encodeTrackShelterListXml, ensureXmlHeader, extractCanvasFromShelterXml, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, fullCoverageScope, getCameraEmailAddress, getConstructedVideoStreamOptions, getEmailPushCameraResolver, getGlobalLogger, getH265NalType, getLastEmailPushEvent, getMjpegContentType, getRecentEmailPushEvents, getSupportItemForChannel, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isTcpFailureThatShouldFallbackToUdp, isUnroutableForP2P, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, loadEmailPushTls, mapEmailPushInferredType, maskUid, md5HexUpper, md5StrModern, mulawToPcm16, normalizeDayNightMode, normalizeOpenClose, normalizeUid, onEmailPushEvent, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseRtpPacket, parseSupportXml, patchAiDetectCfgXml, patchMotionSensitivityListXml, patchNestedTag, patchShelterXml, printNvrDiagnostics, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, sanitizeFixtureData, selectViableUdpMethods, setEmailPushCameraResolver, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, tcpReachabilityProbe, testChannelStreams, upsamplePcm16, upsertXmlTag, xmlEscape, xmlIndicatesFloodlight, zipDirectory };
|
|
12297
|
+
export { type AIDetectionState, type AIEvent, type AIState, ALL_UDP_DISCOVERY_METHODS, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiDetectCfgZone, 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_DEVICE_DETECT, BC_CMD_ID_DEVICE_DETECT_CANDIDATES, 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_SNAPSHOT, 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_UID, 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 BackchannelCodec, type BackchannelRoute, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFloodlightStatusPush, 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, BaichuanRtspBackchannelServer, type BaichuanRtspBackchannelServerOptions, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSirenStatusPush, 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, type CreateEmailPushServerParams, DEFAULT_SHELTER_CANVAS, 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 EmailPushEvent, type EmailPushInferredType, type EmailPushLogger, type EmailPushServerConfig, type EmailPushServerInstance, type EmailPushServerStatus, type EmailPushTlsOptions, 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 LoadTlsParams, 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 MotionSensitivityBand, 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 PrivacyMaskZones, 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, RtspBackchannel, type RtspBackchannelOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type ShelterCanvas, type ShelterRect, 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 TrackShelterRect, type TwoWayAudioConfig, type UdpDiscoveryMethod, 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, _clearP2pLookupDedupForTests, _resetEmailPushBusForTests, abilitiesHasAny, aesDecrypt, aesEncrypt, alawToPcm16, 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, createEmailPushServer, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideSleepInferenceTransition, decideVideoclipTranscodeMode, decodeAiDetectCfg, decodeHeader, decodeMotionScopeBitmap, decodePrivacyMaskZones, decodeShelterCoord, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaArpTable, discoverViaDhcpListener, discoverViaHttpScan, discoverViaOnvif, discoverViaTcpPortScan, discoverViaUdpBroadcast, discoverViaUdpDirect, emitEmailPushEvent, encodeHeader, encodeImaAdpcm, encodeMotionScopeBitmap, encodeMotionSensitivityListXml, encodeShelterCoord, encodeShelterListXml, encodeTrackShelterListXml, ensureXmlHeader, extractCanvasFromShelterXml, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, fullCoverageScope, getCameraEmailAddress, getConstructedVideoStreamOptions, getEmailPushCameraResolver, getGlobalLogger, getH265NalType, getLastEmailPushEvent, getMjpegContentType, getRecentEmailPushEvents, getSupportItemForChannel, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isSameSubnetAsAnyLocalIface, isTcpFailureThatShouldFallbackToUdp, isUnroutableForP2P, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, loadEmailPushTls, mapEmailPushInferredType, maskUid, md5HexUpper, md5StrModern, mulawToPcm16, normalizeDayNightMode, normalizeOpenClose, normalizeUid, onEmailPushEvent, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseRtpPacket, parseSupportXml, patchAiDetectCfgXml, patchMotionSensitivityListXml, patchNestedTag, patchShelterXml, printNvrDiagnostics, probeEgressForHost, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, sanitizeFixtureData, selectViableUdpMethods, setEmailPushCameraResolver, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, tcpReachabilityProbe, testChannelStreams, upsamplePcm16, upsertXmlTag, xmlEscape, xmlIndicatesFloodlight, zipDirectory };
|
package/dist/index.d.ts
CHANGED
|
@@ -1166,9 +1166,44 @@ export declare type BaichuanFrame = {
|
|
|
1166
1166
|
* - expects each message to start with the magic header
|
|
1167
1167
|
* - supports multiple messages per TCP chunk
|
|
1168
1168
|
* - waits for full body before emitting
|
|
1169
|
+
*
|
|
1170
|
+
* Accumulation strategy: incoming chunks are appended to a pending list
|
|
1171
|
+
* (O(1) per chunk) and only concatenated into a contiguous `this.buffer`
|
|
1172
|
+
* when a parse is actually attempted. This avoids the previous O(n²)
|
|
1173
|
+
* behavior where every TCP chunk re-copied the whole retained buffer —
|
|
1174
|
+
* costly for large video frames fragmented across many small chunks.
|
|
1175
|
+
*
|
|
1176
|
+
* The observable behavior (the exact sequence of frames emitted, magic
|
|
1177
|
+
* realignment, multi-message chunks, waiting for a complete body) is
|
|
1178
|
+
* identical to the prior `Buffer.concat`-per-chunk implementation.
|
|
1169
1179
|
*/
|
|
1170
1180
|
export declare class BaichuanFrameParser {
|
|
1181
|
+
/** Retained-but-unconsumed contiguous bytes from previous push() calls. */
|
|
1171
1182
|
private buffer;
|
|
1183
|
+
/** Chunks received since the last materialization, not yet concatenated. */
|
|
1184
|
+
private pending;
|
|
1185
|
+
/** Total bytes held in `pending` (kept in sync to avoid re-summing). */
|
|
1186
|
+
private pendingLen;
|
|
1187
|
+
/**
|
|
1188
|
+
* Total contiguous bytes (`buffer` + `pending`) required before the next
|
|
1189
|
+
* parse attempt can make progress. While buffered bytes stay below this,
|
|
1190
|
+
* incoming chunks are merely stashed in `pending` with no copy. This is
|
|
1191
|
+
* the mechanism that turns the worst case (a large frame fragmented over
|
|
1192
|
+
* many small TCP chunks) from O(n²) into O(n): we concatenate once, when
|
|
1193
|
+
* enough bytes have arrived, instead of on every chunk.
|
|
1194
|
+
*
|
|
1195
|
+
* Starts at 4 — the minimum needed to inspect the magic header.
|
|
1196
|
+
*/
|
|
1197
|
+
private needed;
|
|
1198
|
+
/**
|
|
1199
|
+
* Collapse `this.buffer` + all `pending` chunks into a single contiguous
|
|
1200
|
+
* buffer. The retained leftover is copied at most once per materialize(),
|
|
1201
|
+
* and materialize() only runs when `needed` bytes are available — so a
|
|
1202
|
+
* fragmented frame is assembled with a single concat, not one per chunk.
|
|
1203
|
+
*/
|
|
1204
|
+
private materialize;
|
|
1205
|
+
/** Total buffered bytes, whether materialized or still pending. */
|
|
1206
|
+
private get available();
|
|
1172
1207
|
push(chunk: Buffer): BaichuanFrame[];
|
|
1173
1208
|
}
|
|
1174
1209
|
|
|
@@ -2976,6 +3011,7 @@ export declare class BcUdpStream extends EventEmitter<{
|
|
|
2976
3011
|
private getLocalIPv4;
|
|
2977
3012
|
private discoveryUidP2p;
|
|
2978
3013
|
private p2pUidLookup;
|
|
3014
|
+
private _doP2pUidLookupWork;
|
|
2979
3015
|
private p2pUidLookupOne;
|
|
2980
3016
|
private p2pRegister;
|
|
2981
3017
|
private p2pConnect;
|
|
@@ -3936,6 +3972,9 @@ export declare interface ChimeParams {
|
|
|
3936
3972
|
ledState?: number;
|
|
3937
3973
|
}
|
|
3938
3974
|
|
|
3975
|
+
/** Test-only: wipe the dedup/cache state between specs. */
|
|
3976
|
+
export declare function _clearP2pLookupDedupForTests(): void;
|
|
3977
|
+
|
|
3939
3978
|
export declare function collectCgiDiagnostics(params: {
|
|
3940
3979
|
cgi: ReolinkCgiApi;
|
|
3941
3980
|
channel?: number;
|
|
@@ -6239,6 +6278,24 @@ export declare interface IspConfig {
|
|
|
6239
6278
|
};
|
|
6240
6279
|
}
|
|
6241
6280
|
|
|
6281
|
+
/**
|
|
6282
|
+
* Cheap IPv4-only same-subnet check.
|
|
6283
|
+
*
|
|
6284
|
+
* Returns:
|
|
6285
|
+
* - `"same"` — `destHost` falls inside the subnet of the interface
|
|
6286
|
+
* that owns `srcInfo.localAddress`. The kernel picked the matching NIC.
|
|
6287
|
+
* - `"mismatch"` — the kernel-picked source IP belongs to an interface
|
|
6288
|
+
* whose subnet does NOT contain `destHost`. Classic multi-NIC
|
|
6289
|
+
* misrouting: the dest is on the LAN but our packets are leaving via
|
|
6290
|
+
* Tailscale / VPN / Docker bridge with a source IP the cam will reject.
|
|
6291
|
+
* - `"unknown"` — `destHost` isn't a parseable IPv4 literal (probably
|
|
6292
|
+
* a hostname), or none of our interfaces match the source IP. Don't
|
|
6293
|
+
* guess — say so.
|
|
6294
|
+
*/
|
|
6295
|
+
export declare function isSameSubnetAsAnyLocalIface(destHost: string, srcInfo: {
|
|
6296
|
+
localAddress: string;
|
|
6297
|
+
}): "same" | "mismatch" | "unknown";
|
|
6298
|
+
|
|
6242
6299
|
/**
|
|
6243
6300
|
* Check if a TCP error should trigger UDP fallback.
|
|
6244
6301
|
* Only transport/connection errors should fallback, not authentication errors.
|
|
@@ -6939,6 +6996,21 @@ export declare interface PrivacyMaskZones {
|
|
|
6939
6996
|
canvas: ShelterCanvas;
|
|
6940
6997
|
}
|
|
6941
6998
|
|
|
6999
|
+
/**
|
|
7000
|
+
* Ask the kernel which local IP it would use to send a UDP packet to
|
|
7001
|
+
* `destHost:destPort`. Uses `dgram.Socket.connect()` to bind a fresh
|
|
7002
|
+
* socket on a wildcard, then reads back `address()` which now reports
|
|
7003
|
+
* the kernel-selected source. Closes the probe socket before returning
|
|
7004
|
+
* — never sends a real packet.
|
|
7005
|
+
*
|
|
7006
|
+
* Throws on EHOSTUNREACH / EAI_FAIL / connect timeout. Caller treats
|
|
7007
|
+
* "throws" as "couldn't tell" rather than as a hard error.
|
|
7008
|
+
*/
|
|
7009
|
+
export declare function probeEgressForHost(destHost: string, destPort: number): Promise<{
|
|
7010
|
+
localAddress: string;
|
|
7011
|
+
localPort: number;
|
|
7012
|
+
}>;
|
|
7013
|
+
|
|
6942
7014
|
export declare interface PtzCommand {
|
|
6943
7015
|
action: "start" | "stop";
|
|
6944
7016
|
command: "Left" | "Right" | "Up" | "Down" | "ZoomIn" | "ZoomOut" | "FocusNear" | "FocusFar";
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
NVR_HUB_EXACT_TYPES,
|
|
15
15
|
NVR_HUB_MODEL_PATTERNS,
|
|
16
16
|
ReolinkBaichuanApi,
|
|
17
|
+
_clearP2pLookupDedupForTests,
|
|
17
18
|
_resetEmailPushBusForTests,
|
|
18
19
|
abilitiesHasAny,
|
|
19
20
|
asLogger,
|
|
@@ -54,6 +55,7 @@ import {
|
|
|
54
55
|
getVideoStream,
|
|
55
56
|
isDualLenseModel,
|
|
56
57
|
isNvrHubModel,
|
|
58
|
+
isSameSubnetAsAnyLocalIface,
|
|
57
59
|
isTcpFailureThatShouldFallbackToUdp,
|
|
58
60
|
isUnroutableForP2P,
|
|
59
61
|
mapEmailPushInferredType,
|
|
@@ -64,12 +66,13 @@ import {
|
|
|
64
66
|
patchAiDetectCfgXml,
|
|
65
67
|
patchMotionSensitivityListXml,
|
|
66
68
|
patchShelterXml,
|
|
69
|
+
probeEgressForHost,
|
|
67
70
|
selectViableUdpMethods,
|
|
68
71
|
setEmailPushCameraResolver,
|
|
69
72
|
setGlobalLogger,
|
|
70
73
|
tcpReachabilityProbe,
|
|
71
74
|
xmlIndicatesFloodlight
|
|
72
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-Q4AXRV2G.js";
|
|
73
76
|
import {
|
|
74
77
|
ReolinkCgiApi,
|
|
75
78
|
ReolinkHttpClient,
|
|
@@ -116,7 +119,7 @@ import {
|
|
|
116
119
|
upsertXmlTag,
|
|
117
120
|
xmlEscape,
|
|
118
121
|
zipDirectory
|
|
119
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-IQVVVSXO.js";
|
|
120
123
|
import {
|
|
121
124
|
AesStreamDecryptor,
|
|
122
125
|
BC_AES_IV,
|
|
@@ -10026,6 +10029,7 @@ export {
|
|
|
10026
10029
|
ReolinkHttpClient,
|
|
10027
10030
|
Rfc4571Muxer,
|
|
10028
10031
|
RtspBackchannel,
|
|
10032
|
+
_clearP2pLookupDedupForTests,
|
|
10029
10033
|
_resetEmailPushBusForTests,
|
|
10030
10034
|
abilitiesHasAny,
|
|
10031
10035
|
aesDecrypt,
|
|
@@ -10138,6 +10142,7 @@ export {
|
|
|
10138
10142
|
isH265Irap,
|
|
10139
10143
|
isH265KeyframeAnnexB,
|
|
10140
10144
|
isNvrHubModel,
|
|
10145
|
+
isSameSubnetAsAnyLocalIface,
|
|
10141
10146
|
isTcpFailureThatShouldFallbackToUdp,
|
|
10142
10147
|
isUnroutableForP2P,
|
|
10143
10148
|
isValidH264AnnexBAccessUnit,
|
|
@@ -10166,6 +10171,7 @@ export {
|
|
|
10166
10171
|
patchNestedTag,
|
|
10167
10172
|
patchShelterXml,
|
|
10168
10173
|
printNvrDiagnostics,
|
|
10174
|
+
probeEgressForHost,
|
|
10169
10175
|
runAllDiagnosticsConsecutively,
|
|
10170
10176
|
runMultifocalDiagnosticsConsecutively,
|
|
10171
10177
|
sampleStreams,
|