This commit is contained in:
Malte Rosenbjerg 2020-05-06 23:34:31 +02:00
parent 4abd656b74
commit 14ea6b1ae1
4 changed files with 20 additions and 11 deletions

View file

@ -175,4 +175,20 @@ public bool Contains<T>() where T : Argument
return false; return false;
} }
} }
public class ArgumentBuilder
{
private ArgumentBuilder()
{
}
public static ArgumentBuilder FromInputFile(string file)
{
}
}
} }

View file

@ -9,27 +9,18 @@ namespace FFMpegCore.FFMPEG.Argument
/// Represents parameter of concat argument /// Represents parameter of concat argument
/// Used for creating video from multiple images or videos /// Used for creating video from multiple images or videos
/// </summary> /// </summary>
public class ConcatArgument : Argument<IEnumerable<string>>, IEnumerable<string> public class ConcatArgument : Argument<IEnumerable<string>>
{ {
public ConcatArgument() : base(new List<string>()) { } public ConcatArgument() : base(new List<string>()) { }
public ConcatArgument(IEnumerable<string> value) : base(value) { } public ConcatArgument(IEnumerable<string> value) : base(value) { }
public IEnumerator<string> GetEnumerator()
{
return Value.GetEnumerator();
}
/// <inheritdoc/> /// <inheritdoc/>
public override string GetStringValue() public override string GetStringValue()
{ {
return $"-i \"concat:{string.Join(@"|", Value)}\""; return $"-i \"concat:{string.Join(@"|", Value)}\"";
} }
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public VideoInfo[] GetAsVideoInfo() public VideoInfo[] GetAsVideoInfo()
{ {
return Value.Select(v => new VideoInfo(v)).ToArray(); return Value.Select(v => new VideoInfo(v)).ToArray();

View file

@ -1,6 +1,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
namespace FFMpegCore.FFMPEG.Argument namespace FFMpegCore.FFMPEG.Argument
{ {
@ -29,4 +30,5 @@ public VideoInfo[] GetAsVideoInfo()
return Value.Select(v => new VideoInfo(v)).ToArray(); return Value.Select(v => new VideoInfo(v)).ToArray();
} }
} }
} }

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<NeutralLanguage>en</NeutralLanguage> <NeutralLanguage>en</NeutralLanguage>
<RepositoryUrl>https://github.com/rosenbjerg/FFMpegCore</RepositoryUrl> <RepositoryUrl>https://github.com/rosenbjerg/FFMpegCore</RepositoryUrl>
<PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl> <PackageProjectUrl>https://github.com/rosenbjerg/FFMpegCore</PackageProjectUrl>