-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
31 lines (26 loc) · 1.09 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const ResponseCodes = require("./constants/ResponseCodes");
const DVRIPClient = require("./lib/dvripclient.js");
const DVRIPStreamClient = require("./lib/dvripstreamclient.js");
/**
* @typedef {Object} DVRIPStream
* @property {stream.PassThrough} audio audio part of the stream. ALAW 8000Hz for me, no idea if its the same for all.
* @property {stream.PassThrough} video video part of the stream. Probably raw H264 / H265
*/
/**
* @typedef {Object} DVRIPSession
* @property {buffer} Buffer Session ID in form of a Buffer
* @property {string} string Session ID in form of a string
*/
/**
* @typedef {Object} DVRIPCommandResponse
* @property {number} Ret Reponse code
* @property {string} SessionID Session ID returned by server
* @property {string} [SessionID] Name of the command this is a response to
* @property {Object} [data] Data / Result of command
*/
/**
* @typedef {Object} DVRIPMessage
* @property {number} cmdSeq Sequence ID included in the message
* @property {Buffer} builtMessage Message packet ready to be sent
*/
module.exports = {DVRIPClient, DVRIPStreamClient, ResponseCodes};