Removed excessive whitespace

This commit is contained in:
Yan Gauthier 2024-08-15 16:32:12 -04:00
parent 91e8e1e18d
commit 935980568c
2 changed files with 3 additions and 10 deletions

View file

@ -17,13 +17,11 @@ public class VideoTest
{
private const int BaseTimeoutMilliseconds = 15_000;
private string _segmentPathSource = "";
[TestInitialize]
public void Setup()
{
_segmentPathSource = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}-");
}
[TestCleanup]
public void Cleanup()
{
@ -32,7 +30,6 @@ public void Cleanup()
File.Delete(file);
}
}
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
public void Video_ToOGV()
{

View file

@ -10,12 +10,10 @@ public class OutputSegmentArgument : IOutputArgument
public readonly string SegmentPattern;
public readonly bool Overwrite;
public readonly SegmentArgumentOptions Options;
public OutputSegmentArgument(SegmentArgument segmentArgument)
{
SegmentPattern = segmentArgument.SegmentPattern;
Overwrite = segmentArgument.Overwrite;
var segmentArgumentobj = new SegmentArgumentOptions();
segmentArgument.Options?.Invoke(segmentArgumentobj);
Options = segmentArgumentobj;
@ -24,12 +22,11 @@ public OutputSegmentArgument(SegmentArgument segmentArgument)
public void Pre()
{
if (int.TryParse(Options.Arguments.FirstOrDefault(x => x.Key == "segment_time").Value, out var result) && result < 1)
{
throw new FFMpegException(FFMpegExceptionType.Process, "Parameter SegmentTime cannot be negative or equal to zero");
{
throw new FFMpegException(FFMpegExceptionType.Process, "Parameter SegmentTime cannot be negative or equal to zero");
}
if (Options.Arguments.FirstOrDefault(x => x.Key == "segment_time").Value == "0")
{
throw new FFMpegException(FFMpegExceptionType.Process, "Parameter SegmentWrap cannot equal to zero");
}
@ -40,7 +37,6 @@ public void Post()
}
public string Text => GetText();
private string GetText()
{
var arguments = Options.Arguments
@ -82,7 +78,7 @@ public class SegmentArgument
public readonly bool Overwrite;
public readonly Action<SegmentArgumentOptions> Options;
public SegmentArgument(string segmentPattern, bool overwrite, Action<SegmentArgumentOptions> options)
public SegmentArgument(string segmentPattern, bool overwrite, Action<SegmentArgumentOptions> options)
{
SegmentPattern = segmentPattern;
Overwrite = overwrite;