@torrent-tv/proxy 2.80.9 → 2.80.11
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.
- package/CHANGELOG.md +1685 -1666
- package/package.json +1 -1
- package/services/data-channel-handler.js +2 -4
- package/services/encode/EncodePlan.js +0 -3
- package/services/encode/EncodeRun.js +14 -0
- package/services/encode/run-command.js +729 -707
- package/services/hls-session-manager.js +10168 -10494
- package/services/hwaccel.js +2 -2
- package/services/orchestrators/EncodeOrchestrator.js +4 -4
- package/services/output/LiveOutputs.js +49 -0
- package/services/priority/PriorityOrchestrator.js +278 -174
- package/services/quality/EncodeCost.js +555 -555
- package/test/auto-quality-step.test.js +514 -507
- package/test/contention.test.js +1 -1
- package/test/decode-cost-fit.test.js +57 -0
- package/test/decode-cost.test.js +13 -36
- package/test/encode-orchestrator.test.js +1 -2
- package/test/encode-plan-viewers.test.js +18 -19
- package/test/encode-plan.test.js +539 -539
- package/test/held-request-width.test.js +155 -154
- package/test/helpers/encode-run.js +136 -128
- package/test/keyframe-table-budget.test.js +7 -1
- package/test/one-authority.test.js +220 -105
- package/test/orchestrator-wired.test.js +16 -11
- package/test/piece-store-slow-disk.test.js +32 -2
- package/test/priority-map-per-output.test.js +211 -0
- package/test/produced-copy-choice.test.js +358 -327
- package/test/quality-variants.test.js +1222 -1209
- package/test/segment-serve-wiring.test.js +76 -20
- package/test/stale-request-after-seek.test.js +51 -77
- package/test/tracks-begin-together.test.js +195 -153
- package/test/tunnel-renewal.test.js +34 -5
- package/test/two-viewers-one-picture.test.js +374 -347
- package/test/viewer-outputs.test.js +18 -14
- package/test/behind-head-repair.test.js +0 -261
- package/test/decode-measurement.test.js +0 -83
- /package/services/{contention.js → encode/contention.js} +0 -0
package/package.json
CHANGED
|
@@ -274,7 +274,7 @@ function makeSendQueueWatcher({ log, getTransportSnapshot, witness, usrsctpState
|
|
|
274
274
|
// would be cleared a second after the wedged channel set it and the line
|
|
275
275
|
// would print for every second of a 54-minute episode.
|
|
276
276
|
let wedgeSaid = false;
|
|
277
|
-
let lastStuckLogAt = 0;
|
|
277
|
+
let lastStuckLogAt = 0;
|
|
278
278
|
let connection = connections.get(sessionId);
|
|
279
279
|
if (!connection) {
|
|
280
280
|
connection = {
|
|
@@ -481,7 +481,7 @@ function makeSendQueueWatcher({ log, getTransportSnapshot, witness, usrsctpState
|
|
|
481
481
|
`received=${snapshot.bytesReceived}${recvDelta === null ? "" : ` (+${recvDelta})`} ` +
|
|
482
482
|
`rtt=${snapshot.rtt}ms pc=${snapshot.state} ice=${snapshot.iceState} pair=${snapshot.pair}`
|
|
483
483
|
);
|
|
484
|
-
}
|
|
484
|
+
}
|
|
485
485
|
// Roadmap item 11: ask for the packet-level truth the moment the wedge is
|
|
486
486
|
// CERTAIN, not after a chosen delay. The three facts below are not
|
|
487
487
|
// ambiguous together — the queue has not fallen, the accepted-byte
|
|
@@ -1305,5 +1305,3 @@ const SEND_QUEUE_STUCK_MS = 5_000;
|
|
|
1305
1305
|
const DC_BUFFER_HIGH_WATER = 8 * 1024 * 1024;
|
|
1306
1306
|
/** Resume sending once the channel buffer drains to this many bytes. */
|
|
1307
1307
|
const DC_BUFFER_LOW_WATER = 1 * 1024 * 1024;
|
|
1308
|
-
/** Safety fallback so the send loop cannot deadlock on a missed drain event. */
|
|
1309
|
-
const DC_BUFFER_DRAIN_TIMEOUT_MS = 5000;
|
|
@@ -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);
|