@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.
@@ -19793,6 +19793,7 @@ ${xml}`
19793
19793
  async setAutoFocus(channel, disable, options) {
19794
19794
  const ch = this.normalizeChannel(channel);
19795
19795
  const disableVal = disable ? 1 : 0;
19796
+ const extensionXml = buildChannelExtensionXml(ch);
19796
19797
  const payloadXml = `<?xml version="1.0" encoding="UTF-8" ?>
19797
19798
  <body>
19798
19799
  <AutoFocus version="1.1">
@@ -19803,6 +19804,7 @@ ${xml}`
19803
19804
  await this.sendXml({
19804
19805
  cmdId: BC_CMD_ID_SET_AUTO_FOCUS,
19805
19806
  channel: ch,
19807
+ extensionXml,
19806
19808
  payloadXml,
19807
19809
  ...options?.timeoutMs != null ? { timeoutMs: options.timeoutMs } : {}
19808
19810
  });
@@ -20373,7 +20375,26 @@ ${xml}`
20373
20375
  */
20374
20376
  async getEncOptions(channel, options) {
20375
20377
  const list = await this.getStreamInfoList(channel, options);
20376
- return buildEncOptions(list, channel);
20378
+ const built = buildEncOptions(list, channel);
20379
+ try {
20380
+ const enc = await this.getEnc(channel, options);
20381
+ const compression = enc.body?.Compression;
20382
+ const mergeGop = (target, stream) => {
20383
+ if (!target || !stream) return;
20384
+ const g = stream.gop;
20385
+ if (!g) return;
20386
+ target.gopRange = {
20387
+ ...g.cur !== void 0 ? { cur: g.cur } : {},
20388
+ ...g.min !== void 0 ? { min: g.min } : {},
20389
+ ...g.max !== void 0 ? { max: g.max } : {}
20390
+ };
20391
+ };
20392
+ mergeGop(built.mainStream, compression?.mainStream);
20393
+ mergeGop(built.subStream, compression?.subStream);
20394
+ mergeGop(built.thirdStream, compression?.thirdStream);
20395
+ } catch {
20396
+ }
20397
+ return built;
20377
20398
  }
20378
20399
  /**
20379
20400
  * Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the
@@ -23861,4 +23882,4 @@ export {
23861
23882
  isTcpFailureThatShouldFallbackToUdp,
23862
23883
  autoDetectDeviceType
23863
23884
  };
23864
- //# sourceMappingURL=chunk-R5AJV73A.js.map
23885
+ //# sourceMappingURL=chunk-6KYLA4YI.js.map