@apocaliss92/nodelink-js 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -10807,200 +10807,13 @@ interface ReplayHttpServer {
10807
10807
  */
10808
10808
  declare function createReplayHttpServer(options: ReplayHttpServerOptions): Promise<ReplayHttpServer>;
10809
10809
 
10810
- /**
10811
- * Go2rtcTcpServer — Lightweight TCP server that feeds raw Annex-B video
10812
- * (H.264 / H.265) and ADTS AAC audio frames to go2rtc via a plain TCP
10813
- * connection.
10814
- *
10815
- * go2rtc configuration example:
10816
- * streams:
10817
- * camera_main: tcp://127.0.0.1:{port}
10818
- *
10819
- * go2rtc auto-detects the codec from the bitstream (SPS/PPS/VPS NALUs).
10820
- *
10821
- * Lifecycle:
10822
- * 1. Server starts listening immediately on the configured port.
10823
- * 2. When the first TCP client connects the native camera stream is started.
10824
- * 3. Frames are fan-out to every connected client (go2rtc typically opens
10825
- * one connection, but multiple are supported).
10826
- * 4. When the last client disconnects a grace period runs before stopping
10827
- * the native stream (avoids thrashing on rapid reconnects).
10828
- * 5. A prebuffer ring keeps the last few seconds of frames so new clients
10829
- * get IDR-aligned fast startup without waiting for the next keyframe.
10830
- */
10831
-
10832
- type NativeFrame = {
10833
- audio: boolean;
10834
- data: Buffer;
10835
- codec: string | null;
10836
- sampleRate: number | null;
10837
- microseconds: number | null;
10838
- videoType?: "H264" | "H265";
10839
- isKeyframe?: boolean;
10840
- };
10841
- interface Go2rtcTcpServerOptions {
10842
- /** API instance (required). */
10843
- api: ReolinkBaichuanApi;
10844
- /** Channel number (required). */
10845
- channel: number;
10846
- /** Stream profile (required). */
10847
- profile: StreamProfile;
10848
- /** TrackMix tele/autotrack variant. */
10849
- variant?: NativeVideoStreamVariant;
10850
- /** Host to listen on (default: "127.0.0.1"). */
10851
- listenHost?: string;
10852
- /** Port to listen on (default: 0 = OS picks). */
10853
- listenPort?: number;
10854
- /** Logger. */
10855
- logger?: Logger$1;
10856
- /**
10857
- * External identifier for dedicated socket session.
10858
- * When provided, a dedicated BaichuanClient is created for the stream,
10859
- * isolating it from other streams on the shared socket.
10860
- */
10861
- deviceId?: string;
10862
- /** Grace period in ms before stopping native stream after last client disconnects (default: 30 000). */
10863
- gracePeriodMs?: number;
10864
- /** Maximum prebuffer window in ms (default: 3 000). */
10865
- prebufferMs?: number;
10866
- /** Maximum write buffer per client before dropping the connection (default: 100 MB). */
10867
- maxBufferBytes?: number;
10868
- /**
10869
- * Stream inactivity timeout in ms. If no frames arrive from the native
10870
- * stream for this duration, the stream is considered dead and will be
10871
- * torn down + restarted (similar to go2rtc's per-packet read deadline).
10872
- * Default: 15 000 (15s). Set to 0 to disable.
10873
- */
10874
- streamTimeoutMs?: number;
10875
- /**
10876
- * When true, the native camera stream is started immediately on start()
10877
- * rather than waiting for the first TCP client. This ensures frames are
10878
- * already flowing (and the prebuffer is warm) when go2rtc connects.
10879
- * Default: true.
10880
- */
10881
- prestartStream?: boolean;
10882
- }
10883
- declare class Go2rtcTcpServer extends EventEmitter<{
10884
- client: [string];
10885
- clientDisconnected: [string];
10886
- error: [Error];
10887
- close: [];
10888
- listening: [{
10889
- host: string;
10890
- port: number;
10891
- }];
10892
- }> {
10893
- private readonly api;
10894
- private readonly channel;
10895
- private readonly profile;
10896
- private readonly variant;
10897
- private readonly listenHost;
10898
- private readonly listenPort;
10899
- private readonly logger;
10900
- private readonly deviceId;
10901
- private readonly gracePeriodMs;
10902
- private readonly prebufferMaxMs;
10903
- private readonly maxBufferBytes;
10904
- private readonly streamTimeoutMs;
10905
- private readonly prestartStream;
10906
- private active;
10907
- private server;
10908
- private resolvedPort;
10909
- private nativeFanout;
10910
- private nativeStreamActive;
10911
- private nativeStreamStopping;
10912
- private nativeStreamRetryTimer;
10913
- private nativeStreamRetryDelayMs;
10914
- private dedicatedSessionRelease;
10915
- private detectedVideoType;
10916
- private connectedClients;
10917
- private clientSockets;
10918
- private stopGraceTimer;
10919
- private lastFrameAt;
10920
- private streamHealthTimer;
10921
- private totalFramesReceived;
10922
- private totalVideoFramesWritten;
10923
- private prebuffer;
10924
- private audioInfo;
10925
- constructor(options: Go2rtcTcpServerOptions);
10926
- /** Start listening. Resolves once the TCP server is bound. */
10927
- start(): Promise<void>;
10928
- /** Stop the server and all active streams. */
10929
- stop(): Promise<void>;
10930
- /** The actual port the server is listening on (available after start()). */
10931
- get port(): number | undefined;
10932
- /** The go2rtc-compatible source URL. */
10933
- get go2rtcSourceUrl(): string | undefined;
10934
- /** Number of currently connected clients. */
10935
- get clientCount(): number;
10936
- /**
10937
- * Subscribe to the raw native stream for diagnostic purposes.
10938
- * The subscriber receives the same frames the MPEG-TS muxer consumes
10939
- * (pre-muxing). Counts as a "consumer" so the native stream is kept alive
10940
- * for the lifetime of the subscription. If the stream is not already
10941
- * running (battery camera, prestart=false), this starts it.
10942
- */
10943
- subscribeDiagnostic(id: string): Promise<AsyncGenerator<NativeFrame, void, unknown>>;
10944
- /** Unsubscribe a diagnostic session and release its consumer slot. */
10945
- unsubscribeDiagnostic(id: string): void;
10946
- /**
10947
- * Returns ADTS AAC audio metadata detected from the native stream, or
10948
- * null if no audio frame has been observed yet (e.g. video-only cameras
10949
- * or before the first audio packet arrives).
10950
- */
10951
- getAudioInfo(): {
10952
- codec: "aac-adts";
10953
- sampleRate: number;
10954
- channels: number;
10955
- configHex: string;
10956
- } | null;
10957
- private handleClient;
10958
- private feedClient;
10959
- /**
10960
- * Convert a native video frame to Annex-B.
10961
- * Returns null for audio frames (handled separately by muxAudio).
10962
- */
10963
- private convertVideoFrame;
10964
- /** Check if an Annex-B buffer contains a keyframe (IDR for H.264, IRAP for H.265). */
10965
- private isAnnexBKeyframe;
10966
- /** Split Annex-B byte stream into individual NAL units. */
10967
- private static splitAnnexBNals;
10968
- /** True if `b` starts with an ADTS AAC syncword (0xFFF). */
10969
- private static isAdtsAacFrame;
10970
- /**
10971
- * Parse an ADTS header into {sampleRate, channels, AudioSpecificConfig hex}.
10972
- * Returns null when the buffer is not a valid ADTS frame.
10973
- */
10974
- private static parseAdtsSamplingInfo;
10975
- /**
10976
- * Schedule another startNativeStream() attempt after the given delay.
10977
- * Idempotent: a no-op if a retry is already scheduled, the server is no
10978
- * longer active, or an explicit stop is in progress. Implements unbounded
10979
- * exponential backoff (5s → 60s) so a camera that stays unreachable for
10980
- * minutes (e.g. nightly maintenance reboot) eventually recovers without
10981
- * manual intervention — see issue #16.
10982
- */
10983
- private scheduleNativeStreamRetry;
10984
- /**
10985
- * Cancel any pending retry timer and reset the backoff. Called on explicit
10986
- * stop and on first-frame-received so the next failure starts the backoff
10987
- * window from scratch.
10988
- */
10989
- private clearNativeStreamRetry;
10990
- private startNativeStream;
10991
- private stopNativeStream;
10992
- private startStreamHealthMonitor;
10993
- private stopStreamHealthMonitor;
10994
- private removeClient;
10995
- private scheduleStop;
10996
- }
10997
-
10998
10810
  /**
10999
10811
  * MPEG-TS Muxer for H.264/H.265 video + ADTS AAC audio.
11000
10812
  *
11001
- * Produces 188-byte MPEG-TS packets suitable for feeding to go2rtc via a
11002
- * plain TCP connection (`tcp://127.0.0.1:{port}`). go2rtc auto-detects the
11003
- * container format from the 0x47 sync byte and extracts both video and audio.
10813
+ * Produces 188-byte MPEG-TS packets with proper PTS/DTS timing, suitable for
10814
+ * piping into ffmpeg (e.g. the recording-replay MP4 export path). Consumers
10815
+ * auto-detect the container format from the 0x47 sync byte and extract both
10816
+ * video and audio.
11004
10817
  *
11005
10818
  * Stream layout:
11006
10819
  * PID 0x0000 — PAT (Program Association Table)
@@ -12481,4 +12294,4 @@ interface CreateEmailPushServerParams {
12481
12294
  declare function getCameraEmailAddress(cameraId: string, domain: string): string;
12482
12295
  declare function createEmailPushServer(params: CreateEmailPushServerParams): EmailPushServerInstance;
12483
12296
 
12484
- export { type AIDetectionState, type AIEvent, type AIState, ALL_UDP_DISCOVERY_METHODS, ALWAYS_ON_DEFAULTS, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiDetectCfgZone, type AiKey, type AiTypesCacheEntry, AlwaysOnController, type AlwaysOnControllerOptions, type AlwaysOnOptions, type AlwaysOnTrigger, 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, ContinuousVideoStream, type ContinuousVideoStreamOptions, 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$1 as 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 PlaceholderOptions, PlaceholderRenderer, 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 };
12297
+ export { type AIDetectionState, type AIEvent, type AIState, ALL_UDP_DISCOVERY_METHODS, ALWAYS_ON_DEFAULTS, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiDetectCfgZone, type AiKey, type AiTypesCacheEntry, AlwaysOnController, type AlwaysOnControllerOptions, type AlwaysOnOptions, type AlwaysOnTrigger, 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, ContinuousVideoStream, type ContinuousVideoStreamOptions, 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, 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$1 as 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 PlaceholderOptions, PlaceholderRenderer, 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
@@ -5860,164 +5860,6 @@ export declare interface GetVodUrlParams {
5860
5860
  */
5861
5861
  export declare function getXmlText(xml: string, tagName: string): string | undefined;
5862
5862
 
5863
- export declare class Go2rtcTcpServer extends EventEmitter<{
5864
- client: [string];
5865
- clientDisconnected: [string];
5866
- error: [Error];
5867
- close: [];
5868
- listening: [{
5869
- host: string;
5870
- port: number;
5871
- }];
5872
- }> {
5873
- private readonly api;
5874
- private readonly channel;
5875
- private readonly profile;
5876
- private readonly variant;
5877
- private readonly listenHost;
5878
- private readonly listenPort;
5879
- private readonly logger;
5880
- private readonly deviceId;
5881
- private readonly gracePeriodMs;
5882
- private readonly prebufferMaxMs;
5883
- private readonly maxBufferBytes;
5884
- private readonly streamTimeoutMs;
5885
- private readonly prestartStream;
5886
- private active;
5887
- private server;
5888
- private resolvedPort;
5889
- private nativeFanout;
5890
- private nativeStreamActive;
5891
- private nativeStreamStopping;
5892
- private nativeStreamRetryTimer;
5893
- private nativeStreamRetryDelayMs;
5894
- private dedicatedSessionRelease;
5895
- private detectedVideoType;
5896
- private connectedClients;
5897
- private clientSockets;
5898
- private stopGraceTimer;
5899
- private lastFrameAt;
5900
- private streamHealthTimer;
5901
- private totalFramesReceived;
5902
- private totalVideoFramesWritten;
5903
- private prebuffer;
5904
- private audioInfo;
5905
- constructor(options: Go2rtcTcpServerOptions);
5906
- /** Start listening. Resolves once the TCP server is bound. */
5907
- start(): Promise<void>;
5908
- /** Stop the server and all active streams. */
5909
- stop(): Promise<void>;
5910
- /** The actual port the server is listening on (available after start()). */
5911
- get port(): number | undefined;
5912
- /** The go2rtc-compatible source URL. */
5913
- get go2rtcSourceUrl(): string | undefined;
5914
- /** Number of currently connected clients. */
5915
- get clientCount(): number;
5916
- /**
5917
- * Subscribe to the raw native stream for diagnostic purposes.
5918
- * The subscriber receives the same frames the MPEG-TS muxer consumes
5919
- * (pre-muxing). Counts as a "consumer" so the native stream is kept alive
5920
- * for the lifetime of the subscription. If the stream is not already
5921
- * running (battery camera, prestart=false), this starts it.
5922
- */
5923
- subscribeDiagnostic(id: string): Promise<AsyncGenerator<NativeFrame, void, unknown>>;
5924
- /** Unsubscribe a diagnostic session and release its consumer slot. */
5925
- unsubscribeDiagnostic(id: string): void;
5926
- /**
5927
- * Returns ADTS AAC audio metadata detected from the native stream, or
5928
- * null if no audio frame has been observed yet (e.g. video-only cameras
5929
- * or before the first audio packet arrives).
5930
- */
5931
- getAudioInfo(): {
5932
- codec: "aac-adts";
5933
- sampleRate: number;
5934
- channels: number;
5935
- configHex: string;
5936
- } | null;
5937
- private handleClient;
5938
- private feedClient;
5939
- /**
5940
- * Convert a native video frame to Annex-B.
5941
- * Returns null for audio frames (handled separately by muxAudio).
5942
- */
5943
- private convertVideoFrame;
5944
- /** Check if an Annex-B buffer contains a keyframe (IDR for H.264, IRAP for H.265). */
5945
- private isAnnexBKeyframe;
5946
- /** Split Annex-B byte stream into individual NAL units. */
5947
- private static splitAnnexBNals;
5948
- /** True if `b` starts with an ADTS AAC syncword (0xFFF). */
5949
- private static isAdtsAacFrame;
5950
- /**
5951
- * Parse an ADTS header into {sampleRate, channels, AudioSpecificConfig hex}.
5952
- * Returns null when the buffer is not a valid ADTS frame.
5953
- */
5954
- private static parseAdtsSamplingInfo;
5955
- /**
5956
- * Schedule another startNativeStream() attempt after the given delay.
5957
- * Idempotent: a no-op if a retry is already scheduled, the server is no
5958
- * longer active, or an explicit stop is in progress. Implements unbounded
5959
- * exponential backoff (5s → 60s) so a camera that stays unreachable for
5960
- * minutes (e.g. nightly maintenance reboot) eventually recovers without
5961
- * manual intervention — see issue #16.
5962
- */
5963
- private scheduleNativeStreamRetry;
5964
- /**
5965
- * Cancel any pending retry timer and reset the backoff. Called on explicit
5966
- * stop and on first-frame-received so the next failure starts the backoff
5967
- * window from scratch.
5968
- */
5969
- private clearNativeStreamRetry;
5970
- private startNativeStream;
5971
- private stopNativeStream;
5972
- private startStreamHealthMonitor;
5973
- private stopStreamHealthMonitor;
5974
- private removeClient;
5975
- private scheduleStop;
5976
- }
5977
-
5978
- export declare interface Go2rtcTcpServerOptions {
5979
- /** API instance (required). */
5980
- api: ReolinkBaichuanApi;
5981
- /** Channel number (required). */
5982
- channel: number;
5983
- /** Stream profile (required). */
5984
- profile: StreamProfile;
5985
- /** TrackMix tele/autotrack variant. */
5986
- variant?: NativeVideoStreamVariant;
5987
- /** Host to listen on (default: "127.0.0.1"). */
5988
- listenHost?: string;
5989
- /** Port to listen on (default: 0 = OS picks). */
5990
- listenPort?: number;
5991
- /** Logger. */
5992
- logger?: Logger;
5993
- /**
5994
- * External identifier for dedicated socket session.
5995
- * When provided, a dedicated BaichuanClient is created for the stream,
5996
- * isolating it from other streams on the shared socket.
5997
- */
5998
- deviceId?: string;
5999
- /** Grace period in ms before stopping native stream after last client disconnects (default: 30 000). */
6000
- gracePeriodMs?: number;
6001
- /** Maximum prebuffer window in ms (default: 3 000). */
6002
- prebufferMs?: number;
6003
- /** Maximum write buffer per client before dropping the connection (default: 100 MB). */
6004
- maxBufferBytes?: number;
6005
- /**
6006
- * Stream inactivity timeout in ms. If no frames arrive from the native
6007
- * stream for this duration, the stream is considered dead and will be
6008
- * torn down + restarted (similar to go2rtc's per-packet read deadline).
6009
- * Default: 15 000 (15s). Set to 0 to disable.
6010
- */
6011
- streamTimeoutMs?: number;
6012
- /**
6013
- * When true, the native camera stream is started immediately on start()
6014
- * rather than waiting for the first TCP client. This ensures frames are
6015
- * already flowing (and the prebuffer is warm) when go2rtc connects.
6016
- * Default: true.
6017
- */
6018
- prestartStream?: boolean;
6019
- }
6020
-
6021
5863
  /**
6022
5864
  * Depacketizer for H.264 "RTP-like" payloads (RFC 6184) when the camera sends single NAL units,
6023
5865
  * STAP/MTAP aggregation or FU-A/FU-B fragmentation inside a BcMedia frame payload.
@@ -6797,9 +6639,10 @@ export declare class MpegTsMuxer {
6797
6639
  /**
6798
6640
  * MPEG-TS Muxer for H.264/H.265 video + ADTS AAC audio.
6799
6641
  *
6800
- * Produces 188-byte MPEG-TS packets suitable for feeding to go2rtc via a
6801
- * plain TCP connection (`tcp://127.0.0.1:{port}`). go2rtc auto-detects the
6802
- * container format from the 0x47 sync byte and extracts both video and audio.
6642
+ * Produces 188-byte MPEG-TS packets with proper PTS/DTS timing, suitable for
6643
+ * piping into ffmpeg (e.g. the recording-replay MP4 export path). Consumers
6644
+ * auto-detect the container format from the 0x47 sync byte and extract both
6645
+ * video and audio.
6803
6646
  *
6804
6647
  * Stream layout:
6805
6648
  * PID 0x0000 — PAT (Program Association Table)
@@ -6833,16 +6676,6 @@ export declare interface MpegTsMuxerOptions {
6833
6676
  */
6834
6677
  export declare function mulawToPcm16(bytes: Uint8Array | Buffer): Int16Array;
6835
6678
 
6836
- declare type NativeFrame = {
6837
- audio: boolean;
6838
- data: Buffer;
6839
- codec: string | null;
6840
- sampleRate: number | null;
6841
- microseconds: number | null;
6842
- videoType?: "H264" | "H265";
6843
- isKeyframe?: boolean;
6844
- };
6845
-
6846
6679
  export declare type NativeVideoStreamVariant = "default" | "autotrack" | "telephoto";
6847
6680
 
6848
6681
  /**