mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-13 17:45:45 +00:00
39 lines
942 B
C#
39 lines
942 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FFMpegCore.FFMPEG.Arguments
|
|
{
|
|
/// <summary>
|
|
/// Represents threads parameter
|
|
/// Number of threads used for video encoding
|
|
/// </summary>
|
|
public class ThreadsArgument : Argument<int>
|
|
{
|
|
public ThreadsArgument()
|
|
{
|
|
}
|
|
|
|
public ThreadsArgument(int value) : base(value)
|
|
{
|
|
}
|
|
|
|
public ThreadsArgument(bool isMultiThreaded) :
|
|
base(isMultiThreaded
|
|
? Environment.ProcessorCount
|
|
: 1)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// String representation of the argument
|
|
/// </summary>
|
|
/// <returns>String representation of the argument</returns>
|
|
public override string GetStringValue()
|
|
{
|
|
return ArgumentsStringifier.Threads(Value);
|
|
}
|
|
}
|
|
}
|