From 93496db720b2a5814a5815ee98126b11daf256bc Mon Sep 17 00:00:00 2001 From: Victor Horobchuk Date: Thu, 18 Mar 2021 21:37:02 +0200 Subject: [PATCH] Update Former-commit-id: 4e8548298813016a967b8e1a101abf7371e85e69 --- FFMpegCore.sln | 8 ++++---- FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs | 10 ++++++---- FFMpegCore/FFMpeg/Enums/Mirror.cs | 6 +++--- FFMpegCore/FFMpeg/FFMpegArguments.cs | 6 ------ 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/FFMpegCore.sln b/FFMpegCore.sln index 27eab0a..7a27980 100644 --- a/FFMpegCore.sln +++ b/FFMpegCore.sln @@ -1,13 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.329 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31005.135 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFMpegCore", "FFMpegCore\FFMpegCore.csproj", "{19DE2EC2-9955-4712-8096-C22EF6713E4F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore", "FFMpegCore\FFMpegCore.csproj", "{19DE2EC2-9955-4712-8096-C22EF6713E4F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore.Test", "FFMpegCore.Test\FFMpegCore.Test.csproj", "{F20C8353-72D9-454B-9F16-3624DBAD2328}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FFMpegCore.Examples", "FFMpegCore.Examples\FFMpegCore.Examples.csproj", "{3125CF91-FFBD-4E4E-8930-247116AFE772}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore.Examples", "FFMpegCore.Examples\FFMpegCore.Examples.csproj", "{3125CF91-FFBD-4E4E-8930-247116AFE772}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs index 91ab1c4..94fbd0f 100644 --- a/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs +++ b/FFMpegCore/FFMpeg/Arguments/SetMirrorVideo.cs @@ -5,7 +5,7 @@ namespace FFMpegCore.Arguments { - public class SetMirrorVideo : IArgument + public class SetMirrorVideo : IVideoFilterArgument { public SetMirrorVideo(Mirror value) { @@ -14,16 +14,18 @@ public SetMirrorVideo(Mirror value) public Mirror _value { get; set; } - public string Text + public string Key => string.Empty; + + public string Value { get { switch (_value) { case Mirror.Horizontall: - return "-vf \"hflip\""; + return "hflip"; case Mirror.Verticall: - return "-vf \"vflip\""; + return "vflip"; default: throw new Exception("SetMirrorVideo: argument not found"); } diff --git a/FFMpegCore/FFMpeg/Enums/Mirror.cs b/FFMpegCore/FFMpeg/Enums/Mirror.cs index da5523c..e091c5b 100644 --- a/FFMpegCore/FFMpeg/Enums/Mirror.cs +++ b/FFMpegCore/FFMpeg/Enums/Mirror.cs @@ -4,9 +4,9 @@ namespace FFMpegCore.Enums { - public enum Mirror : byte + public enum Mirror { - Verticall = 1, - Horizontall = 2 + Verticall, + Horizontall } } diff --git a/FFMpegCore/FFMpeg/FFMpegArguments.cs b/FFMpegCore/FFMpeg/FFMpegArguments.cs index 5aa913d..847e68c 100644 --- a/FFMpegCore/FFMpeg/FFMpegArguments.cs +++ b/FFMpegCore/FFMpeg/FFMpegArguments.cs @@ -57,12 +57,6 @@ private FFMpegArgumentProcessor ToProcessor(IOutputArgument argument, Action x is ForceFormatArgument)) - { - args.ForceFormat("matroska"); - } - Arguments.AddRange(args.Arguments); Arguments.Add(argument); return new FFMpegArgumentProcessor(this);