@apocaliss92/nodelink-js 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/dist/{DiagnosticsTools-MTXG65O3.js → DiagnosticsTools-EC7DADEQ.js} +2 -2
- package/dist/{chunk-MC2BRLLE.js → chunk-TZFZ5WJX.js} +71 -9
- package/dist/chunk-TZFZ5WJX.js.map +1 -0
- package/dist/{chunk-AFUYHWWQ.js → chunk-YUBYINJF.js} +673 -64
- package/dist/chunk-YUBYINJF.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +739 -68
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +2 -2
- package/dist/index.cjs +2041 -191
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +418 -4
- package/dist/index.d.ts +365 -3
- package/dist/index.js +1202 -32
- package/dist/index.js.map +1 -1
- package/package.json +13 -3
- package/dist/chunk-AFUYHWWQ.js.map +0 -1
- package/dist/chunk-MC2BRLLE.js.map +0 -1
- /package/dist/{DiagnosticsTools-MTXG65O3.js.map → DiagnosticsTools-EC7DADEQ.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1183,6 +1183,8 @@ interface ParsedRecordingFileName {
|
|
|
1183
1183
|
durationMs: number;
|
|
1184
1184
|
/** Frame rate extracted from filename hex flags (if available) */
|
|
1185
1185
|
framerate?: number;
|
|
1186
|
+
/** File size in bytes extracted from filename (last hex field before extension) */
|
|
1187
|
+
sizeBytes?: number;
|
|
1186
1188
|
flags?: RecordingVodFlags;
|
|
1187
1189
|
rawFlags?: Record<string, number>;
|
|
1188
1190
|
animalTypeRaw?: string;
|
|
@@ -1769,8 +1771,8 @@ declare function getVideoclipClientInfo(headers: Record<string, string | string[
|
|
|
1769
1771
|
* - Firefox: No H.265 support, needs transcoding
|
|
1770
1772
|
* - Android: Variable support, transcode for safety
|
|
1771
1773
|
*
|
|
1772
|
-
* @param headers HTTP request headers
|
|
1773
|
-
* @param forceMode Optional override: "passthrough" or "transcode-h264"
|
|
1774
|
+
* @param headers - HTTP request headers
|
|
1775
|
+
* @param forceMode - Optional override: "passthrough" or "transcode-h264"
|
|
1774
1776
|
* @returns Decision with mode, reason, and client info
|
|
1775
1777
|
*/
|
|
1776
1778
|
declare function decideVideoclipTranscodeMode(headers: Record<string, string | string[] | undefined>, forceMode?: VideoclipTranscodeMode): VideoclipModeDecision;
|
|
@@ -2728,7 +2730,8 @@ type VodFile = {
|
|
|
2728
2730
|
sec: number;
|
|
2729
2731
|
};
|
|
2730
2732
|
name: string;
|
|
2731
|
-
size
|
|
2733
|
+
/** File size in bytes - API may return as string or number */
|
|
2734
|
+
size: number | string;
|
|
2732
2735
|
};
|
|
2733
2736
|
type VodSearchResult = {
|
|
2734
2737
|
SearchResult?: {
|
|
@@ -3932,6 +3935,8 @@ declare class ReolinkBaichuanApi {
|
|
|
3932
3935
|
* Value: client, refCount, createdAt
|
|
3933
3936
|
*/
|
|
3934
3937
|
private readonly dedicatedClients;
|
|
3938
|
+
/** Keep replay dedicated sockets warm briefly to reduce clip switch latency. */
|
|
3939
|
+
private static readonly REPLAY_DEDICATED_KEEPALIVE_MS;
|
|
3935
3940
|
/**
|
|
3936
3941
|
* Get a summary of currently active dedicated sessions.
|
|
3937
3942
|
* Useful for debugging/logging to see how many sockets are open.
|
|
@@ -4053,6 +4058,17 @@ declare class ReolinkBaichuanApi {
|
|
|
4053
4058
|
* This ensures clean teardown at the end of each clip.
|
|
4054
4059
|
*/
|
|
4055
4060
|
private releaseDedicatedClient;
|
|
4061
|
+
/**
|
|
4062
|
+
* Force-close a dedicated client if it exists.
|
|
4063
|
+
* This is called BEFORE entering the queue to immediately terminate any existing stream
|
|
4064
|
+
* for the same sessionKey. The existing stream will receive an error, release its queue slot,
|
|
4065
|
+
* and the new request can then proceed.
|
|
4066
|
+
*
|
|
4067
|
+
* @param sessionKey - The session key to force-close (e.g., `replay:${deviceId}`)
|
|
4068
|
+
* @param logger - Optional logger
|
|
4069
|
+
* @returns true if a client was closed, false if no client existed
|
|
4070
|
+
*/
|
|
4071
|
+
private forceCloseDedicatedClient;
|
|
4056
4072
|
/**
|
|
4057
4073
|
* Create a dedicated Baichuan client session for streaming.
|
|
4058
4074
|
* This is useful for consumers that need isolated socket connections per stream.
|
|
@@ -5294,11 +5310,13 @@ declare class ReolinkBaichuanApi {
|
|
|
5294
5310
|
* @param settings - Floodlight settings to apply
|
|
5295
5311
|
*
|
|
5296
5312
|
* @example
|
|
5313
|
+
* ```typescript
|
|
5297
5314
|
* await api.setFloodlightSettings(0, {
|
|
5298
5315
|
* duration: 300, // 5 minutes
|
|
5299
5316
|
* detectType: 'people,vehicle',
|
|
5300
5317
|
* brightness: 80,
|
|
5301
5318
|
* });
|
|
5319
|
+
* ```
|
|
5302
5320
|
*/
|
|
5303
5321
|
setFloodlightSettings(channel: number | undefined, settings: {
|
|
5304
5322
|
duration?: number;
|
|
@@ -5908,6 +5926,13 @@ declare class ReolinkBaichuanApi {
|
|
|
5908
5926
|
* Default: false (passthrough/copy).
|
|
5909
5927
|
*/
|
|
5910
5928
|
transcodeH265ToH264?: boolean;
|
|
5929
|
+
/**
|
|
5930
|
+
* Use MPEG-TS muxer to preserve frame timestamps (PTS).
|
|
5931
|
+
* When true, frames are muxed into MPEG-TS before being passed to ffmpeg.
|
|
5932
|
+
* This can help with variable framerate streams but may cause issues with some decoders.
|
|
5933
|
+
* Default: true (MPEG-TS muxing for proper timestamp alignment).
|
|
5934
|
+
*/
|
|
5935
|
+
useMpegTsMuxer?: boolean;
|
|
5911
5936
|
}): Promise<{
|
|
5912
5937
|
mp4: Readable;
|
|
5913
5938
|
stop: () => Promise<void>;
|
|
@@ -5951,6 +5976,98 @@ declare class ReolinkBaichuanApi {
|
|
|
5951
5976
|
mp4: Readable;
|
|
5952
5977
|
stop: () => Promise<void>;
|
|
5953
5978
|
}>;
|
|
5979
|
+
/**
|
|
5980
|
+
* Create an HLS (HTTP Live Streaming) session for a recording.
|
|
5981
|
+
*
|
|
5982
|
+
* This method creates HLS segments on-the-fly from a recording replay stream.
|
|
5983
|
+
* HLS is required for iOS devices (Safari, Home app) which don't support
|
|
5984
|
+
* fragmented MP4 streaming well and require Range request support.
|
|
5985
|
+
*
|
|
5986
|
+
* The session writes HLS segments (.ts files) and playlist (.m3u8) to a
|
|
5987
|
+
* temporary directory. You must serve these files via HTTP to the client.
|
|
5988
|
+
*
|
|
5989
|
+
* @example
|
|
5990
|
+
* ```ts
|
|
5991
|
+
* const session = await api.createRecordingReplayHlsSession({
|
|
5992
|
+
* channel: 0,
|
|
5993
|
+
* fileName: "/mnt/sda/Mp4Record/2026-01-25/RecS03.mp4",
|
|
5994
|
+
* });
|
|
5995
|
+
*
|
|
5996
|
+
* // Serve playlist
|
|
5997
|
+
* app.get('/clip.m3u8', (req, res) => {
|
|
5998
|
+
* res.type('application/vnd.apple.mpegurl');
|
|
5999
|
+
* res.send(session.getPlaylist());
|
|
6000
|
+
* });
|
|
6001
|
+
*
|
|
6002
|
+
* // Serve segments
|
|
6003
|
+
* app.get('/segment/:name', (req, res) => {
|
|
6004
|
+
* const data = session.getSegment(req.params.name);
|
|
6005
|
+
* if (data) {
|
|
6006
|
+
* res.type('video/mp2t');
|
|
6007
|
+
* res.send(data);
|
|
6008
|
+
* } else {
|
|
6009
|
+
* res.status(404).end();
|
|
6010
|
+
* }
|
|
6011
|
+
* });
|
|
6012
|
+
*
|
|
6013
|
+
* // Cleanup when done
|
|
6014
|
+
* await session.stop();
|
|
6015
|
+
* ```
|
|
6016
|
+
*/
|
|
6017
|
+
createRecordingReplayHlsSession(params: {
|
|
6018
|
+
/** Channel number (0-based). Required. */
|
|
6019
|
+
channel: number;
|
|
6020
|
+
/** Full path to the recording file. Required. */
|
|
6021
|
+
fileName: string;
|
|
6022
|
+
/**
|
|
6023
|
+
* Force NVR mode (uses id-based XML with UID) or standalone mode (name-based XML).
|
|
6024
|
+
* If not specified, the library will detect based on device channel count.
|
|
6025
|
+
*/
|
|
6026
|
+
isNvr?: boolean;
|
|
6027
|
+
/** Optional logger override. If not provided, uses the API's logger. */
|
|
6028
|
+
logger?: Logger;
|
|
6029
|
+
/**
|
|
6030
|
+
* External identifier for the dedicated socket session.
|
|
6031
|
+
* When provided, a dedicated BaichuanClient is created/reused for this deviceId.
|
|
6032
|
+
*/
|
|
6033
|
+
deviceId?: string;
|
|
6034
|
+
/**
|
|
6035
|
+
* Transcode H.265/HEVC to H.264/AVC for compatibility.
|
|
6036
|
+
* Default: false (passthrough).
|
|
6037
|
+
*/
|
|
6038
|
+
transcodeH265ToH264?: boolean;
|
|
6039
|
+
/**
|
|
6040
|
+
* HLS segment duration in seconds. Default: 4.
|
|
6041
|
+
*/
|
|
6042
|
+
hlsSegmentDuration?: number;
|
|
6043
|
+
}): Promise<{
|
|
6044
|
+
/**
|
|
6045
|
+
* Get the current HLS playlist content (.m3u8).
|
|
6046
|
+
* Call this to serve the playlist to the client.
|
|
6047
|
+
*/
|
|
6048
|
+
getPlaylist: () => string;
|
|
6049
|
+
/**
|
|
6050
|
+
* Get a segment file by name.
|
|
6051
|
+
* Returns undefined if the segment doesn't exist yet.
|
|
6052
|
+
*/
|
|
6053
|
+
getSegment: (name: string) => Buffer | undefined;
|
|
6054
|
+
/**
|
|
6055
|
+
* List all available segment names.
|
|
6056
|
+
*/
|
|
6057
|
+
listSegments: () => string[];
|
|
6058
|
+
/**
|
|
6059
|
+
* Wait for the HLS session to be ready (at least one segment available).
|
|
6060
|
+
*/
|
|
6061
|
+
waitForReady: () => Promise<void>;
|
|
6062
|
+
/**
|
|
6063
|
+
* Stop the HLS session and cleanup.
|
|
6064
|
+
*/
|
|
6065
|
+
stop: () => Promise<void>;
|
|
6066
|
+
/**
|
|
6067
|
+
* Path to the temporary directory containing HLS files.
|
|
6068
|
+
*/
|
|
6069
|
+
tempDir: string;
|
|
6070
|
+
}>;
|
|
5954
6071
|
/**
|
|
5955
6072
|
* List recordings from a standalone camera.
|
|
5956
6073
|
*
|
|
@@ -6176,6 +6293,178 @@ declare class ReolinkBaichuanApi {
|
|
|
6176
6293
|
standaloneGetSnapshot(): Promise<Buffer>;
|
|
6177
6294
|
}
|
|
6178
6295
|
|
|
6296
|
+
/**
|
|
6297
|
+
* HLS Session Manager for Reolink recording replay.
|
|
6298
|
+
*
|
|
6299
|
+
* This module provides a complete HLS streaming solution that manages:
|
|
6300
|
+
* - Session caching with TTL
|
|
6301
|
+
* - Automatic cleanup of expired sessions
|
|
6302
|
+
* - Playlist URL rewriting for absolute paths
|
|
6303
|
+
* - HTTP response generation for both playlists and segments
|
|
6304
|
+
*
|
|
6305
|
+
* Usage:
|
|
6306
|
+
* ```ts
|
|
6307
|
+
* const manager = new HlsSessionManager(api, { logger });
|
|
6308
|
+
*
|
|
6309
|
+
* // In your HTTP handler:
|
|
6310
|
+
* const result = await manager.handleRequest({
|
|
6311
|
+
* sessionKey: `${deviceId}:${fileId}`,
|
|
6312
|
+
* hlsPath: request.query.hls || "playlist.m3u8",
|
|
6313
|
+
* requestUrl: request.url,
|
|
6314
|
+
* createSession: async () => ({
|
|
6315
|
+
* channel: 0,
|
|
6316
|
+
* fileName: fileId,
|
|
6317
|
+
* isNvr: false,
|
|
6318
|
+
* }),
|
|
6319
|
+
* });
|
|
6320
|
+
*
|
|
6321
|
+
* response.send(result.body, {
|
|
6322
|
+
* code: result.statusCode,
|
|
6323
|
+
* headers: result.headers,
|
|
6324
|
+
* });
|
|
6325
|
+
* ```
|
|
6326
|
+
*/
|
|
6327
|
+
|
|
6328
|
+
/**
|
|
6329
|
+
* HLS session returned by createRecordingReplayHlsSession.
|
|
6330
|
+
*/
|
|
6331
|
+
interface HlsSession {
|
|
6332
|
+
/** Get the current HLS playlist content (.m3u8) */
|
|
6333
|
+
getPlaylist: () => string;
|
|
6334
|
+
/** Get a segment file by name */
|
|
6335
|
+
getSegment: (name: string) => Buffer | undefined;
|
|
6336
|
+
/** List all available segment names */
|
|
6337
|
+
listSegments: () => string[];
|
|
6338
|
+
/** Wait for the HLS session to be ready */
|
|
6339
|
+
waitForReady: () => Promise<void>;
|
|
6340
|
+
/** Stop the HLS session and cleanup */
|
|
6341
|
+
stop: () => Promise<void>;
|
|
6342
|
+
/** Path to the temporary directory */
|
|
6343
|
+
tempDir: string;
|
|
6344
|
+
}
|
|
6345
|
+
/**
|
|
6346
|
+
* Parameters for creating a new HLS session.
|
|
6347
|
+
*/
|
|
6348
|
+
interface HlsSessionParams {
|
|
6349
|
+
/** Channel number */
|
|
6350
|
+
channel: number;
|
|
6351
|
+
/** Recording file name/path */
|
|
6352
|
+
fileName: string;
|
|
6353
|
+
/** Whether this is an NVR recording */
|
|
6354
|
+
isNvr?: boolean;
|
|
6355
|
+
/** External device ID for dedicated socket */
|
|
6356
|
+
deviceId?: string;
|
|
6357
|
+
/** Transcode H.265 to H.264 */
|
|
6358
|
+
transcodeH265ToH264?: boolean;
|
|
6359
|
+
/** HLS segment duration in seconds */
|
|
6360
|
+
hlsSegmentDuration?: number;
|
|
6361
|
+
}
|
|
6362
|
+
/**
|
|
6363
|
+
* HTTP response result.
|
|
6364
|
+
*/
|
|
6365
|
+
interface HlsHttpResponse {
|
|
6366
|
+
/** HTTP status code */
|
|
6367
|
+
statusCode: number;
|
|
6368
|
+
/** Response headers */
|
|
6369
|
+
headers: Record<string, string>;
|
|
6370
|
+
/** Response body (string for playlist, Buffer for segment) */
|
|
6371
|
+
body: string | Buffer;
|
|
6372
|
+
}
|
|
6373
|
+
/**
|
|
6374
|
+
* Options for HlsSessionManager constructor.
|
|
6375
|
+
*/
|
|
6376
|
+
interface HlsSessionManagerOptions {
|
|
6377
|
+
/** Logger instance */
|
|
6378
|
+
logger?: Logger$1;
|
|
6379
|
+
/** Session TTL in milliseconds (default: 5 minutes) */
|
|
6380
|
+
sessionTtlMs?: number;
|
|
6381
|
+
/** Cleanup interval in milliseconds (default: 30 seconds) */
|
|
6382
|
+
cleanupIntervalMs?: number;
|
|
6383
|
+
}
|
|
6384
|
+
/**
|
|
6385
|
+
* Manages HLS sessions with caching, TTL, and HTTP response generation.
|
|
6386
|
+
*/
|
|
6387
|
+
declare class HlsSessionManager {
|
|
6388
|
+
private readonly api;
|
|
6389
|
+
private sessions;
|
|
6390
|
+
private readonly logger;
|
|
6391
|
+
private readonly sessionTtlMs;
|
|
6392
|
+
private cleanupTimer;
|
|
6393
|
+
private creationLocks;
|
|
6394
|
+
constructor(api: ReolinkBaichuanApi, options?: HlsSessionManagerOptions);
|
|
6395
|
+
/**
|
|
6396
|
+
* Handle an HLS request and return the HTTP response.
|
|
6397
|
+
*
|
|
6398
|
+
* @param params - Request parameters
|
|
6399
|
+
* @returns HTTP response ready to be sent
|
|
6400
|
+
*/
|
|
6401
|
+
handleRequest(params: {
|
|
6402
|
+
/** Unique session key (e.g., `${deviceId}:${fileId}`) */
|
|
6403
|
+
sessionKey: string;
|
|
6404
|
+
/** HLS path: "playlist.m3u8" or segment name like "segment_001.ts" */
|
|
6405
|
+
hlsPath: string;
|
|
6406
|
+
/** Full request URL for rewriting playlist URLs */
|
|
6407
|
+
requestUrl: string;
|
|
6408
|
+
/** Function to create session params if session doesn't exist */
|
|
6409
|
+
createSession: () => Promise<HlsSessionParams> | HlsSessionParams;
|
|
6410
|
+
/**
|
|
6411
|
+
* Optional prefix used to ensure only one active HLS session per logical client.
|
|
6412
|
+
* When a new session is created, any other sessions whose keys start with this
|
|
6413
|
+
* prefix will be stopped. This prevents replay/ffmpeg queue starvation when
|
|
6414
|
+
* clients quickly switch clips.
|
|
6415
|
+
*/
|
|
6416
|
+
exclusiveKeyPrefix?: string;
|
|
6417
|
+
}): Promise<HlsHttpResponse>;
|
|
6418
|
+
private withCreationLock;
|
|
6419
|
+
/**
|
|
6420
|
+
* Check if a session exists for the given key.
|
|
6421
|
+
*/
|
|
6422
|
+
hasSession(sessionKey: string): boolean;
|
|
6423
|
+
/**
|
|
6424
|
+
* Stop a specific session.
|
|
6425
|
+
*/
|
|
6426
|
+
stopSession(sessionKey: string): Promise<void>;
|
|
6427
|
+
/**
|
|
6428
|
+
* Stop all sessions and cleanup.
|
|
6429
|
+
*/
|
|
6430
|
+
stopAll(): Promise<void>;
|
|
6431
|
+
/**
|
|
6432
|
+
* Get the number of active sessions.
|
|
6433
|
+
*/
|
|
6434
|
+
get sessionCount(): number;
|
|
6435
|
+
/**
|
|
6436
|
+
* Serve the HLS playlist with rewritten segment URLs.
|
|
6437
|
+
*/
|
|
6438
|
+
private servePlaylist;
|
|
6439
|
+
/**
|
|
6440
|
+
* Serve an HLS segment.
|
|
6441
|
+
*/
|
|
6442
|
+
private serveSegment;
|
|
6443
|
+
/**
|
|
6444
|
+
* Cleanup expired sessions.
|
|
6445
|
+
*/
|
|
6446
|
+
private cleanupExpiredSessions;
|
|
6447
|
+
private stopOtherSessionsWithPrefix;
|
|
6448
|
+
}
|
|
6449
|
+
/**
|
|
6450
|
+
* Detect if the request is from an iOS device that needs HLS.
|
|
6451
|
+
*
|
|
6452
|
+
* @param userAgent - The User-Agent header from the request
|
|
6453
|
+
* @returns Object with iOS detection results
|
|
6454
|
+
*/
|
|
6455
|
+
declare function detectIosClient(userAgent: string | undefined): {
|
|
6456
|
+
isIos: boolean;
|
|
6457
|
+
isIosInstalledApp: boolean;
|
|
6458
|
+
needsHls: boolean;
|
|
6459
|
+
};
|
|
6460
|
+
/**
|
|
6461
|
+
* Build the HLS redirect URL from the original request URL.
|
|
6462
|
+
*
|
|
6463
|
+
* @param originalUrl - The original request URL
|
|
6464
|
+
* @returns The URL with ?hls=playlist.m3u8 appended
|
|
6465
|
+
*/
|
|
6466
|
+
declare function buildHlsRedirectUrl(originalUrl: string): string;
|
|
6467
|
+
|
|
6179
6468
|
interface DiscoveredDevice {
|
|
6180
6469
|
/** Device IP address */
|
|
6181
6470
|
host: string;
|
|
@@ -7273,8 +7562,16 @@ declare class BaichuanWebRTCServer extends EventEmitter {
|
|
|
7273
7562
|
private pumpFramesToWebRTC;
|
|
7274
7563
|
/**
|
|
7275
7564
|
* Send H.264 frame via RTP media track
|
|
7565
|
+
* Returns the number of RTP packets sent
|
|
7276
7566
|
*/
|
|
7277
7567
|
private sendH264Frame;
|
|
7568
|
+
/**
|
|
7569
|
+
* Send video frame via DataChannel (works for both H.264 and H.265)
|
|
7570
|
+
* Format: 12-byte header + Annex-B data
|
|
7571
|
+
* Header: [frameNum (4)] [timestamp (4)] [flags (1)] [keyframe (1)] [reserved (2)]
|
|
7572
|
+
* Flags: 0x01 = H.265, 0x02 = H.264
|
|
7573
|
+
*/
|
|
7574
|
+
private sendVideoFrameViaDataChannel;
|
|
7278
7575
|
/**
|
|
7279
7576
|
* Send H.265 frame via DataChannel
|
|
7280
7577
|
* Format: 12-byte header + Annex-B data
|
|
@@ -7296,6 +7593,123 @@ declare class BaichuanWebRTCServer extends EventEmitter {
|
|
|
7296
7593
|
private log;
|
|
7297
7594
|
}
|
|
7298
7595
|
|
|
7596
|
+
/**
|
|
7597
|
+
* Baichuan HLS Server - HLS streaming from Baichuan cameras
|
|
7598
|
+
*
|
|
7599
|
+
* Provides HLS (HTTP Live Streaming) output from Baichuan native video streams.
|
|
7600
|
+
* Uses ffmpeg to transcode H.265 to H.264 for browser compatibility, or copies H.264 directly.
|
|
7601
|
+
*
|
|
7602
|
+
* Architecture:
|
|
7603
|
+
* - Camera → Baichuan native stream → H.264/H.265 frames → ffmpeg → HLS segments
|
|
7604
|
+
*
|
|
7605
|
+
* Usage:
|
|
7606
|
+
* ```typescript
|
|
7607
|
+
* const hls = new BaichuanHlsServer({
|
|
7608
|
+
* api: reolinkApi,
|
|
7609
|
+
* channel: 0,
|
|
7610
|
+
* profile: "main",
|
|
7611
|
+
* outputDir: "/tmp/hls-output",
|
|
7612
|
+
* });
|
|
7613
|
+
*
|
|
7614
|
+
* // Start streaming
|
|
7615
|
+
* await hls.start();
|
|
7616
|
+
*
|
|
7617
|
+
* // Get playlist path
|
|
7618
|
+
* const playlistPath = hls.getPlaylistPath();
|
|
7619
|
+
*
|
|
7620
|
+
* // Stop streaming
|
|
7621
|
+
* await hls.stop();
|
|
7622
|
+
* ```
|
|
7623
|
+
*/
|
|
7624
|
+
|
|
7625
|
+
type HlsCodec = "h264" | "h265";
|
|
7626
|
+
interface BaichuanHlsServerOptions {
|
|
7627
|
+
/** API instance (required) */
|
|
7628
|
+
api: ReolinkBaichuanApi;
|
|
7629
|
+
/** Channel number (required) */
|
|
7630
|
+
channel: number;
|
|
7631
|
+
/** Stream profile (required) */
|
|
7632
|
+
profile: StreamProfile;
|
|
7633
|
+
/** Native-only: TrackMix tele/autotrack variants */
|
|
7634
|
+
variant?: NativeVideoStreamVariant;
|
|
7635
|
+
/** Output directory for HLS segments. If not provided, a temp directory will be created. */
|
|
7636
|
+
outputDir?: string;
|
|
7637
|
+
/** HLS segment duration in seconds (default: 2) */
|
|
7638
|
+
segmentDuration?: number;
|
|
7639
|
+
/** Number of segments to keep in playlist (default: 5) */
|
|
7640
|
+
playlistSize?: number;
|
|
7641
|
+
/** ffmpeg binary path (default: "ffmpeg") */
|
|
7642
|
+
ffmpegPath?: string;
|
|
7643
|
+
/** Logger callback */
|
|
7644
|
+
logger?: (level: "debug" | "info" | "warn" | "error", message: string) => void;
|
|
7645
|
+
}
|
|
7646
|
+
interface HlsServerStatus {
|
|
7647
|
+
state: "idle" | "starting" | "running" | "stopping" | "stopped" | "error";
|
|
7648
|
+
codec: HlsCodec | null;
|
|
7649
|
+
framesReceived: number;
|
|
7650
|
+
ffmpegRunning: boolean;
|
|
7651
|
+
playlistPath: string | null;
|
|
7652
|
+
outputDir: string | null;
|
|
7653
|
+
startedAt: Date | null;
|
|
7654
|
+
error: string | null;
|
|
7655
|
+
}
|
|
7656
|
+
declare class BaichuanHlsServer extends EventEmitter {
|
|
7657
|
+
private readonly api;
|
|
7658
|
+
private readonly channel;
|
|
7659
|
+
private readonly profile;
|
|
7660
|
+
private readonly variant;
|
|
7661
|
+
private readonly segmentDuration;
|
|
7662
|
+
private readonly playlistSize;
|
|
7663
|
+
private readonly ffmpegPath;
|
|
7664
|
+
private readonly log;
|
|
7665
|
+
private outputDir;
|
|
7666
|
+
private createdTempDir;
|
|
7667
|
+
private playlistPath;
|
|
7668
|
+
private segmentPattern;
|
|
7669
|
+
private state;
|
|
7670
|
+
private codec;
|
|
7671
|
+
private framesReceived;
|
|
7672
|
+
private ffmpeg;
|
|
7673
|
+
private nativeStream;
|
|
7674
|
+
private pumpPromise;
|
|
7675
|
+
private startedAt;
|
|
7676
|
+
private lastError;
|
|
7677
|
+
constructor(options: BaichuanHlsServerOptions);
|
|
7678
|
+
/**
|
|
7679
|
+
* Start HLS streaming
|
|
7680
|
+
*/
|
|
7681
|
+
start(): Promise<void>;
|
|
7682
|
+
/**
|
|
7683
|
+
* Stop HLS streaming
|
|
7684
|
+
*/
|
|
7685
|
+
stop(): Promise<void>;
|
|
7686
|
+
/**
|
|
7687
|
+
* Get current status
|
|
7688
|
+
*/
|
|
7689
|
+
getStatus(): HlsServerStatus;
|
|
7690
|
+
/**
|
|
7691
|
+
* Get playlist file path
|
|
7692
|
+
*/
|
|
7693
|
+
getPlaylistPath(): string | null;
|
|
7694
|
+
/**
|
|
7695
|
+
* Get output directory
|
|
7696
|
+
*/
|
|
7697
|
+
getOutputDir(): string | null;
|
|
7698
|
+
/**
|
|
7699
|
+
* Check if playlist file exists
|
|
7700
|
+
*/
|
|
7701
|
+
waitForPlaylist(timeoutMs?: number): Promise<boolean>;
|
|
7702
|
+
/**
|
|
7703
|
+
* Read an HLS asset (playlist or segment)
|
|
7704
|
+
*/
|
|
7705
|
+
readAsset(assetName: string): Promise<{
|
|
7706
|
+
data: Buffer;
|
|
7707
|
+
contentType: string;
|
|
7708
|
+
} | null>;
|
|
7709
|
+
private pumpNativeToFfmpeg;
|
|
7710
|
+
private spawnFfmpeg;
|
|
7711
|
+
}
|
|
7712
|
+
|
|
7299
7713
|
/**
|
|
7300
7714
|
* MJPEG Transformer - Converts H.264/H.265 video frames to MJPEG stream
|
|
7301
7715
|
*
|
|
@@ -7770,4 +8184,4 @@ declare class CompositeRtspServer extends EventEmitter<{
|
|
|
7770
8184
|
getClientCount(): number;
|
|
7771
8185
|
}
|
|
7772
8186
|
|
|
7773
|
-
export { type AIDetectionState, type AIEvent, type AIState, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiKey, type AiTypesCacheEntry, type AnyBuffer, type AudioAlarmParams, type AudioCfgConfig, type AudioConfig, type AudioTaskConfig, type AutoDetectInputs, type AutoDetectMode, type AutoDetectResult, AutodiscoveryClient, type AutodiscoveryClientOptions, BC_AES_IV, BC_CLASS_FILE_DOWNLOAD, BC_CLASS_LEGACY, BC_CLASS_MODERN_20, BC_CLASS_MODERN_24, BC_CLASS_MODERN_24_ALT, BC_CMD_ID_ABILITY_INFO, BC_CMD_ID_ALARM_EVENT_LIST, BC_CMD_ID_AUDIO_ALARM_PLAY, BC_CMD_ID_CHANNEL_INFO_ALL, BC_CMD_ID_CMD_123, BC_CMD_ID_CMD_209, BC_CMD_ID_CMD_265, BC_CMD_ID_CMD_440, BC_CMD_ID_COVER_PREVIEW, BC_CMD_ID_COVER_RESPONSE, BC_CMD_ID_COVER_STANDALONE_458, BC_CMD_ID_COVER_STANDALONE_459, BC_CMD_ID_COVER_STANDALONE_460, BC_CMD_ID_COVER_STANDALONE_461, BC_CMD_ID_COVER_STANDALONE_462, BC_CMD_ID_FILE_INFO_LIST_CLOSE, BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO, BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD, BC_CMD_ID_FILE_INFO_LIST_GET, BC_CMD_ID_FILE_INFO_LIST_OPEN, BC_CMD_ID_FILE_INFO_LIST_REPLAY, BC_CMD_ID_FILE_INFO_LIST_STOP, BC_CMD_ID_FIND_REC_VIDEO_CLOSE, BC_CMD_ID_FIND_REC_VIDEO_GET, BC_CMD_ID_FIND_REC_VIDEO_OPEN, BC_CMD_ID_FLOODLIGHT_STATUS_LIST, BC_CMD_ID_GET_ABILITY_SUPPORT, BC_CMD_ID_GET_ACCESS_USER_LIST, BC_CMD_ID_GET_AI_ALARM, BC_CMD_ID_GET_AI_CFG, BC_CMD_ID_GET_AI_DENOISE, BC_CMD_ID_GET_AUDIO_ALARM, BC_CMD_ID_GET_AUDIO_CFG, BC_CMD_ID_GET_AUDIO_TASK, BC_CMD_ID_GET_BATTERY_INFO, BC_CMD_ID_GET_BATTERY_INFO_LIST, BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD, BC_CMD_ID_GET_DAY_RECORDS, BC_CMD_ID_GET_EMAIL_TASK, BC_CMD_ID_GET_FTP_TASK, BC_CMD_ID_GET_HDD_INFO_LIST, BC_CMD_ID_GET_KIT_AP_CFG, BC_CMD_ID_GET_LED_STATE, BC_CMD_ID_GET_MOTION_ALARM, BC_CMD_ID_GET_ONLINE_USER_LIST, BC_CMD_ID_GET_OSD_DATETIME, BC_CMD_ID_GET_PIR_INFO, BC_CMD_ID_GET_PTZ_POSITION, BC_CMD_ID_GET_PTZ_PRESET, BC_CMD_ID_GET_RECORD, BC_CMD_ID_GET_RECORD_CFG, BC_CMD_ID_GET_REC_ENC_CFG, BC_CMD_ID_GET_SIREN_STATUS, BC_CMD_ID_GET_SLEEP_STATE, BC_CMD_ID_GET_STREAM_INFO_LIST, BC_CMD_ID_GET_SUPPORT, BC_CMD_ID_GET_SYSTEM_GENERAL, BC_CMD_ID_GET_TIMELAPSE_CFG, BC_CMD_ID_GET_VIDEO_INPUT, BC_CMD_ID_GET_WHITE_LED, BC_CMD_ID_GET_WIFI, BC_CMD_ID_GET_WIFI_SIGNAL, BC_CMD_ID_GET_ZOOM_FOCUS, BC_CMD_ID_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_SET_AI_ALARM, BC_CMD_ID_SET_AI_CFG, BC_CMD_ID_SET_AUDIO_TASK, BC_CMD_ID_SET_MOTION_ALARM, BC_CMD_ID_SET_PIR_INFO, BC_CMD_ID_SET_WHITE_LED_STATE, BC_CMD_ID_SET_WHITE_LED_TASK, BC_CMD_ID_SET_ZOOM_FOCUS, BC_CMD_ID_SUPPORT, BC_CMD_ID_TALK, BC_CMD_ID_TALK_ABILITY, BC_CMD_ID_TALK_CONFIG, BC_CMD_ID_TALK_RESET, BC_CMD_ID_UDP_KEEP_ALIVE, BC_CMD_ID_VIDEO, BC_CMD_ID_VIDEO_STOP, BC_MAGIC, BC_MAGIC_REV, BC_TCP_DEFAULT_PORT, BC_XML_KEY, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFrame, BaichuanFrameParser, type BaichuanGetOsdDatetimeResult, type BaichuanHeader, BaichuanHttpStreamServer, type BaichuanHttpStreamServerOptions, type BaichuanLedState, BaichuanMjpegServer, type BaichuanMjpegServerOptions, type BaichuanNetInfoPush, type BaichuanOsdChannelName, type BaichuanOsdDatetime, type BaichuanRecordCfg, type BaichuanRecordSchedule, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSleepState, type BaichuanSleepStatusPush, type BaichuanStreamEncodeTable, type BaichuanStreamInfo, type BaichuanStreamInfoList, type BaichuanTransport, type BaichuanVideoInputPush, BaichuanVideoStream, type BaichuanVideoStreamOptions, BaichuanWebRTCServer, type BaichuanWebRTCServerOptions, type BaichuanWifi, type BaichuanWifiSignal, type BatteryInfo, type BatteryInfoResponse, type BcMedia, type BcMediaAac, type BcMediaAdpcm, BcMediaAnnexBDecoder, type BcMediaAnnexBDecoderStats, type BcMediaAnnexBInfo, type BcMediaAudioFrame, type BcMediaAudioType, BcMediaCodec, type BcMediaIframe, type BcMediaInfoV1, type BcMediaInfoV2, type BcMediaPframe, type BcMediaType, type BcMediaVideoFrame, type BcMediaVideoType, type BcUdpDiscoveryMethod, BcUdpStream, type BcUdpStreamOptions, type CgiAbility, type CgiAbilityChn, type CgiAbilityLeaf, type CgiAiKey, type CgiAiStateValue, type CgiAudioAlarmPlayParam, type CgiBattery, type CgiChannelStatusEntry, type CgiChnTypeInfoValue, type CgiDetectionState, type CgiDevInfo, type CgiDeviceInfoEntries, type CgiEnc, type CgiEncStream, type CgiEncValue, type CgiGetAbilityResponse, type CgiGetAbilityValue, type CgiGetAiStateResponse, type CgiGetChannelstatusResponse, type CgiGetChannelstatusValue, type CgiGetChnTypeInfoResponse, type CgiGetDevInfoResponse, type CgiGetDevInfoValue, type CgiGetEncResponse, type CgiGetOsdValue, type CgiGetRtspUrlResponse, type CgiGetRtspUrlValue, type CgiGetVideoclipsParams, type CgiNetPort, type CgiOsd, type CgiPirInfo, type CgiPtzPreset, type CgiSetOsdParam, type CgiSetPirInfoParam, type CgiSetWhiteLedParam, type CgiWhiteLed, type ChannelPushCacheEntry, type ChannelPushDataEntry, type ChannelRecordingFile, type ChannelStreamMetadata, type CollectNvrDiagnosticsOptions, CompositeRtspServer, type CompositeRtspServerOptions, CompositeStream, type CompositeStreamOptions, type CompositeStreamPipOptions, DUAL_LENS_DUAL_MOTION_MODELS, DUAL_LENS_MODELS, DUAL_LENS_SINGLE_MOTION_MODELS, type DayNightThresholdConfig, type DebugConfig, type DebugOptions, type DeviceAbilities, type DeviceCapabilities, type DeviceCapabilitiesCacheEntry, type DeviceCapabilitiesDebugInfo, type DeviceCapabilitiesResult, type DeviceInfoResponse, type DeviceInputData, type DeviceObjectType, type DeviceStatusResponse, type DeviceSupportFlags, type DeviceType, type DiagnosticsCollectorResult, type DiagnosticsStreamKind, type DiscoveredDevice, type DiscoveryOptions, type DownloadRecordingParams, type DualLensChannelAnalysis, type DualLensChannelInfo, type EmailTaskConfig, type EncryptionProtocol, type Events, type EventsResponse, type FloodlightTaskConfig, type FtpTaskConfig, type GetRecordingVideoResult, type GetRecordingVideoStats, type GetVideoclipsParams, type GetVodUrlParams, H264RtpDepacketizer, H265RtpDepacketizer, type HddInfoListConfig, Intercom, type IntercomOptions, type JsonObject, type JsonPrimitive, type JsonValue, type LastSleepProbe, type LogLevel, type Logger, type LoggerCallback, type LoginResponseValue, type MaxEncryption, type MediaStream, type MjpegFrame, MjpegTransformer, type MjpegTransformerOptions, type MotionAlarmConfig, type MotionEvent, NVR_HUB_EXACT_TYPES, NVR_HUB_MODEL_PATTERNS, type NativeVideoStreamVariant, type NvrChannelsSummaryCacheEntry, type OnlineUserListConfig, type OsdChannel, type OsdConfig, type OsdTime, type ParsedRecordingFileName, type PipPosition, type PirConfig, type PirState, type PlaybackSnapshotStreamInfo, type PtzCommand, type PtzPosition, type PtzPreset, type RecEncConfig, type RecordingAudioCodec, type RecordingDetectionClass, type RecordingDevType, type RecordingFile, type RecordingPlaybackUrls, type RecordingStreamType, type RecordingVideoCodec, type RecordingVodFlags, type RecordingVodStreamHint, type RecordingsCacheEntry, type RecordingsQueueItem, type ReolinkAiNotification, ReolinkBaichuanApi, type ReolinkBaichuanChannelIdentity, type ReolinkBaichuanChannelInfo, type ReolinkBaichuanDeviceSummary, type ReolinkBaichuanNetworkInfo, type ReolinkBaichuanPorts, ReolinkCgiApi, type ReolinkCmdRequest, type ReolinkCmdResponse, type ReolinkCmdResponseExt, type ReolinkDayNightNotification, type ReolinkDeviceInfo, type ReolinkDeviceInfoTag, type ReolinkEvent, ReolinkHttpClient, type ReolinkHttpClientOptions, type ReolinkJson, type ReolinkMotionNotification, type ReolinkNvrChannelInfo, type ReolinkNvrDeviceGroupSummary, type ReolinkNvrDeviceGroupsResult, type ReolinkSimpleEvent, type ReolinkSimpleEventType, type ReolinkSupportedStream, type ReolinkVideoStreamOptionsResult, type ReolinkVisitorNotification, type ReplayHttpServer, type ReplayHttpServerOptions, type ResponseMediaStreamOptions, type Rfc4571ApiFactoryContext, type Rfc4571Client, Rfc4571Muxer, type Rfc4571ReplayServer, type Rfc4571ReplayServerOptions, type Rfc4571TcpServer, type Rfc4571TcpServerOptions, type RtpPacketizationOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type SirenState, type SirenStatusConfig, type SleepState, type SleepStatus, type StreamMetadata, type StreamProfile, type StreamSamplingOptions, type StreamSamplingSelection, type SupportConfig, type SupportInfo, type SupportItem, type SystemGeneralConfig, type TalkAbility$1 as TalkAbility, type TalkAudioConfig, type TalkConfig, type TalkSession$1 as TalkSession, type TalkSessionInfo, type TimelapseCfgConfig, type TwoWayAudioConfig, type VideoCodec, type VideoInputConfig, type VideoParamSets, type VideoStreamOptions, type VideoStreamOptionsCacheEntry, type VideoType, type VideoclipClientInfo, type VideoclipModeDecision, type VideoclipThumbnailResult, type VideoclipTranscodeMode, type VodFile, type VodSearchResponse, type VodSearchResult, type VodSearchStatus, type WakeUpOptions, type WebRTCAnswer, type WebRTCIceCandidate, type WebRTCOffer, type WebRTCSessionInfo, type WhiteLedConfig, type WhiteLedState, type ZoomFocusStatus, type ZoomFocusTriplet, abilitiesHasAny, aesDecrypt, aesEncrypt, asLogger, autoDetectDeviceType, bcDecrypt, bcEncrypt, bcHeaderHasPayloadOffset, buildAacAudioSpecificConfigHex, buildAbilityInfoExtensionXml, buildBinaryExtensionXml, buildChannelExtensionXml, buildFloodlightManualXml, buildLoginXml, buildPreviewStopXml, buildPreviewStopXmlV11, buildPreviewXml, buildPreviewXmlV11, buildPtzControlXml, buildPtzPresetXml, buildPtzPresetXmlV2, buildRfc4571Sdp, buildRtspPath, buildRtspUrl, buildSirenManualXml, buildSirenTimesXml, buildStartZoomFocusXml, buildWhiteLedStateXml, collectCgiDiagnostics, collectMultifocalDiagnostics, collectNativeDiagnostics, collectNvrDiagnostics, computeDeviceCapabilities, convertToAnnexB as convertH265ToAnnexB, convertToAnnexB$1 as convertToAnnexB, convertToLengthPrefixed, createBaichuanEndpointsServer, createDebugGateLogger, createDiagnosticsBundle, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideVideoclipTranscodeMode, decodeHeader, deriveAesKey, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaHttpScan, discoverViaUdpBroadcast, discoverViaUdpDirect, encodeHeader, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, getConstructedVideoStreamOptions, getGlobalLogger, getH265NalType, getMjpegContentType, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isTcpFailureThatShouldFallbackToUdp, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, maskUid, md5HexUpper, md5StrModern, normalizeUid, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseSupportXml, printNvrDiagnostics, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, testChannelStreams, xmlEscape, zipDirectory };
|
|
8187
|
+
export { type AIDetectionState, type AIEvent, type AIState, type AbilityInfo, type AccessUserListConfig, AesStreamDecryptor, type AiAlarmConfig, type AiConfig, type AiDenoiseConfig, type AiKey, type AiTypesCacheEntry, type AnyBuffer, type AudioAlarmParams, type AudioCfgConfig, type AudioConfig, type AudioTaskConfig, type AutoDetectInputs, type AutoDetectMode, type AutoDetectResult, AutodiscoveryClient, type AutodiscoveryClientOptions, BC_AES_IV, BC_CLASS_FILE_DOWNLOAD, BC_CLASS_LEGACY, BC_CLASS_MODERN_20, BC_CLASS_MODERN_24, BC_CLASS_MODERN_24_ALT, BC_CMD_ID_ABILITY_INFO, BC_CMD_ID_ALARM_EVENT_LIST, BC_CMD_ID_AUDIO_ALARM_PLAY, BC_CMD_ID_CHANNEL_INFO_ALL, BC_CMD_ID_CMD_123, BC_CMD_ID_CMD_209, BC_CMD_ID_CMD_265, BC_CMD_ID_CMD_440, BC_CMD_ID_COVER_PREVIEW, BC_CMD_ID_COVER_RESPONSE, BC_CMD_ID_COVER_STANDALONE_458, BC_CMD_ID_COVER_STANDALONE_459, BC_CMD_ID_COVER_STANDALONE_460, BC_CMD_ID_COVER_STANDALONE_461, BC_CMD_ID_COVER_STANDALONE_462, BC_CMD_ID_FILE_INFO_LIST_CLOSE, BC_CMD_ID_FILE_INFO_LIST_DL_VIDEO, BC_CMD_ID_FILE_INFO_LIST_DOWNLOAD, BC_CMD_ID_FILE_INFO_LIST_GET, BC_CMD_ID_FILE_INFO_LIST_OPEN, BC_CMD_ID_FILE_INFO_LIST_REPLAY, BC_CMD_ID_FILE_INFO_LIST_STOP, BC_CMD_ID_FIND_REC_VIDEO_CLOSE, BC_CMD_ID_FIND_REC_VIDEO_GET, BC_CMD_ID_FIND_REC_VIDEO_OPEN, BC_CMD_ID_FLOODLIGHT_STATUS_LIST, BC_CMD_ID_GET_ABILITY_SUPPORT, BC_CMD_ID_GET_ACCESS_USER_LIST, BC_CMD_ID_GET_AI_ALARM, BC_CMD_ID_GET_AI_CFG, BC_CMD_ID_GET_AI_DENOISE, BC_CMD_ID_GET_AUDIO_ALARM, BC_CMD_ID_GET_AUDIO_CFG, BC_CMD_ID_GET_AUDIO_TASK, BC_CMD_ID_GET_BATTERY_INFO, BC_CMD_ID_GET_BATTERY_INFO_LIST, BC_CMD_ID_GET_DAY_NIGHT_THRESHOLD, BC_CMD_ID_GET_DAY_RECORDS, BC_CMD_ID_GET_EMAIL_TASK, BC_CMD_ID_GET_FTP_TASK, BC_CMD_ID_GET_HDD_INFO_LIST, BC_CMD_ID_GET_KIT_AP_CFG, BC_CMD_ID_GET_LED_STATE, BC_CMD_ID_GET_MOTION_ALARM, BC_CMD_ID_GET_ONLINE_USER_LIST, BC_CMD_ID_GET_OSD_DATETIME, BC_CMD_ID_GET_PIR_INFO, BC_CMD_ID_GET_PTZ_POSITION, BC_CMD_ID_GET_PTZ_PRESET, BC_CMD_ID_GET_RECORD, BC_CMD_ID_GET_RECORD_CFG, BC_CMD_ID_GET_REC_ENC_CFG, BC_CMD_ID_GET_SIREN_STATUS, BC_CMD_ID_GET_SLEEP_STATE, BC_CMD_ID_GET_STREAM_INFO_LIST, BC_CMD_ID_GET_SUPPORT, BC_CMD_ID_GET_SYSTEM_GENERAL, BC_CMD_ID_GET_TIMELAPSE_CFG, BC_CMD_ID_GET_VIDEO_INPUT, BC_CMD_ID_GET_WHITE_LED, BC_CMD_ID_GET_WIFI, BC_CMD_ID_GET_WIFI_SIGNAL, BC_CMD_ID_GET_ZOOM_FOCUS, BC_CMD_ID_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_SET_AI_ALARM, BC_CMD_ID_SET_AI_CFG, BC_CMD_ID_SET_AUDIO_TASK, BC_CMD_ID_SET_MOTION_ALARM, BC_CMD_ID_SET_PIR_INFO, BC_CMD_ID_SET_WHITE_LED_STATE, BC_CMD_ID_SET_WHITE_LED_TASK, BC_CMD_ID_SET_ZOOM_FOCUS, BC_CMD_ID_SUPPORT, BC_CMD_ID_TALK, BC_CMD_ID_TALK_ABILITY, BC_CMD_ID_TALK_CONFIG, BC_CMD_ID_TALK_RESET, BC_CMD_ID_UDP_KEEP_ALIVE, BC_CMD_ID_VIDEO, BC_CMD_ID_VIDEO_STOP, BC_MAGIC, BC_MAGIC_REV, BC_TCP_DEFAULT_PORT, BC_XML_KEY, type BaichuanCachedPush, BaichuanClient, type BaichuanClientOptions, type BaichuanCoordinatePointListPush, type BaichuanDingdongListPush, type BaichuanEndpointsServerOptions, BaichuanEventEmitter, type BaichuanFrame, BaichuanFrameParser, type BaichuanGetOsdDatetimeResult, type BaichuanHeader, BaichuanHlsServer, type BaichuanHlsServerOptions, BaichuanHttpStreamServer, type BaichuanHttpStreamServerOptions, type BaichuanLedState, BaichuanMjpegServer, type BaichuanMjpegServerOptions, type BaichuanNetInfoPush, type BaichuanOsdChannelName, type BaichuanOsdDatetime, type BaichuanRecordCfg, type BaichuanRecordSchedule, BaichuanRtspServer, type BaichuanRtspServerOptions, type BaichuanSerialPush, type BaichuanSettingsPushCacheEntry, type BaichuanSleepState, type BaichuanSleepStatusPush, type BaichuanStreamEncodeTable, type BaichuanStreamInfo, type BaichuanStreamInfoList, type BaichuanTransport, type BaichuanVideoInputPush, BaichuanVideoStream, type BaichuanVideoStreamOptions, BaichuanWebRTCServer, type BaichuanWebRTCServerOptions, type BaichuanWifi, type BaichuanWifiSignal, type BatteryInfo, type BatteryInfoResponse, type BcMedia, type BcMediaAac, type BcMediaAdpcm, BcMediaAnnexBDecoder, type BcMediaAnnexBDecoderStats, type BcMediaAnnexBInfo, type BcMediaAudioFrame, type BcMediaAudioType, BcMediaCodec, type BcMediaIframe, type BcMediaInfoV1, type BcMediaInfoV2, type BcMediaPframe, type BcMediaType, type BcMediaVideoFrame, type BcMediaVideoType, type BcUdpDiscoveryMethod, BcUdpStream, type BcUdpStreamOptions, type CgiAbility, type CgiAbilityChn, type CgiAbilityLeaf, type CgiAiKey, type CgiAiStateValue, type CgiAudioAlarmPlayParam, type CgiBattery, type CgiChannelStatusEntry, type CgiChnTypeInfoValue, type CgiDetectionState, type CgiDevInfo, type CgiDeviceInfoEntries, type CgiEnc, type CgiEncStream, type CgiEncValue, type CgiGetAbilityResponse, type CgiGetAbilityValue, type CgiGetAiStateResponse, type CgiGetChannelstatusResponse, type CgiGetChannelstatusValue, type CgiGetChnTypeInfoResponse, type CgiGetDevInfoResponse, type CgiGetDevInfoValue, type CgiGetEncResponse, type CgiGetOsdValue, type CgiGetRtspUrlResponse, type CgiGetRtspUrlValue, type CgiGetVideoclipsParams, type CgiNetPort, type CgiOsd, type CgiPirInfo, type CgiPtzPreset, type CgiSetOsdParam, type CgiSetPirInfoParam, type CgiSetWhiteLedParam, type CgiWhiteLed, type ChannelPushCacheEntry, type ChannelPushDataEntry, type ChannelRecordingFile, type ChannelStreamMetadata, type CollectNvrDiagnosticsOptions, CompositeRtspServer, type CompositeRtspServerOptions, CompositeStream, type CompositeStreamOptions, type CompositeStreamPipOptions, DUAL_LENS_DUAL_MOTION_MODELS, DUAL_LENS_MODELS, DUAL_LENS_SINGLE_MOTION_MODELS, type DayNightThresholdConfig, type DebugConfig, type DebugOptions, type DeviceAbilities, type DeviceCapabilities, type DeviceCapabilitiesCacheEntry, type DeviceCapabilitiesDebugInfo, type DeviceCapabilitiesResult, type DeviceInfoResponse, type DeviceInputData, type DeviceObjectType, type DeviceStatusResponse, type DeviceSupportFlags, type DeviceType, type DiagnosticsCollectorResult, type DiagnosticsStreamKind, type DiscoveredDevice, type DiscoveryOptions, type DownloadRecordingParams, type DualLensChannelAnalysis, type DualLensChannelInfo, type EmailTaskConfig, type EncryptionProtocol, type Events, type EventsResponse, type FloodlightTaskConfig, type FtpTaskConfig, type GetRecordingVideoResult, type GetRecordingVideoStats, type GetVideoclipsParams, type GetVodUrlParams, H264RtpDepacketizer, H265RtpDepacketizer, type HddInfoListConfig, type HlsCodec, type HlsHttpResponse, type HlsServerStatus, type HlsSession, HlsSessionManager, type HlsSessionManagerOptions, type HlsSessionParams, Intercom, type IntercomOptions, type JsonObject, type JsonPrimitive, type JsonValue, type LastSleepProbe, type LogLevel, type Logger, type LoggerCallback, type LoginResponseValue, type MaxEncryption, type MediaStream, type MjpegFrame, MjpegTransformer, type MjpegTransformerOptions, type MotionAlarmConfig, type MotionEvent, NVR_HUB_EXACT_TYPES, NVR_HUB_MODEL_PATTERNS, type NativeVideoStreamVariant, type NvrChannelsSummaryCacheEntry, type OnlineUserListConfig, type OsdChannel, type OsdConfig, type OsdTime, type ParsedRecordingFileName, type PipPosition, type PirConfig, type PirState, type PlaybackSnapshotStreamInfo, type PtzCommand, type PtzPosition, type PtzPreset, type RecEncConfig, type RecordingAudioCodec, type RecordingDetectionClass, type RecordingDevType, type RecordingFile, type RecordingPlaybackUrls, type RecordingStreamType, type RecordingVideoCodec, type RecordingVodFlags, type RecordingVodStreamHint, type RecordingsCacheEntry, type RecordingsQueueItem, type ReolinkAiNotification, ReolinkBaichuanApi, type ReolinkBaichuanChannelIdentity, type ReolinkBaichuanChannelInfo, type ReolinkBaichuanDeviceSummary, type ReolinkBaichuanNetworkInfo, type ReolinkBaichuanPorts, ReolinkCgiApi, type ReolinkCmdRequest, type ReolinkCmdResponse, type ReolinkCmdResponseExt, type ReolinkDayNightNotification, type ReolinkDeviceInfo, type ReolinkDeviceInfoTag, type ReolinkEvent, ReolinkHttpClient, type ReolinkHttpClientOptions, type ReolinkJson, type ReolinkMotionNotification, type ReolinkNvrChannelInfo, type ReolinkNvrDeviceGroupSummary, type ReolinkNvrDeviceGroupsResult, type ReolinkSimpleEvent, type ReolinkSimpleEventType, type ReolinkSupportedStream, type ReolinkVideoStreamOptionsResult, type ReolinkVisitorNotification, type ReplayHttpServer, type ReplayHttpServerOptions, type ResponseMediaStreamOptions, type Rfc4571ApiFactoryContext, type Rfc4571Client, Rfc4571Muxer, type Rfc4571ReplayServer, type Rfc4571ReplayServerOptions, type Rfc4571TcpServer, type Rfc4571TcpServerOptions, type RtpPacketizationOptions, type RtspCreateOptions, type RtspProxyServerOptions, type RtspStreamProfile, type RunAllDiagnosticsConsecutivelyParams, type RunAllDiagnosticsConsecutivelyResult, type RunMultifocalDiagnosticsConsecutivelyParams, type RunMultifocalDiagnosticsConsecutivelyResult, type SirenState, type SirenStatusConfig, type SleepState, type SleepStatus, type StreamMetadata, type StreamProfile, type StreamSamplingOptions, type StreamSamplingSelection, type SupportConfig, type SupportInfo, type SupportItem, type SystemGeneralConfig, type TalkAbility$1 as TalkAbility, type TalkAudioConfig, type TalkConfig, type TalkSession$1 as TalkSession, type TalkSessionInfo, type TimelapseCfgConfig, type TwoWayAudioConfig, type VideoCodec, type VideoInputConfig, type VideoParamSets, type VideoStreamOptions, type VideoStreamOptionsCacheEntry, type VideoType, type VideoclipClientInfo, type VideoclipModeDecision, type VideoclipThumbnailResult, type VideoclipTranscodeMode, type VodFile, type VodSearchResponse, type VodSearchResult, type VodSearchStatus, type WakeUpOptions, type WebRTCAnswer, type WebRTCIceCandidate, type WebRTCOffer, type WebRTCSessionInfo, type WhiteLedConfig, type WhiteLedState, type ZoomFocusStatus, type ZoomFocusTriplet, abilitiesHasAny, aesDecrypt, aesEncrypt, asLogger, autoDetectDeviceType, bcDecrypt, bcEncrypt, bcHeaderHasPayloadOffset, buildAacAudioSpecificConfigHex, buildAbilityInfoExtensionXml, buildBinaryExtensionXml, buildChannelExtensionXml, buildFloodlightManualXml, buildHlsRedirectUrl, buildLoginXml, buildPreviewStopXml, buildPreviewStopXmlV11, buildPreviewXml, buildPreviewXmlV11, buildPtzControlXml, buildPtzPresetXml, buildPtzPresetXmlV2, buildRfc4571Sdp, buildRtspPath, buildRtspUrl, buildSirenManualXml, buildSirenTimesXml, buildStartZoomFocusXml, buildWhiteLedStateXml, collectCgiDiagnostics, collectMultifocalDiagnostics, collectNativeDiagnostics, collectNvrDiagnostics, computeDeviceCapabilities, convertToAnnexB as convertH265ToAnnexB, convertToAnnexB$1 as convertToAnnexB, convertToLengthPrefixed, createBaichuanEndpointsServer, createDebugGateLogger, createDiagnosticsBundle, createLogger, createMjpegBoundary, createNativeStream, createNullLogger, createReplayHttpServer, createRfc4571TcpServer, createRfc4571TcpServerForReplay, createRtspProxyServer, createTaggedLogger, decideVideoclipTranscodeMode, decodeHeader, deriveAesKey, detectIosClient, detectVideoCodecFromNal, discoverReolinkDevices, discoverViaHttpScan, discoverViaUdpBroadcast, discoverViaUdpDirect, encodeHeader, extractH264ParamSetsFromAccessUnit, extractH265ParamSetsFromAccessUnit, extractPpsFromAnnexB, extractSpsFromAnnexB, extractVpsFromAnnexB, flattenAbilitiesForChannel, formatMjpegFrame, getConstructedVideoStreamOptions, getGlobalLogger, getH265NalType, getMjpegContentType, getVideoStream, getVideoclipClientInfo, getXmlText, hasStartCodes as hasH265StartCodes, hasStartCodes$1 as hasStartCodes, isDualLenseModel, isH264KeyframeAnnexB, isH265Irap, isH265KeyframeAnnexB, isNvrHubModel, isTcpFailureThatShouldFallbackToUdp, isValidH264AnnexBAccessUnit, isValidH265AnnexBAccessUnit, maskUid, md5HexUpper, md5StrModern, normalizeUid, packetizeAacAdtsFrame, packetizeAacRawFrame, packetizeH264, packetizeH265, parseAdtsHeader, parseBcMedia, parseRecordingFileName, parseSupportXml, printNvrDiagnostics, runAllDiagnosticsConsecutively, runMultifocalDiagnosticsConsecutively, sampleStreams, setGlobalLogger, splitAnnexBToNalPayloads$1 as splitAnnexBToNalPayloads, splitAnnexBToNals, splitAnnexBToNalPayloads as splitH265AnnexBToNalPayloads, testChannelStreams, xmlEscape, zipDirectory };
|