@apocaliss92/nodelink-js 0.4.13 → 0.4.15
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/{chunk-R5AJV73A.js → chunk-6KYLA4YI.js} +23 -2
- package/dist/chunk-6KYLA4YI.js.map +1 -0
- package/dist/cli/rtsp-server.cjs +22 -1
- package/dist/cli/rtsp-server.cjs.map +1 -1
- package/dist/cli/rtsp-server.js +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-R5AJV73A.js.map +0 -1
package/dist/cli/rtsp-server.cjs
CHANGED
|
@@ -27447,6 +27447,7 @@ ${xml}`
|
|
|
27447
27447
|
async setAutoFocus(channel, disable, options) {
|
|
27448
27448
|
const ch = this.normalizeChannel(channel);
|
|
27449
27449
|
const disableVal = disable ? 1 : 0;
|
|
27450
|
+
const extensionXml = buildChannelExtensionXml(ch);
|
|
27450
27451
|
const payloadXml = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
27451
27452
|
<body>
|
|
27452
27453
|
<AutoFocus version="1.1">
|
|
@@ -27457,6 +27458,7 @@ ${xml}`
|
|
|
27457
27458
|
await this.sendXml({
|
|
27458
27459
|
cmdId: BC_CMD_ID_SET_AUTO_FOCUS,
|
|
27459
27460
|
channel: ch,
|
|
27461
|
+
extensionXml,
|
|
27460
27462
|
payloadXml,
|
|
27461
27463
|
...options?.timeoutMs != null ? { timeoutMs: options.timeoutMs } : {}
|
|
27462
27464
|
});
|
|
@@ -28027,7 +28029,26 @@ ${xml}`
|
|
|
28027
28029
|
*/
|
|
28028
28030
|
async getEncOptions(channel, options) {
|
|
28029
28031
|
const list = await this.getStreamInfoList(channel, options);
|
|
28030
|
-
|
|
28032
|
+
const built = buildEncOptions(list, channel);
|
|
28033
|
+
try {
|
|
28034
|
+
const enc = await this.getEnc(channel, options);
|
|
28035
|
+
const compression = enc.body?.Compression;
|
|
28036
|
+
const mergeGop = (target, stream) => {
|
|
28037
|
+
if (!target || !stream) return;
|
|
28038
|
+
const g = stream.gop;
|
|
28039
|
+
if (!g) return;
|
|
28040
|
+
target.gopRange = {
|
|
28041
|
+
...g.cur !== void 0 ? { cur: g.cur } : {},
|
|
28042
|
+
...g.min !== void 0 ? { min: g.min } : {},
|
|
28043
|
+
...g.max !== void 0 ? { max: g.max } : {}
|
|
28044
|
+
};
|
|
28045
|
+
};
|
|
28046
|
+
mergeGop(built.mainStream, compression?.mainStream);
|
|
28047
|
+
mergeGop(built.subStream, compression?.subStream);
|
|
28048
|
+
mergeGop(built.thirdStream, compression?.thirdStream);
|
|
28049
|
+
} catch {
|
|
28050
|
+
}
|
|
28051
|
+
return built;
|
|
28031
28052
|
}
|
|
28032
28053
|
/**
|
|
28033
28054
|
* Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the
|