feat(P1): output program with direction, loops, hold and fades; still frames

Completes the Core side of owner review 1 phase 5 (R8): OutputProgram turns the plan into the emitted entries (reverse, boomerang without a doubled turn, loops, a hold of whole periods, fades split per period over held frames and shortened with a warning when longer than half the program). The render follows the program: star trails accumulate in program order, median/mean windows stay per plan frame in either direction, a boomerang with trails plays forward with a warning, and the fade gain is the last FrameFinish step. Workload and estimates come from the program, so loops and holds show in time and size.

A still target (RenderTarget.StillFrame) renders one source frame with every correction and no playback into one PNG, JPEG or TIFF 16-bit file (EncodeSettings.SingleImage, StillImageSession), named by ExportNaming.StillPath and recorded with kind still, fps 0 and duration 0.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-05 02:07:58 +01:00
1 parent d472dfdec1
commit 3c2cce8031
13 files changed
+803 -69

No files matched your search

+31
View File
@@ -126,6 +126,37 @@ public static class ExportNaming
return OutputPath(string.IsNullOrWhiteSpace(settings.Folder) ? sequenceExportsFolder : settings.Folder, settings.NameTemplate, context, taken);
}
/// <summary>
/// The name of a still (owner review 1, R8, "Save frame"): the expanded <paramref name="template"/>, " - " and the 1-based
/// number of source frame <paramref name="frameIndex"/> in at least four digits, "2026-09-28 Harbour - 4K HEVC - 0123".
/// </summary>
public static string StillName(string template, ExportNameContext context, int frameIndex)
{
ArgumentOutOfRangeException.ThrowIfNegative(frameIndex);
var name = Expand(template, context).Name;
return PathTemplate.SanitizeSegment(string.Create(CultureInfo.InvariantCulture, $"{name} - {frameIndex + 1:D4}"));
}
/// <summary>
/// Full path of a still inside <paramref name="folder"/>: <see cref="StillName"/> plus the image extension of the codec
/// (one file, never a folder), made unique like <see cref="OutputPath(string, string, ExportNameContext, Func{string, bool}?)"/>.
/// </summary>
public static string StillPath(string folder, string template, ExportNameContext context, int frameIndex, Func<string, bool>? taken = null)
{
ArgumentException.ThrowIfNullOrWhiteSpace(folder);
return Unique(folder, StillName(template, context, frameIndex), VideoCodecInfo.FileExtension(context.Codec), taken);
}
/// <summary>
/// Path of a still of a project's export: <see cref="ExportSettings.Folder"/> or, when unset, the sequence's exports
/// folder, named by <see cref="ExportSettings.NameTemplate"/> and the frame number.
/// </summary>
public static string StillPath(ExportSettings settings, string sequenceExportsFolder, ExportNameContext context, int frameIndex, Func<string, bool>? taken = null)
{
ArgumentNullException.ThrowIfNull(settings);
return StillPath(string.IsNullOrWhiteSpace(settings.Folder) ? sequenceExportsFolder : settings.Folder, settings.NameTemplate, context, frameIndex, taken);
}
/// <summary>"name.ext", or "name (2).ext", "name (3).ext"… when a file or folder of that name exists or is <paramref name="taken"/>.</summary>
public static string Unique(string folder, string name, string extension, Func<string, bool>? taken = null)
{