mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Merge pull request #52 from WeihanLi/fluent-config
config FFMpegOptions with delegate
Former-commit-id: 90ab2d255f
This commit is contained in:
commit
3e800c7e32
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue