feat(server): route renders by settings format and adapted size; gate older servers
Owner review 1, phase 4 (P5). A render job now carries the output size its settings give (RenderSize, proportions win) and the settings format it needs, resolved on the server before the job is split, so only nodes that read that format and whose encoder takes the frame claim it, and a job no online node can read no longer waits for one. Nodes and the server announce the format they read; settings of a newer Chronos fail saying so. Encoder size limits are read as long edge x short edge: Media Foundation's software H.264 encoder, announced as 4096x2304, accepts portrait 2160x3840 (probed on this PC), so EncoderSelector and the provider take either orientation and cap a portrait frame against the turned limit. On the desktop, Sync and Send-and-render are disabled with the NeedsNewerServer tooltip while the server reads an older format than the working settings need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4364c4f25
commit
fca6c8dfea
27 files changed
+663
-47
No files matched your search
@@ -128,6 +128,22 @@ public sealed class EncoderSelectorTests
|
||||
Assert.Equal((1080, 606), (odd.Settings.Width, odd.Settings.Height));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void APortraitFrameReadsTheLimitTurned()
|
||||
{
|
||||
// An encoder announced as 4096×2304 takes 4K at 9:16: its limit is long edge × short edge.
|
||||
var portrait = EncoderSelector.Select(Request(VideoCodec.H264, 2160, 3840), Client(SoftwareH264), EncoderHost.Client);
|
||||
Assert.Equal((2160, 3840), (portrait.Settings.Width, portrait.Settings.Height));
|
||||
Assert.False(portrait.Notices.Any(n => n.Key is EncoderNotices.ResolutionCappedByEncoder or EncoderNotices.ResolutionCappedByLevel), "not capped");
|
||||
|
||||
var capped = EncoderSelector.Select(Request(VideoCodec.H264, 4320, 7680), Client(SoftwareH264), EncoderHost.Client);
|
||||
Assert.Equal((2304, 4096), (capped.Settings.Width, capped.Settings.Height));
|
||||
Assert.True(capped.Notices.Any(n => n.Key == EncoderNotices.ResolutionCappedByEncoder));
|
||||
|
||||
Assert.True(EncoderSelector.Takes(SoftwareH264, 2304, 4096));
|
||||
Assert.False(EncoderSelector.Takes(SoftwareH264, 2400, 3840), "the short edge is over the limit");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BitRateIsCappedByTheHighestLevel()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user