Ejemplo n.º 1
0
        private void StoreVideoSource(InputPropertiesGetCommand cmd)
        {
            if (cmd.Id > VideoSource.Input20 || cmd.Id < VideoSource.Input1)
            {
                return;
            }

            Profile.Sources.RemoveAll(d => d.Id == cmd.Id);

            Profile.Sources.Add(new DevicePort
            {
                Id   = cmd.Id,
                Port = cmd.AvailableExternalPorts.FindFlagComponents(), //.ToExternalPortTypes().ToList(),
            });
            Profile.Sources.Sort((a, b) => a.Id.CompareTo(b.Id));
        }
Ejemplo n.º 2
0
        private void StoreVideoSource(InputPropertiesGetCommand cmd)
        {
            if (cmd.Id > VideoSource.Input20 || cmd.Id < VideoSource.Input1)
            {
                return;
            }

            Profile.Sources.RemoveAll(d => d.Id == cmd.Id);

            Profile.Sources.Add(new DevicePort
            {
                Id   = cmd.Id,
                Port = cmd.ExternalPorts,
            });
            Profile.Sources.Sort((a, b) => a.Id.CompareTo(b.Id));
        }
Ejemplo n.º 3
0
        private void OnInput(InputPropertiesGetCommand inputPropertiesGetCommand)
        {
            if (AtemStatus.Inputs.Any(I => I.Id == inputPropertiesGetCommand.Id.ToString()))
            {
                Log.LogInformation("Input already registrated '{input}'", inputPropertiesGetCommand.Id);
                return;
            }

            var input = new Input()
            {
                Id        = inputPropertiesGetCommand.Id.ToString(),
                LongName  = inputPropertiesGetCommand.LongName,
                ShortName = inputPropertiesGetCommand.ShortName,
                Preview   = false,
                Program   = false,
                Mixer     = new List <Mixer>()
            };

            if (AtemSettings.ME1 && AtemSettings.ME1Inputs.Any(i => i == inputPropertiesGetCommand.Id.ToString()))
            {
                input.NewMixer(MixEffectBlockId.One);
            }

            if (AtemSettings.ME2 && AtemSettings.ME2Inputs.Any(i => i == inputPropertiesGetCommand.Id.ToString()))
            {
                input.NewMixer(MixEffectBlockId.Two);
            }

            if (AtemSettings.ME3 && AtemSettings.ME3Inputs.Any(i => i == inputPropertiesGetCommand.Id.ToString()))
            {
                input.NewMixer(MixEffectBlockId.Three);
            }

            if (AtemSettings.ME4 && AtemSettings.ME4Inputs.Any(i => i == inputPropertiesGetCommand.Id.ToString()))
            {
                input.NewMixer(MixEffectBlockId.Four);
            }

            Log.LogInformation("Registrated Input '{input}' / '{name}'", input.Id, input.LongName);

            AtemStatus.Inputs.Add(input);
        }