@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.
@@ -3,7 +3,7 @@ import {
3
3
  BaichuanRtspServer,
4
4
  ReolinkBaichuanApi,
5
5
  autoDetectDeviceType
6
- } from "../chunk-R5AJV73A.js";
6
+ } from "../chunk-6KYLA4YI.js";
7
7
  import "../chunk-2JNXKT3C.js";
8
8
  import {
9
9
  __require
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
- return buildEncOptions(list, channel);
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