public void PreviewChanged() { long id = 0; _inputList[PreviewDropdown.value].GetInputId(out id); m_mixEffectBlock.SetPreviewInput(id); }
public void setPreviewSource(Source previewSource) { connect(); IBMDSwitcherMixEffectBlock mixEffectBlock = this.MixEffectBlocks.First(); inputs.ElementAt((int)previewSource).GetInputId(out long inputId); mixEffectBlock.SetPreviewInput(inputId); }
static void Main(string[] args) { // Create switcher discovery object IBMDSwitcherDiscovery discovery = new CBMDSwitcherDiscovery(); // Connect to switcher IBMDSwitcher switcher; _BMDSwitcherConnectToFailure failureReason; discovery.ConnectTo("192.168.10.240", out switcher, out failureReason); Console.WriteLine("Connected to switcher"); var atem = new AtemSwitcher(switcher); // Get reference to various objects IBMDSwitcherMixEffectBlock me0 = atem.MixEffectBlocks.First(); IBMDSwitcherTransitionParameters me0TransitionParams = me0 as IBMDSwitcherTransitionParameters; IBMDSwitcherTransitionWipeParameters me0WipeTransitionParams = me0 as IBMDSwitcherTransitionWipeParameters; IBMDSwitcherInput input4 = atem.SwitcherInputs .Where((i, ret) => { _BMDSwitcherPortType type; i.GetPortType(out type); return(type == _BMDSwitcherPortType.bmdSwitcherPortTypeExternal); }) .ElementAt(4); // Setup the transition Console.WriteLine("Setting preview input"); me0.SetPreviewInput(GetInputId(input4)); Console.WriteLine("Setting next transition selection"); me0TransitionParams.SetNextTransitionSelection(_BMDSwitcherTransitionSelection.bmdSwitcherTransitionSelectionBackground); Console.WriteLine("Setting next transition style"); me0TransitionParams.SetNextTransitionStyle(_BMDSwitcherTransitionStyle.bmdSwitcherTransitionStyleWipe); Console.WriteLine("Setting transition style"); me0WipeTransitionParams.SetPattern(_BMDSwitcherPatternStyle.bmdSwitcherPatternStyleRectangleIris); Console.WriteLine("Setting transition rate"); me0WipeTransitionParams.SetRate(60); // Perform the transition Console.WriteLine("Performing auto transition"); me0.PerformAutoTransition(); System.Threading.Thread.Sleep(2000); System.Threading.Thread.Sleep(1000); me0.PerformAutoTransition(); Console.Write("Press ENTER to exit..."); Console.ReadLine(); }
public void SwitchView(long inputId, bool switchFast = false) { if (m_mixEffectBlock1 != null) { m_mixEffectBlock1.SetPreviewInput(inputId); } if (m_mixEffectBlock1 != null) { if (switchFast == false) { m_mixEffectBlock1.PerformAutoTransition(); } else { m_mixEffectBlock1.PerformCut(); } } }