@apocaliss92/nodelink-js 0.4.13 → 0.4.14

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-WKETZFBI.js";
7
7
  import "../chunk-2JNXKT3C.js";
8
8
  import {
9
9
  __require
package/dist/index.cjs CHANGED
@@ -28648,7 +28648,26 @@ ${xml}`
28648
28648
  */
28649
28649
  async getEncOptions(channel, options) {
28650
28650
  const list = await this.getStreamInfoList(channel, options);
28651
- return buildEncOptions(list, channel);
28651
+ const built = buildEncOptions(list, channel);
28652
+ try {
28653
+ const enc = await this.getEnc(channel, options);
28654
+ const compression = enc.body?.Compression;
28655
+ const mergeGop = (target, stream) => {
28656
+ if (!target || !stream) return;
28657
+ const g = stream.gop;
28658
+ if (!g) return;
28659
+ target.gopRange = {
28660
+ ...g.cur !== void 0 ? { cur: g.cur } : {},
28661
+ ...g.min !== void 0 ? { min: g.min } : {},
28662
+ ...g.max !== void 0 ? { max: g.max } : {}
28663
+ };
28664
+ };
28665
+ mergeGop(built.mainStream, compression?.mainStream);
28666
+ mergeGop(built.subStream, compression?.subStream);
28667
+ mergeGop(built.thirdStream, compression?.thirdStream);
28668
+ } catch {
28669
+ }
28670
+ return built;
28652
28671
  }
28653
28672
  /**
28654
28673
  * Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the