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 InputConfiguration_NotSpecified_ThrowMeFlagSet() { var parameters = new StackAllOptions(); var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ThrowMe.Should().BeTrue(); }
public void InputFolderConfiguration_FolderDoesNotExist_ThrowMeFlagSet() { var parameters = new StackAllOptions { InputFolder = "test", }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ThrowMe.Should().BeTrue(); }
public void InputStreamConfiguration_SizeNotSpecified_ThrowMeFlagSet() { var parameters = new StackAllOptions { UseInputPipe = true, }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ThrowMe.Should().BeTrue(); }
public void InputStreamConfiguration_SizeParseable_InputReaderCreated() { var parameters = new StackAllOptions { UseInputPipe = true, InputSize = "1x20:1080" }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.InputMode.Should().NotBeNull(); }
public void InputFileConfiguration_FileReader_IsCreated() { var parameters = new StackAllOptions { InputFiles = new string[] { "a.jpg", "b.jpg", "c.jpg" }, }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.InputMode.Should().NotBeNull(); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.InputMode.Should().BeOfType <ImageMutliFileOrderedReader <MutableByteImage> >(); }
public void InputVideoDecodeConfiguration_ValidConfig_InputReaderCreated() { var parameters = new StackAllOptions { InputVideoFile = "a.mp4", InputVideoArguments = "-vf scale=-1:1080", }; var basicEnvironment = new StackingEnvironment(); basicEnvironment.ConfigureInputMode(parameters); basicEnvironment.ThrowMe.Should().BeFalse(); basicEnvironment.InputMode.Should().NotBeNull(); basicEnvironment.InputMode.Should().BeOfType <ffmpeg.FfmpegVideoReader>(); }