public void Shutdown() { logger.Debug("DeckLinkDeviceManager::Shutdown()"); Started = false; if (deckLinkDiscovery != null) { deckLinkDiscovery.UninstallDeviceNotifications(); var refCount = Marshal.ReleaseComObject(deckLinkDiscovery); Debug.Assert(refCount == 0, "refCount == 0"); deckLinkDiscovery = null; } if (inputDevices.Count > 0) { for (int i = 0; i < inputDevices.Count; i++) { var inputDevice = inputDevices[i]; if (inputDevice != null) { inputDevice.Dispose(); inputDevice = null; } } } }
public bool Startup() { logger.Debug("DeckLinkDeviceManager::Startup()"); if (Started) { Debug.Assert(deckLinkDiscovery != null, "deckLinkDiscovery!=null"); return(Started); } try { deckLinkDiscovery = new CDeckLinkDiscovery(); deckLinkDiscovery.InstallDeviceNotifications(this); Started = true; } catch (Exception ex) { logger.Error(ex); Started = false; } return(Started); }
public Form1() { InitializeComponent(); _Discovery = new CDeckLinkDiscovery(); _GLHelper = new CDeckLinkGLScreenPreviewHelper(); if (_Discovery != null) { _Discovery.InstallDeviceNotifications(this); } find.Enabled = false; stream.Enabled = false; notifications.Text = "Please wait 2 seconds for the preview box to initialise..."; _GLHack.Interval = TimeSpan.FromSeconds(2).TotalMilliseconds; _GLHack.Elapsed += DelayedLoad; _GLHack.AutoReset = false; }
public DeckLinkDeviceDiscovery() { m_deckLinkDiscovery = new CDeckLinkDiscovery(); }
public DeckLinkDeviceDiscovery(IObserver <IDeckLink> observer) { Observer = observer; DeckLinkDiscovery = new CDeckLinkDiscovery(); DeckLinkDiscovery.InstallDeviceNotifications(this); }