@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.
@@ -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
- return buildEncOptions(list, channel);
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