Merge pull request #52 from WeihanLi/fluent-config

config FFMpegOptions with delegate
This commit is contained in:
Malte Rosenbjerg 2020-05-03 23:39:58 +02:00 committed by GitHub
commit 90ab2d255f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,17 @@ public class FFMpegOptions
public static FFMpegOptions Options { get; private set; } = new 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) public static void Configure(FFMpegOptions options)
{ {
if (null == options)
{
throw new ArgumentNullException(nameof(options));
}
Options = options; Options = options;
} }