Exemplo n.º 1
0
 public FairlightAudioMixer GetFairlightAudioMixer()
 {
     if (_fairlightAudioMixer == null)
     {
         _fairlightAudioMixer = new FairlightAudioMixer(SwitcherDirect.GetFairlightAudioMixer(), _mediator);
     }
     return(_fairlightAudioMixer);
 }
Exemplo n.º 2
0
 public IEnumerable <Input> GetInputs()
 {
     if (_inputs == null)
     {
         var inputs = SwitcherDirect.GetInputs();
         _inputs = new List <Input>(inputs.ToList().Select(c => new Input(c)));
     }
     return(_inputs);
 }
Exemplo n.º 3
0
        public StreamRTMP GetStreamRTMP()
        {
            if (_streamRTMP == null)
            {
                _streamRTMP = new StreamRTMP(SwitcherDirect.GetStreamRTMP(), _mediator);
            }

            return(_streamRTMP);
        }
Exemplo n.º 4
0
 public IEnumerable <DownstreamKey> GetDownstreamKeys()
 {
     if (_downstreamKeys == null)
     {
         var items = SwitcherDirect.GetDownstreamKeys();
         _downstreamKeys = new List <DownstreamKey>(items.ToList().Select(c => new DownstreamKey(c, _mediator)));
     }
     return(_downstreamKeys);
 }
Exemplo n.º 5
0
        public IEnumerable <MixEffectBlock> GetMixEffectBlocks()
        {
            if (_mixEffectBlocks == null)
            {
                var items = SwitcherDirect.GetMixEffectBlocks();
                _mixEffectBlocks = new List <MixEffectBlock>(items
                                                             .ToList()
                                                             .Select(c => new MixEffectBlock(this, c, _mediator)));
            }

            return(_mixEffectBlocks);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Macros with a name in the system
        /// </summary>
        /// <remarks>
        /// Unlike other aspects that are fixed parts of the hardware, inputs, mix blocks etc., macros are
        /// dynamic and are retrieved on every call to this function.
        /// </remarks>
        /// <returns></returns>
        public IEnumerable <Macro> GetMacros()
        {
            var result = new List <Macro>();

            if (_macroPool == null)
            {
                _macroPool = SwitcherDirect.GetMacroPool();
                _macroPool.AddCallback(new MacroPoolCallback(_mediator));
            }
            _macroPool.GetMaxCount(out uint maxCount);
            for (uint i = 0; i < maxCount; i++)
            {
                _macroPool.GetName(i, out string name);
                _macroPool.IsValid(i, out int valid);
                if (valid == 1 && !string.IsNullOrEmpty(name))
                {
                    _macroPool.GetDescription(i, out string description);
                    result.Add(new Macro {
                        Id = i, Name = name, Description = description
                    });
                }
            }
            return(result);
        }