Transitions: fade starts from the outgoing picture (was an instant cut)

The transition started with no from-frame, so BlendFrame returned the new scene at once.
Start now requests a capture and the frame pump supplies its last output on the next tick.
Test: TransitionFadeTests. Docs: ai.md, TASKS.md.

Not pushed.
This commit is contained in:
2026-10-27 08:39:49 -07:00
parent 7ae30d4cfc
commit 90cd039d98
5 changed files with 62 additions and 0 deletions
+11
View File
@@ -45,12 +45,23 @@ public sealed class TransitionService
/// </summary>
public VideoFrame? FromFrame { get; private set; }
/// <summary>True when a transition started without its "from" picture; the frame pump
/// supplies the outgoing program frame on its next tick via <see cref="SupplyFromFrame"/>.</summary>
public bool CaptureRequested { get; private set; }
public void SupplyFromFrame(VideoFrame frame)
{
FromFrame = frame;
CaptureRequested = false;
}
/// <summary>Begin a transition. Caller should capture FromFrame from the current LiveScene render.</summary>
public void Start(TransitionType type, double durationMs, VideoFrame? fromFrame)
{
CurrentType = type;
DurationMs = durationMs > 0 ? durationMs : DefaultDurationMs;
FromFrame = fromFrame;
CaptureRequested = fromFrame == null && type != TransitionType.Cut;
ElapsedMs = 0;
Active = true;