config FFMpegOptions with delegate

Former-commit-id: 2c63f93b59
This commit is contained in:
weihanli 2020-05-02 11:26:54 +08:00
parent 6f925f76a7
commit 16a318d664

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;
} }