From ce46cd43635e09a9c8f89d9cf04fb9e59d044b6b Mon Sep 17 00:00:00 2001 From: routersys Date: Sun, 13 Sep 2026 10:49:31 +0900 Subject: [PATCH] =?UTF-8?q?YMM4=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E9=A0=86=E3=81=A7=E6=98=A0=E5=83=8F=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=82=92=E9=96=8B=E3=81=8F=E5=87=A6=E7=90=86=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProxyForge/Sources/VideoSourceLoader.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ProxyForge/Sources/VideoSourceLoader.cs diff --git a/ProxyForge/Sources/VideoSourceLoader.cs b/ProxyForge/Sources/VideoSourceLoader.cs new file mode 100644 index 0000000..e0b2638 --- /dev/null +++ b/ProxyForge/Sources/VideoSourceLoader.cs @@ -0,0 +1,25 @@ +using YukkuriMovieMaker.Commons; +using YukkuriMovieMaker.Plugin; +using YukkuriMovieMaker.Plugin.FileSource; + +namespace ProxyForge.Sources; + +internal delegate IVideoFileSource? VideoSourceFactory(IGraphicsDevicesAndContext devices, string filePath); + +internal static class VideoSourceLoader +{ + public static IVideoFileSource? Load(IGraphicsDevicesAndContext devices, string filePath) + { + foreach (var plugin in PluginLoader.VideoFileSourcePlugins) + { + if (ReferenceEquals(plugin.GetType().Assembly, typeof(VideoSourceLoader).Assembly)) + continue; + + var source = plugin.CreateVideoFileSource(devices, filePath); + if (source is not null) + return source; + } + + return null; + } +}