Esempio n. 1
0
        private FFmpegCommand(CommandFactory owner)
        {
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }

            Owner              = owner;
            Id                 = Guid.NewGuid().ToString();
            Objects            = CommandObjects.Create(this);
            OutputManager      = CommandOutputManager.Create(this);
            InputManager       = CommandInputManager.Create(this);
            FilterchainManager = FiltergraphManager.Create(this);
        }
Esempio n. 2
0
        public void CommandFilterchainManager_Verify()
        {
            var factory = CommandFactory.Create();

            var command = factory.CreateOutputCommand()
                          .WithInput <VideoStream>(Assets.Utilities.GetVideoFile())
                          .WithInput <VideoStream>(Assets.Utilities.GetVideoFile());

            var commandFilterchainManager = FiltergraphManager.Create(command.Command);

            var filterchain  = Filterchain.FilterTo <VideoStream>(new Fps());
            var filterchain2 = Filterchain.FilterTo <VideoStream>(new Concat());

            var streamIds = new List <StreamIdentifier>();

            Assert.DoesNotThrow(() => streamIds = commandFilterchainManager.AddToEach(filterchain, command.StreamIdentifiers.ToArray()));
            Assert.True(streamIds.Count == 2);
            Assert.DoesNotThrow(() => streamIds = commandFilterchainManager.Add(filterchain2, streamIds.ToArray()));
            Assert.True(streamIds.Count == 1);
        }