Esempio n. 1
0
        private void AddVideoEffects()
        {
            if (cbResizeEnabled.Checked)
            {
                var resize = new GSTResize(
                    Convert.ToInt32(edResizeWidth.Text),
                    Convert.ToInt32(edResizeHeight.Text))
                {
                    Letterbox = cbResizeLetterbox.Checked,
                    Method    = (GSTVideoScaleMethod)cbResizeMethod.SelectedIndex
                };
                _player.Video_Effects_AddOrUpdate(resize);
            }

            if (cbDeinterlaceEnabled.Checked)
            {
                UpdateDeinterlace();
            }

            if (cbVideoBalanceEnabled.Checked)
            {
                UpdateColorBalance();
            }

            if (cbColorEffectEnabled.Checked)
            {
                UpdateColorEffect();
            }

            if (cbFlipRotateEnabled.Checked)
            {
                UpdateFlipRotate();
            }

            if (cbGaussianBlurEnabled.Checked)
            {
                UpdateGaussianBlur();
            }

            if (cbFishEyeEnabled.Checked)
            {
                var fishEye = new GSTFishEye();
                _player.Video_Effects_AddOrUpdate(fishEye);
            }

            if (cbTextOverlayEnabled.Checked)
            {
                UpdateTextOverlay();
            }

            if (cbImageOverlayEnabled.Checked)
            {
                UpdateImageOverlay();
            }
        }