QuietArgument -> VerbosityLevelArgument

More options
This commit is contained in:
Malte Rosenbjerg 2020-05-10 23:17:30 +02:00
parent 188f37c9ee
commit af77e48f28
2 changed files with 25 additions and 7 deletions

View file

@ -1,7 +0,0 @@
namespace FFMpegCore.Arguments
{
public class QuietArgument : IArgument
{
public string Text => "-hide_banner -loglevel warning";
}
}

View file

@ -0,0 +1,25 @@
namespace FFMpegCore.Arguments
{
public class VerbosityLevelArgument : IArgument
{
private readonly VerbosityLevel _verbosityLevel;
public VerbosityLevelArgument(VerbosityLevel verbosityLevel)
{
_verbosityLevel = verbosityLevel;
}
public string Text => $"{((int)_verbosityLevel < 32 ? "-hide_banner " : "")}-loglevel {_verbosityLevel.ToString().ToLowerInvariant()}";
}
public enum VerbosityLevel
{
Quiet = -8,
Fatal = 8,
Error = 16,
Warning = 24,
Info = 32,
Verbose = 40,
Debug = 48,
Trace = 56
}
}