@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.
@@ -28027,7 +28027,26 @@ ${xml}`
28027
28027
  */
28028
28028
  async getEncOptions(channel, options) {
28029
28029
  const list = await this.getStreamInfoList(channel, options);
28030
- return buildEncOptions(list, channel);
28030
+ const built = buildEncOptions(list, channel);
28031
+ try {
28032
+ const enc = await this.getEnc(channel, options);
28033
+ const compression = enc.body?.Compression;
28034
+ const mergeGop = (target, stream) => {
28035
+ if (!target || !stream) return;
28036
+ const g = stream.gop;
28037
+ if (!g) return;
28038
+ target.gopRange = {
28039
+ ...g.cur !== void 0 ? { cur: g.cur } : {},
28040
+ ...g.min !== void 0 ? { min: g.min } : {},
28041
+ ...g.max !== void 0 ? { max: g.max } : {}
28042
+ };
28043
+ };
28044
+ mergeGop(built.mainStream, compression?.mainStream);
28045
+ mergeGop(built.subStream, compression?.subStream);
28046
+ mergeGop(built.thirdStream, compression?.thirdStream);
28047
+ } catch {
28048
+ }
28049
+ return built;
28031
28050
  }
28032
28051
  /**
28033
28052
  * Read the camera's `<VersionInfo>` block (cmd_id=80). Returns the