fix: address the phase 5 review
Video trash moves across volumes commit once the verified copy has its name and leave an undeletable source whole behind a .leftover marker that the next start settles; deletes rehash under the lease. Restores honour the names renders are writing, and encoders never overwrite an output. Routing floors at the stored settings' format, kindless stills read as stills, star trails restart per loop, and settings the encoder ignored become render warnings. The Videos section fits beside the player, plays downloaded server copies, names blocked videos and says why actions are off; the admin panel offers no download for sequences or missing files and names a filtered sequence from its record. Refs #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6d87a1bc6d
commit
1be273d0e4
38 files changed
+958
-160
No files matched your search
@@ -26,6 +26,9 @@ internal sealed class CapturingEncoderProvider(string name, params EncoderCapabi
|
||||
/// <summary>When set, WriteFrame throws this for the frame with that zero-based index.</summary>
|
||||
public (int Frame, Exception Error)? FailAt { get; set; }
|
||||
|
||||
/// <summary>The settings each session says it did not take (<see cref="IVideoEncoderSession.Ignored"/>).</summary>
|
||||
public IReadOnlyList<EncoderSetting> Ignores { get; set; } = [];
|
||||
|
||||
public bool CanEncode(EncodeSettings settings) => capabilities.Any(c =>
|
||||
c.Codec == settings.Codec && EncoderSelector.Takes(c, settings.Width, settings.Height) && (settings.BitDepth == 8 || c.SupportsTenBit));
|
||||
|
||||
@@ -54,5 +57,7 @@ internal sealed class CapturingEncoderProvider(string name, params EncoderCapabi
|
||||
public void Complete() => encode.Completed = true;
|
||||
|
||||
public void Dispose() => encode.Disposed = true;
|
||||
|
||||
public IReadOnlyList<EncoderSetting> Ignored => owner.Ignores;
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,20 @@ public sealed class PlaybackRenderTests
|
||||
Assert.Contains(result.Warnings, w => w.Key == OutputProgram.BoomerangStackWarning);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task EachLoopOfStarTrailsGrowsItsTrailsAgain()
|
||||
{
|
||||
var stars = Source(6, motion: i => (1.0 * i, 0), configure: o => o with { StarField = true, StartEv = 0, EndEv = 0, StarCount = 60 });
|
||||
var trails = new StackSettings { Mode = StackSetting.StarTrails, Length = 0 };
|
||||
var (looped, _) = await CaptureAsync(Input(stars, Playing(new PlaybackSettings { Loops = 2 }) with { Stack = trails }),
|
||||
cancellationToken: _context.Cancellation);
|
||||
Assert.Equal(12, looped.Frames.Count);
|
||||
// The second pass starts from nothing again: frame 6 + k is frame k, never the finished trails of the first pass.
|
||||
for (var k = 0; k < 6; k++)
|
||||
Assert.True(double.IsPositiveInfinity(Psnr(looped.Frames[k], looped.Frames[6 + k])), $"frame {6 + k} differs from frame {k}");
|
||||
Assert.False(double.IsPositiveInfinity(Psnr(looped.Frames[5], looped.Frames[6])), "the loop seam shows the trails start again");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AMedianWindowIsTheSameFrameInEitherDirection()
|
||||
{
|
||||
|
||||
@@ -142,6 +142,21 @@ public sealed class RenderPipelineTests
|
||||
Assert.Equal(4, encode.Frames.Count);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task SettingsTheEncoderIgnoredAreRenderWarnings()
|
||||
{
|
||||
var capture = new CapturingEncoderProvider("capture", new EncoderCapability(VideoCodec.PngSequence, "Capture", false, 4096, 4096, true))
|
||||
{
|
||||
Ignores = [EncoderSetting.RateControl, EncoderSetting.BFrames],
|
||||
};
|
||||
var result = await Pipeline(capture).RenderAsync(Input(Source()), Target(_context.CreateTempDirectory(), Preset("png-sequence")));
|
||||
Assert.Contains(result.Warnings, w => w.Key == "Export.Encoder.Ignored.RateControl");
|
||||
Assert.Contains(result.Warnings, w => w.Key == "Export.Encoder.Ignored.BFrames");
|
||||
// Each key is a message of the catalogue.
|
||||
foreach (var setting in Enum.GetValues<EncoderSetting>())
|
||||
Assert.NotEqual("Export.Encoder.Ignored." + setting, Chronos.Core.Localization.Loc.L("Export.Encoder.Ignored." + setting));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ProgressReportsEveryFrameAndPreviews()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user