示例#1
0
        private void SwitcherDisconnected()
        {
            IsConnected = false;

            // Remove all input monitors, remove callbacks
            foreach (InputMonitor inputMon in m_inputMonitors)
            {
                inputMon.Input.RemoveCallback(inputMon);
                inputMon.LongNameChanged -= new SwitcherEventHandler(OnInputLongNameChanged);
            }
            m_inputMonitors.Clear();

            if (m_mixEffectBlock1 != null)
            {
                // Remove callback
                m_mixEffectBlock1.RemoveCallback(m_mixEffectBlockMonitor);

                // Release reference
                m_mixEffectBlock1 = null;
            }

            if (m_switcher != null)
            {
                // Remove callback:
                m_switcher.RemoveCallback(m_switcherMonitor);

                // release reference:
                m_switcher = null;
            }
        }
示例#2
0
 public void Dispose()
 {
     lock (_lock)
     {
         if (_switcher != null)
         {
             _switcher.RemoveCallback(this);
             _switcher = null;
         }
     }
 }
示例#3
0
        private void SwitcherDisconnected()
        {
            if (m_switcher != null)
            {
                // Remove callback:
                m_switcher.RemoveCallback(this);

                // release reference:
                m_switcher = null;
            }

            nullifyMixEffectsBlocks();
            DisconnectedEvent?.Invoke(this, new EventArgs());
        }
示例#4
0
 public void Disconnect()
 {
     if (switcher == null)
     {
         return;
     }
     switcher.RemoveCallback(switcherMonitor);
     switcher = null;
     foreach (var item in inputs)
     {
         item.Dispose();
     }
     inputs.Clear();
 }
示例#5
0
        private void SwitcherDisconnected()
        {
            if (m_mixEffectBlock1 != null)
            {
                // Remove callback
                m_mixEffectBlock1.RemoveCallback(m_mixEffectBlockMonitor);

                // Release reference
                m_mixEffectBlock1 = null;
            }

            if (m_switcher != null)
            {
                // Remove callback:
                m_switcher.RemoveCallback(m_switcherMonitor);

                // release reference:
                m_switcher = null;
            }
        }