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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user