feat(server): render MP4 jobs no render node can take as MJPEG, and say so
BRIEF §14.7: the server falls back to managed formats when no node is available and says so in the job log. An MP4 job waits for render nodes at least the node timeout, then as long as an online node can encode its codec at its size; after that the server's engine takes it and writes each output it cannot encode as MJPEG in AVI at the same size and frame rate, with a job log line. A job the server started resumes there. Selective acceptance is asynchronous for that; when node availability cannot be read the job keeps waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
15 files changed
+247
-48
No files matched your search
@@ -25,7 +25,10 @@ internal sealed class RenderJobHandler(TitanoDatabase db, ProcessingOptions opti
|
||||
{
|
||||
public JobKind Kind => JobKind.Render;
|
||||
|
||||
public async Task RunAsync(JobContext context)
|
||||
public Task RunAsync(JobContext context) => RunAsync(context, target => target);
|
||||
|
||||
/// <summary>Runs the job with each output still to render passed through <paramref name="adapt"/> (the server's managed stand-ins).</summary>
|
||||
internal async Task RunAsync(JobContext context, Func<ExportTarget, ExportTarget> adapt)
|
||||
{
|
||||
var cancellation = context.Cancellation;
|
||||
var (parameters, export) = ProcessingJobs.ReadRender(context.Job.ParametersJson);
|
||||
@@ -56,7 +59,7 @@ internal sealed class RenderJobHandler(TitanoDatabase db, ProcessingOptions opti
|
||||
Discard(output, keepOutput: recorded.Any(r => r.OutputPath == Stored(paths, output)));
|
||||
names.Release(output); // free again for the entry's new attempt
|
||||
}
|
||||
var targets = all.Select((t, i) => (i, t)).Where(t => !done.Contains(t.i)).ToList();
|
||||
var targets = all.Select((t, i) => (i, t)).Where(t => !done.Contains(t.i)).Select(t => (t.i, adapt(t.t))).ToList();
|
||||
if (targets.Count == 0) return;
|
||||
|
||||
var frames = await SequenceFrames.LoadAsync(db, archive, sequence, parameters.UseProxies, cancellation).ConfigureAwait(false);
|
||||
|
||||
Reference in new issue
Block a user