@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.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -28068,6 +28068,7 @@ ${xml}`
|
|
|
28068
28068
|
async setAutoFocus(channel, disable, options) {
|
|
28069
28069
|
const ch = this.normalizeChannel(channel);
|
|
28070
28070
|
const disableVal = disable ? 1 : 0;
|
|
28071
|
+
const extensionXml = buildChannelExtensionXml(ch);
|
|
28071
28072
|
const payloadXml = `<?xml version="1.0" encoding="UTF-8" ?>
|
|
28072
28073
|
<body>
|
|
28073
28074
|
<AutoFocus version="1.1">
|
|
@@ -28078,6 +28079,7 @@ ${xml}`
|
|
|
28078
28079
|
await this.sendXml({
|
|
28079
28080
|
cmdId: BC_CMD_ID_SET_AUTO_FOCUS,
|
|
28080
28081
|
channel: ch,
|
|
28082
|
+
extensionXml,
|
|
28081
28083
|
payloadXml,
|
|
28082
28084
|
...options?.timeoutMs != null ? { timeoutMs: options.timeoutMs } : {}
|
|
28083
28085
|
});
|
|
@@ -28648,7 +28650,26 @@ ${xml}`
|
|
|
28648
28650
|
*/
|
|
28649
28651
|
async getEncOptions(channel, options) {
|
|
28650
28652
|
const list = await this.getStreamInfoList(channel, options);
|
|
28651
|
-
|
|
28653
|
+
const built = buildEncOptions(list, channel);
|
|
28654
|
+
try {
|
|
28655
|
+
const enc = await this.getEnc(channel, options);
|
|
28656
|
+
const compression = enc.body?.Compression;
|
|
28657
|
+
const mergeGop = (target, stream) => {
|
|
28658
|
+
if (!target || !stream) return;
|
|
28659
|
+
const g = stream.gop;
|
|
28660
|
+
if (!g) return;
|
|
28661
|
+
target.gopRange = {
|
|
28662
|
+
...g.cur !== void 0 ? { cur: g.cur } : {},
|
|
28663
|
+
...g.min !== void 0 ? { min: g.min } : {},
|
|
28664
|
+
...g.max !== void 0 ? { max: g.max } : {}
|
|
28665
|
+
};
|
|
28666
|
+
};
|
|
28667
|
+
mergeGop(built.mainStream, compression?.mainStream);
|
|
28668
|
+
mergeGop(built.subStream, compression?.subStream);
|
|
28669
|
+
mergeGop(built.thirdStream, compression?.thirdStream);
|
|
28670
|
+
} catch {
|
|
28671
|
+
}
|
|
28672
|
+
return built;
|
|
28652
28673
|
}
|
|
28653
28674
|
/**
|
|
28654
28675
|
* Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the
|