Exemple #1
0
        private ChannelSwitcher()
        {
#if true
            _channels            = PlayoutRepository.GetChannelInfos();
            this._defaultChannel = _channels.SingleOrDefault(i => i.Special);

            this._switchers = PlayoutRepository.GetBMDSwitcherInfos();
            if (_switchers.Any())
            {
                _currentSwitcher = _switchers.Single(i => i.Id == SettingsManager.BMDSwitcherId);
                IEnumerable <BMDSwitcherInputInfo> inputs =
                    PlayoutRepository.GetSwitcherInputInfos(SettingsManager.BMDSwitcherId, false);

                foreach (var channel in _channels)
                {
                    _channelInputMap.Add(channel.Id, inputs.SingleOrDefault(i => i.ChannelId == channel.Id));
                }

                _switcherOperator = FCSPlayout.SwitcherManagement.SwitcherWrapper.Get(_currentSwitcher.Address);
                _switcherOperator.CurrentProgramChanged += _switcherOperator_CurrentProgramChanged;
            }
            else
            {
            }
#endif
        }
Exemple #2
0
 internal void Initialize(Guid switcherId)
 {
     _switcherId = switcherId;
     foreach (var item in PlayoutRepository.GetSwitcherInputInfos(switcherId))
     {
         this.SwitcherInputInfos.Add(item);
     }
 }