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(); } } }
public void AutoButton() { m_mixEffectBlock.PerformAutoTransition(); }
private void autoBut_Click(object sender, RoutedEventArgs e) { if (m_mixEffectBlock1 != null) { m_mixEffectBlock1.PerformAutoTransition(); //System.Threading.Thread.Sleep(500); } }