public static IBMDSwitcherMixEffectBlock GetMixEffectBlock(this IBMDSwitcher switcher, int index) { IBMDSwitcherMixEffectBlockIterator mixEffectBlockIterator = switcher.GetMixEffectBlockIterator(); if (mixEffectBlockIterator == null) { return(null); } IBMDSwitcherMixEffectBlock mixEffectBlock; mixEffectBlockIterator.Next(out mixEffectBlock); int i = 0; if (mixEffectBlockIterator != null) { if (i == index) { return(mixEffectBlock); } mixEffectBlockIterator.Next(out mixEffectBlock); i++; } return(null); }
public static List <IBMDSwitcherMixEffectBlock> GetAllMixEffectBlocks(this IBMDSwitcher switcher) { IBMDSwitcherMixEffectBlockIterator mixEffectBlockIterator = switcher.GetMixEffectBlockIterator(); if (mixEffectBlockIterator == null) { return(null); } List <IBMDSwitcherMixEffectBlock> mixEffectBlocks = new List <IBMDSwitcherMixEffectBlock>(); IBMDSwitcherMixEffectBlock mixEffectBlock; mixEffectBlockIterator.Next(out mixEffectBlock); while (mixEffectBlock != null) { mixEffectBlocks.Add(mixEffectBlock); mixEffectBlockIterator.Next(out mixEffectBlock); } return(mixEffectBlocks); }