//command stage
        public static CommandStage WithInput <TStreamType>(this FFmpegCommand command, string fileName)
            where TStreamType : class, IStream
        {
            var commandStage = CommandStage.Create(command);

            return(commandStage.WithInput <TStreamType>(fileName));
        }
Example #2
0
        public void Command_WithInputVsAddInput_Verify()
        {
            var command = CommandHelper.CreateCommand();

            Assert.Throws <ArgumentException>(() => command.AddInput(string.Empty));
            Assert.Throws <ArgumentException>(() => command.WithInput <VideoStream>(string.Empty));

            var stage = CommandStage.Create(command);

            stage = command.AddInput(Assets.Utilities.GetVideoFile())
                    .WithInput <VideoStream>(Assets.Utilities.GetVideoFile());

            Assert.True(command.Inputs.Count == 2);
            Assert.True(stage.StreamIdentifiers.Count == 1);
        }