private void Fill(FFmpegCommand command, Filterchain filterchain)
        {
            filterchain.ReceiptList.ForEach(streamId =>
            {
                var resourceIndexOf = CommandHelperUtility.IndexOfResource(command, streamId);
                if (resourceIndexOf > -1)
                {
                    DependecyTree.Add(MetadataInfoTreeSource.Create(command.Inputs[resourceIndexOf]));
                }

                var filterchainIndexOf = CommandHelperUtility.IndexOfFilterchain(command, streamId);
                if (filterchainIndexOf > -1)
                {
                    DependecyTree.Add(Create(command, command.Filtergraph[filterchainIndexOf]));
                }
            });
        }
        private void Fill(FFmpegCommand command, CommandOutput commandOutput)
        {
            //find the command output map setting, if the command output has map settings
            //then they make up its dependecy tree.
            var allSettingMaps = commandOutput.Settings.OfType <Map>();

            if (allSettingMaps.Any())
            {
                var streamIdListFromMaps = allSettingMaps.Select(map => StreamIdentifier.Create(command.Owner.Id, command.Id, map.Stream)).ToList();

                Fill(command, streamIdListFromMaps);

                return;
            }

            //if the command output does not contain map settings then the dependency tree
            //is made up of all the input streams.
            command.Objects.Inputs.ForEach(commandResource => DependecyTree.Add(MetadataInfoTreeSource.Create(commandResource)));
        }
示例#3
0
        private void Fill(FFmpegCommand command, List <StreamIdentifier> streamIdList)
        {
            streamIdList.ForEach(streamId =>
            {
                var resourceIndexOf = CommandHelper.IndexOfResource(command, streamId);
                if (resourceIndexOf > -1)
                {
                    DependecyTree.Add(MetadataInfoTreeSource.Create(command.Inputs[resourceIndexOf]));

                    return;
                }

                var filterchainIndexOf = CommandHelper.IndexOfFilterchain(command, streamId);
                if (filterchainIndexOf > -1)
                {
                    DependecyTree.Add(Create(command, command.Filtergraph[filterchainIndexOf]));
                }
            });
        }