@torrent-tv/proxy 2.80.8 → 2.80.10

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +1675 -1658
  2. package/bin/cli.js +606 -596
  3. package/package.json +51 -50
  4. package/services/data-channel-handler.js +2 -4
  5. package/services/encode/CoverageMap.js +428 -401
  6. package/services/encode/EncodePlan.js +0 -3
  7. package/services/encode/EncodeRun.js +14 -0
  8. package/services/encode/SegmentStore.js +718 -669
  9. package/services/hls-session-manager.js +44 -162
  10. package/services/hwaccel.js +2 -2
  11. package/services/memory-report.js +596 -592
  12. package/services/orchestrators/EncodeOrchestrator.js +143 -11
  13. package/services/quality/EncodeCost.js +555 -555
  14. package/test/auto-quality-step.test.js +514 -507
  15. package/test/contention.test.js +1 -1
  16. package/test/coverage-follows-the-disk.test.js +187 -0
  17. package/test/coverage-map.test.js +195 -178
  18. package/test/encode-orchestrator.test.js +1 -2
  19. package/test/encode-plan-viewers.test.js +18 -19
  20. package/test/encode-plan.test.js +3 -4
  21. package/test/held-request-width.test.js +155 -154
  22. package/test/helpers/encode-run.js +136 -128
  23. package/test/orchestrator-wired.test.js +16 -11
  24. package/test/produced-copy-choice.test.js +358 -327
  25. package/test/run-intervals.test.js +100 -100
  26. package/test/segment-serve-wiring.test.js +76 -20
  27. package/test/segment-store.test.js +216 -187
  28. package/test/stale-request-after-seek.test.js +51 -77
  29. package/test/tracks-begin-together.test.js +176 -153
  30. package/test/viewer-outputs.test.js +278 -273
  31. package/test/behind-head-repair.test.js +0 -261
  32. /package/services/{contention.js → encode/contention.js} +0 -0
  33. /package/{test/decode-cost.test.js → test-measured/decode-cost.measured.js} +0 -0
  34. /package/{test/decode-measurement.test.js → test-measured/decode-measurement.measured.js} +0 -0
@@ -149,9 +149,6 @@ export function planEncoders({
149
149
  return stops;
150
150
  }
151
151
 
152
- // How far a search for a gap needs to look: past the furthest thing anybody
153
- // is waiting for there is nothing to decide about.
154
- const demandTo = Math.max(...wanted.map((span) => span.to));
155
152
  const untilNeeded = deadlineReaderFor(wanted, segmentSeconds);
156
153
  // Segments produced per second, from the fastest measured encoder here.
157
154
  // Seconds of film per second, divided by the film one piece holds.
@@ -295,6 +295,20 @@ export class EncodeRun {
295
295
  return this.head - 1;
296
296
  }
297
297
 
298
+ /**
299
+ * The last piece this run named while it was running normally.
300
+ *
301
+ * Its own statement that a piece is whole, and the only thing that can say so:
302
+ * a piece cut short still decodes, so its contents cannot be asked. Whatever
303
+ * lies beyond this name was open when the run ended, and that is what the
304
+ * clearing-up after a run reads.
305
+ *
306
+ * @returns {string | null}
307
+ */
308
+ get provenName() {
309
+ return this.#provenName;
310
+ }
311
+
298
312
  /** @returns {number[]} */
299
313
  get produced() {
300
314
  return [...this.#produced].sort((left, right) => left - right);