コード例 #1
0
 internal void SetUSK1ForNextTrans(bool v, BMDSwitcherState state)
 {
     if (v)
     {
         if (state.USK1OnAir)
         {
             multiviewerWindow?.SetUSK1PreviewOff();
         }
         else
         {
             multiviewerWindow?.SetUSK1PreviewOn();
         }
     }
     else
     {
         if (state.USK1OnAir)
         {
             multiviewerWindow?.SetUSK1PreviewOn();
         }
         else
         {
             multiviewerWindow?.SetUSK1PreviewOff();
         }
     }
 }
コード例 #2
0
 public void PerformAutoTransition()
 {
     _state = mockMultiviewer.PerformAutoTransition(_state);
     if (_state.TransNextKey1)
     {
         _state.USK1OnAir = !_state.USK1OnAir;
     }
     SwitcherStateChanged?.Invoke(_state);
 }
コード例 #3
0
 public bool IsDifferentShot(BMDSwitcherState oldstate)
 {
     // for now only look at program output
     if (this.ProgramID != oldstate.ProgramID)
     {
         return(true);
     }
     return(false);
 }
コード例 #4
0
 internal void SetUSK1OnAir(BMDSwitcherState state)
 {
     if (state.TransNextKey1)
     {
         multiviewerWindow.SetUSK1PreviewOff();
     }
     else
     {
         multiviewerWindow.SetUSK1PreviewOn();
     }
     multiviewerWindow?.SetUSK1ProgramOn();
 }
コード例 #5
0
        public BMDSwitcherState PerformAutoTransition(BMDSwitcherState state)
        {
            // take selected layers

            if (state.TransNextKey1)
            {
                if (state.USK1OnAir)
                {
                    multiviewerWindow.SetUSK1ProgramOff();
                    multiviewerWindow.SetUSK1PreviewOn();
                }
                else
                {
                    multiviewerWindow.SetUSK1ProgramOn();
                    multiviewerWindow.SetUSK1PreviewOff();
                }
            }

            // take all tied keyers
            if (state.DSK1Tie)
            {
                state.DSK1OnAir = !state.DSK1OnAir;
                FadeDSK1(state.DSK1OnAir);
                multiviewerWindow.ForcePresetTieDSK1(state.DSK1Tie && !state.DSK1OnAir);
            }
            if (state.DSK2Tie)
            {
                state.DSK2OnAir = !state.DSK2OnAir;
                FadeDSK2(state.DSK2OnAir);
                multiviewerWindow.ForcePresetTieDSK2(state.DSK2Tie && !state.DSK2OnAir);
            }

            // swap sources
            if (state.TransNextBackground)
            {
                long programID = state.ProgramID;
                long presetID  = state.PresetID;

                state.ProgramID = presetID;
                state.PresetID  = programID;

                multiviewerWindow.CrossFadeTransition(state);
            }

            return(state);
        }
コード例 #6
0
        public MockBMDSwitcherManager(MainWindow parent)
        {
            _state = new BMDSwitcherState();
            _state.SetDefault();
            Dictionary <int, string> mapping = new Dictionary <int, string>()
            {
                [1] = "cam1",
                [2] = "pres",
                [3] = "key",
                [4] = "slide",
                [5] = "organ",
                [6] = "right",
                [7] = "center",
                [8] = "left"
            };

            mockMultiviewer = new MockMultiviewer(mapping, parent.Config);
            parent.PresentationStateUpdated += Parent_PresentationStateUpdated;
        }