Merge pull request #52 from WeihanLi/fluent-config

config FFMpegOptions with delegate

Former-commit-id: 90ab2d255f
This commit is contained in:
Malte Rosenbjerg 2020-05-03 23:39:58 +02:00 committed by GitHub
commit 3e800c7e32

View file

@ -12,8 +12,17 @@ public class FFMpegOptions
public static FFMpegOptions Options { get; private set; } = new FFMpegOptions();
public static void Configure(Action<FFMpegOptions> optionsAction)
{
optionsAction?.Invoke(Options);
}
public static void Configure(FFMpegOptions options)
{
if (null == options)
{
throw new ArgumentNullException(nameof(options));
}
Options = options;
}