config FFMpegOptions with delegate

This commit is contained in:
weihanli 2020-05-02 11:26:54 +08:00
parent 1f7e663765
commit 2c63f93b59

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