FFMpegCore/FFMpegCore/FFMpeg/Arguments/ThreadsArgument.cs
Malte Rosenbjerg c3b5cd997e Cleanup
Former-commit-id: 72366d573a
2020-05-09 17:53:03 +02:00

21 lines
535 B
C#

using System;
namespace FFMpegCore.Arguments
{
/// <summary>
/// Represents threads parameter
/// Number of threads used for video encoding
/// </summary>
public class ThreadsArgument : IArgument
{
public readonly int Threads;
public ThreadsArgument(int threads)
{
Threads = threads;
}
public ThreadsArgument(bool isMultiThreaded) : this(isMultiThreaded ? Environment.ProcessorCount : 1) { }
public string Text => $"-threads {Threads}";
}
}