private static MixEffectState.KeyerDVEState BuildKeyerDVE(IBMDSwitcherKeyDVEParameters props) { var state = new MixEffectState.KeyerDVEState(); props.GetShadow(out int shadow); state.BorderShadowEnabled = shadow != 0; props.GetLightSourceDirection(out double deg); state.LightSourceDirection = deg; props.GetLightSourceAltitude(out double alt); state.LightSourceAltitude = (uint)Math.Round(alt * 100); props.GetBorderEnabled(out int on); state.BorderEnabled = on != 0; props.GetBorderBevel(out _BMDSwitcherBorderBevelOption bevel); state.BorderBevel = AtemEnumMaps.BorderBevelMap.FindByValue(bevel); props.GetBorderWidthIn(out double widthIn); state.BorderInnerWidth = widthIn; props.GetBorderWidthOut(out double widthOut); state.BorderOuterWidth = widthOut; props.GetBorderSoftnessIn(out double softIn); state.BorderInnerSoftness = (uint)Math.Round(softIn * 100); props.GetBorderSoftnessOut(out double softOut); state.BorderOuterSoftness = (uint)Math.Round(softOut * 100); props.GetBorderBevelSoftness(out double bevelSoft); state.BorderBevelSoftness = (uint)Math.Round(bevelSoft * 100); props.GetBorderBevelPosition(out double bevelPosition); state.BorderBevelPosition = (uint)Math.Round(bevelPosition * 100); props.GetBorderOpacity(out double opacity); state.BorderOpacity = (uint)Math.Round(opacity * 100); props.GetBorderHue(out double hue); state.BorderHue = hue; props.GetBorderSaturation(out double sat); state.BorderSaturation = sat * 100; props.GetBorderLuma(out double luma); state.BorderLuma = luma * 100; props.GetMasked(out int enabled); state.MaskEnabled = enabled != 0; props.GetMaskTop(out double top); state.MaskTop = top; props.GetMaskBottom(out double bottom); state.MaskBottom = bottom; props.GetMaskLeft(out double left); state.MaskLeft = left; props.GetMaskRight(out double right); state.MaskRight = right; return(state); }
private static void BuildKeyerFly(MixEffectState.KeyerDVEState state, IBMDSwitcherKeyFlyParameters props) { props.GetCanScaleUp(out int canScaleUp); // state.CanScaleUp = canScaleUp != 0; props.GetCanRotate(out int canRotate); // state.CanRotate = canRotate != 0; props.GetRate(out uint rate); state.Rate = rate; props.GetSizeX(out double sizeX); state.SizeX = sizeX; props.GetSizeY(out double sizeY); state.SizeY = sizeY; props.GetPositionX(out double positionX); state.PositionX = positionX; props.GetPositionY(out double positionY); state.PositionY = positionY; props.GetRotation(out double rotation); state.Rotation = rotation; }