Add isolated FFmpeg movie decoder shim

This commit is contained in:
gamer147
2026-07-22 00:17:27 -04:00
parent f53056818d
commit 760f84e218
16 changed files with 1118 additions and 36 deletions

25
godot/IMovieDecoder.cs Normal file
View File

@@ -0,0 +1,25 @@
using System;
using System.Runtime.Versioning;
using Age.Engine.Sys4;
/// <summary>
/// Platform-neutral movie playback boundary. Construction is synchronous so metadata needed by the VM is
/// available before op 0x236 returns; frame delivery and completion remain asynchronous.
/// </summary>
internal interface IMovieDecoder : IDisposable
{
long? StopTimeMs { get; }
bool IsCompleted { get; }
bool TryTakeFrame(out RgbaImage frame);
}
internal interface IMovieDecoderFactory
{
IMovieDecoder Open(MoviePayload movie);
}
[SupportedOSPlatform("windows")]
internal sealed class DirectShowMovieDecoderFactory : IMovieDecoderFactory
{
public IMovieDecoder Open(MoviePayload movie) => new DirectShowMovieDecoder(movie);
}