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();
        }
Exemplo n.º 2
0
        public void OutputFileConfiguration_EmptyConfiguration_SetFlagThrowMe()
        {
            var parameters = new StackAllOptions
            {
            };

            var basicEnvironment = new StackingEnvironment();

            basicEnvironment.ConfigureOuptutMode(parameters);

            basicEnvironment.ThrowMe.Should().BeTrue();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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>();
        }
Exemplo n.º 6
0
        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>();
        }