private void button1_Click(object sender, EventArgs e) { if (deviceManager == null) { deviceManager = new DeckLinkDeviceManager(); deviceManager.InputDeviceArrived += DeviceManager_DeviceArrived; deviceManager.InputDeviceRemoved += DeviceManager_DeviceRemoved; deviceManager.Startup(); } //var inputs = deviceManager.GetDeckLinkInputs(); // Task.Run(() => // { // while (true) // { // var inputs = deviceManager.GetDeckLinkInputs(); // // var inputs = deviceManager.GetDeckLinkInputs(); // logger.Debug(inputs.Count); // Thread.Sleep(2000); // } //}); }
private void buttonDiscoveryStop_Click(object sender, EventArgs e) { if (deviceManager != null) { deviceManager.InputDeviceArrived -= DeviceManager_DeviceArrived; deviceManager.InputDeviceRemoved -= DeviceManager_DeviceRemoved; deviceManager.Shutdown(); deviceManager = null; } }