Esempio n. 1
0
        /// <summary>
        /// merges the given Filterchain to the Filtergraph
        /// </summary>
        /// <param name="filterchain">the filterchain to be added to the filtergraph</param>
        /// <param name="optionType">the option specifying how the merge should declare a winner</param>
        public Filtergraph Merge(Filterchain filterchain, FFmpegMergeOptionType optionType)
        {
            var indexOfItem = IndexOf(filterchain);

            if (indexOfItem != -1 && optionType == FFmpegMergeOptionType.NewWins)
            {
                FilterchainList.RemoveAt(indexOfItem);
                filterchain.Owner = this;
                FilterchainList.Insert(indexOfItem, filterchain);
            }
            else if (indexOfItem == -1)
            {
                Add(filterchain);
            }

            return(this);
        }
Esempio n. 2
0
 /// <summary>
 /// removes the Filterchain at the given index from the Filtergraph
 /// </summary>
 /// <param name="index">the index of the desired Filterchain to be removed from the Filtergraph</param>
 public Filtergraph RemoveAt(int index)
 {
     FilterchainList.RemoveAt(index);
     return(this);
 }