public void InputVideoDecodeConfiguration_MultipleFilters_InvalidConfigDetected() { var parameters = new StackAllOptions { InputVideoFile = "a.mp4", InputVideoArguments = "-vf scale=-1:1080", Filters = new List <string> { "MaxFilter", "MinFilter" }, OutputVideoFile = "a2.mp4" }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ConfigureFilters(parameters.Filters); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.Filters.Should().HaveCount(2); basicEnvironment.CheckConstraints(); basicEnvironment.ThrowMe.Should().BeTrue(); }
public void OutputFileConfiguration_EmptyConfiguration_SetFlagThrowMe() { var parameters = new StackAllOptions { }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeTrue(); }
public void OutputStreamConfiguration_StreamWriter_IsCreated() { var parameters = new StackAllOptions { UseOutputPipe = true }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.OutputMode.Should().NotBeNull(); }
public void OutputFileConfiguration_FileWriter_IsCreated() { var parameters = new StackAllOptions { OutputFolder = ".", OutputFilePrefix = "timelapse" }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.OutputMode.Should().NotBeNull(); }
public void OutputVideoFileConfiguration_VideoWriter_IsCreated() { var parameters = new StackProgressiveOptions { OutputVideoFile = "a.mp4" }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.OutputMode.Should().NotBeNull(); basicEnvironment.OutputMode.Should().BeOfType <ffmpeg.FfmpegVideoWriter>(); }
public void OutputVideoFileConfiguration_VideoWriter_UsesCustomArguments() { var parameters = new StackProgressiveOptions { OutputVideoFile = "a.mp4", OutputVideoOptions = "-crf 24 -vf scale=-1:1080" }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureOuptutMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.OutputMode.Should().NotBeNull(); basicEnvironment.OutputMode.Should().BeOfType <ffmpeg.FfmpegVideoWriter>(); }