Former-commit-id: 4e85482988
This commit is contained in:
Victor Horobchuk 2021-03-18 21:37:02 +02:00
parent d0afc5001b
commit 93496db720
4 changed files with 13 additions and 17 deletions

View file

@ -1,13 +1,13 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.28307.329 VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1 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 EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore.Test", "FFMpegCore.Test\FFMpegCore.Test.csproj", "{F20C8353-72D9-454B-9F16-3624DBAD2328}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FFMpegCore.Test", "FFMpegCore.Test\FFMpegCore.Test.csproj", "{F20C8353-72D9-454B-9F16-3624DBAD2328}"
EndProject 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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View file

@ -5,7 +5,7 @@
namespace FFMpegCore.Arguments namespace FFMpegCore.Arguments
{ {
public class SetMirrorVideo : IArgument public class SetMirrorVideo : IVideoFilterArgument
{ {
public SetMirrorVideo(Mirror value) public SetMirrorVideo(Mirror value)
{ {
@ -14,16 +14,18 @@ public SetMirrorVideo(Mirror value)
public Mirror _value { get; set; } public Mirror _value { get; set; }
public string Text public string Key => string.Empty;
public string Value
{ {
get get
{ {
switch (_value) switch (_value)
{ {
case Mirror.Horizontall: case Mirror.Horizontall:
return "-vf \"hflip\""; return "hflip";
case Mirror.Verticall: case Mirror.Verticall:
return "-vf \"vflip\""; return "vflip";
default: default:
throw new Exception("SetMirrorVideo: argument not found"); throw new Exception("SetMirrorVideo: argument not found");
} }

View file

@ -4,9 +4,9 @@
namespace FFMpegCore.Enums namespace FFMpegCore.Enums
{ {
public enum Mirror : byte public enum Mirror
{ {
Verticall = 1, Verticall,
Horizontall = 2 Horizontall
} }
} }

View file

@ -57,12 +57,6 @@ private FFMpegArgumentProcessor ToProcessor(IOutputArgument argument, Action<FFM
{ {
var args = new FFMpegArgumentOptions(); var args = new FFMpegArgumentOptions();
addArguments?.Invoke(args); addArguments?.Invoke(args);
if (argument is OutputPipeArgument && !Arguments.Any(x => x is ForceFormatArgument))
{
args.ForceFormat("matroska");
}
Arguments.AddRange(args.Arguments); Arguments.AddRange(args.Arguments);
Arguments.Add(argument); Arguments.Add(argument);
return new FFMpegArgumentProcessor(this); return new FFMpegArgumentProcessor(this);