From 2c63f93b59ee393a61d02a89ca803405903aac3c Mon Sep 17 00:00:00 2001 From: weihanli Date: Sat, 2 May 2020 11:26:54 +0800 Subject: [PATCH 1/2] config FFMpegOptions with delegate --- FFMpegCore/FFMPEG/FFMpegOptions.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FFMpegCore/FFMPEG/FFMpegOptions.cs b/FFMpegCore/FFMPEG/FFMpegOptions.cs index f8fe390..f857122 100644 --- a/FFMpegCore/FFMPEG/FFMpegOptions.cs +++ b/FFMpegCore/FFMPEG/FFMpegOptions.cs @@ -12,8 +12,17 @@ public class FFMpegOptions public static FFMpegOptions Options { get; private set; } = new FFMpegOptions(); + public static void Configure(Action optionsAction) + { + optionsAction?.Invoke(Options); + } + public static void Configure(FFMpegOptions options) { + if (null == options) + { + throw new ArgumentNullException(nameof(options)); + } Options = options; } From d6e6f3f36da522efa09d38b32f175e55325e58db Mon Sep 17 00:00:00 2001 From: weihanli Date: Sat, 2 May 2020 11:41:51 +0800 Subject: [PATCH 2/2] clean project dependency --- FFMpegCore/FFMpegCore.csproj | 112 +---------------------------------- 1 file changed, 1 insertion(+), 111 deletions(-) diff --git a/FFMpegCore/FFMpegCore.csproj b/FFMpegCore/FFMpegCore.csproj index a3fca0d..821db6e 100644 --- a/FFMpegCore/FFMpegCore.csproj +++ b/FFMpegCore/FFMpegCore.csproj @@ -20,124 +20,14 @@ - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - + Always - -