From d0afc5001b468f5889a30787ff141927d7efb05b Mon Sep 17 00:00:00 2001 From: Victor Horobchuk Date: Wed, 17 Mar 2021 09:58:01 +0200 Subject: [PATCH] Update Former-commit-id: ab8be5cd57318d7b6e948afed23c136faa6d6a68 --- FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs | 27 +++++++++++++++++-- FFMpegCore/FFMpeg/Enums/Mirror.cs | 12 +++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 FFMpegCore/FFMpeg/Enums/Mirror.cs diff --git a/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs index 4c18cef..91ab1c4 100644 --- a/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs +++ b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs @@ -1,4 +1,5 @@ -using System; +using FFMpegCore.Enums; +using System; using System.Collections.Generic; using System.Text; @@ -6,6 +7,28 @@ namespace FFMpegCore.Arguments { public class SetMirrorVideo : IArgument { - public string Text { get; set; } = "-vf \"hflip\""; + public SetMirrorVideo(Mirror value) + { + _value = value; + } + + public Mirror _value { get; set; } + + public string Text + { + get + { + switch (_value) + { + case Mirror.Horizontall: + return "-vf \"hflip\""; + case Mirror.Verticall: + return "-vf \"vflip\""; + default: + throw new Exception("SetMirrorVideo: argument not found"); + } + + } + } } } diff --git a/FFMpegCore/FFMpeg/Enums/Mirror.cs b/FFMpegCore/FFMpeg/Enums/Mirror.cs new file mode 100644 index 0000000..da5523c --- /dev/null +++ b/FFMpegCore/FFMpeg/Enums/Mirror.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace FFMpegCore.Enums +{ + public enum Mirror : byte + { + Verticall = 1, + Horizontall = 2 + } +}