GUI-STUDIO commited on
Commit ·
61e8af9
1
Parent(s): a0c7e60
changes
Browse files- src/sub-router/showtime.ts +12 -2
- src/sub-router/stream.ts +12 -0
src/sub-router/showtime.ts
CHANGED
|
@@ -687,8 +687,6 @@ async function handle_data(arg0: {
|
|
| 687 |
})
|
| 688 |
});
|
| 689 |
|
| 690 |
-
console.log("E_, R_", E_, R_);
|
| 691 |
-
|
| 692 |
if (E_ || !R_) {
|
| 693 |
if (fMP4) {
|
| 694 |
phase = "single";
|
|
@@ -696,10 +694,22 @@ async function handle_data(arg0: {
|
|
| 696 |
use_s3_pipe = false;
|
| 697 |
}
|
| 698 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 699 |
run({
|
| 700 |
ii: 0,
|
| 701 |
...(fMP4 ? { keep_subs: true, rebuild: true } : {})
|
| 702 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
}
|
| 704 |
} else {
|
| 705 |
run({
|
|
|
|
| 687 |
})
|
| 688 |
});
|
| 689 |
|
|
|
|
|
|
|
| 690 |
if (E_ || !R_) {
|
| 691 |
if (fMP4) {
|
| 692 |
phase = "single";
|
|
|
|
| 694 |
use_s3_pipe = false;
|
| 695 |
}
|
| 696 |
|
| 697 |
+
NS_Misc.console.log({
|
| 698 |
+
ENV: "all",
|
| 699 |
+
_browser: false,
|
| 700 |
+
_log: [`USING FFMPEG PIPE HANDLER`, "\n"]
|
| 701 |
+
});
|
| 702 |
+
|
| 703 |
run({
|
| 704 |
ii: 0,
|
| 705 |
...(fMP4 ? { keep_subs: true, rebuild: true } : {})
|
| 706 |
});
|
| 707 |
+
} else {
|
| 708 |
+
NS_Misc.console.log({
|
| 709 |
+
ENV: "all",
|
| 710 |
+
_browser: false,
|
| 711 |
+
_log: [`USING STREAM HANDLER`, "\n"]
|
| 712 |
+
});
|
| 713 |
}
|
| 714 |
} else {
|
| 715 |
run({
|
src/sub-router/stream.ts
CHANGED
|
@@ -1131,6 +1131,12 @@ async function handle_data(arg0: {
|
|
| 1131 |
_log: [`🏁 PHRASE [${phase}]: INIT`, "\n"]
|
| 1132 |
});
|
| 1133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1134 |
// fetch(_);
|
| 1135 |
|
| 1136 |
NS_promise.F_catch_promise({
|
|
@@ -1354,6 +1360,12 @@ function segmentStream(arg0: {
|
|
| 1354 |
}): ReadableStream<Uint8Array> {
|
| 1355 |
const { segments, init, headers, concurrency = 2, onSegment, onError } = arg0;
|
| 1356 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1357 |
const { readable, writable } = new TransformStream<Uint8Array, Uint8Array>();
|
| 1358 |
const ac = arg0.ac || new AbortController();
|
| 1359 |
const inflight: Promise<Response>[] = [];
|
|
|
|
| 1131 |
_log: [`🏁 PHRASE [${phase}]: INIT`, "\n"]
|
| 1132 |
});
|
| 1133 |
|
| 1134 |
+
NS_Misc.console.log({
|
| 1135 |
+
ENV: "all",
|
| 1136 |
+
_browser: false,
|
| 1137 |
+
_log: [`SENT TO FFMPEG PIPE HANDLER`, "\n"]
|
| 1138 |
+
});
|
| 1139 |
+
|
| 1140 |
// fetch(_);
|
| 1141 |
|
| 1142 |
NS_promise.F_catch_promise({
|
|
|
|
| 1360 |
}): ReadableStream<Uint8Array> {
|
| 1361 |
const { segments, init, headers, concurrency = 2, onSegment, onError } = arg0;
|
| 1362 |
|
| 1363 |
+
NS_Misc.console.log({
|
| 1364 |
+
ENV: "all",
|
| 1365 |
+
_browser: false,
|
| 1366 |
+
_log: [`STREAM HANDLER: concurrency = ${concurrency}`, "\n"]
|
| 1367 |
+
});
|
| 1368 |
+
|
| 1369 |
const { readable, writable } = new TransformStream<Uint8Array, Uint8Array>();
|
| 1370 |
const ac = arg0.ac || new AbortController();
|
| 1371 |
const inflight: Promise<Response>[] = [];
|