FFMpegCore/FFMpegCore/FFOptions.cs
Malte Rosenbjerg 693acabac4 Cleanup after splitting into two packages (#386)
* Move PosterWithAudio to FFMpegCore

* Reduce windows only tests

* Update Directory.Build.props

* Create .editorconfig

* More cleanup

* Enable implicit usings

* Remove unused method

* Apply dotnet format

* Fix unused variable in AudioGateArgument

* Fix boolean conditions in AudioGateArgument

* Merge boolean conditions into pattern

* Use target-typed new

* Add linting to CI

* Add CUDA to HardwareAccelerationDevice enum

* Increase timeout for Video_Join_Image_Sequence

* Adjust Video_Join_Image_Sequence timeout

* Fix expected seconds in Video_Join_Image_Sequence

* Increase timeout for Video_TranscodeToMemory due to macos agents

Former-commit-id: f9f7161686
2023-02-02 21:19:45 +01:00

58 lines
1.9 KiB
C#

using System.Text;
using FFMpegCore.Enums;
namespace FFMpegCore
{
public class FFOptions : ICloneable
{
/// <summary>
/// Working directory for the ffmpeg/ffprobe instance
/// </summary>
public string WorkingDirectory { get; set; } = string.Empty;
/// <summary>
/// Folder container ffmpeg and ffprobe binaries. Leave empty if ffmpeg and ffprobe are present in PATH
/// </summary>
public string BinaryFolder { get; set; } = string.Empty;
/// <summary>
/// Folder used for temporary files necessary for static methods on FFMpeg class
/// </summary>
public string TemporaryFilesFolder { get; set; } = Path.GetTempPath();
/// <summary>
/// Encoding used for parsing stdout/stderr on ffmpeg and ffprobe processes
/// </summary>
public Encoding Encoding { get; set; } = Encoding.Default;
/// <summary>
/// The log level to use when calling of the ffmpeg executable.
/// <para>
/// This option can be overridden before an execution of a Process command
/// to set the log level for that command.
/// </para>
/// </summary>
public FFMpegLogLevel? LogLevel { get; set; }
/// <summary>
///
/// </summary>
public Dictionary<string, string> ExtensionOverrides { get; set; } = new()
{
{ "mpegts", ".ts" },
};
/// <summary>
/// Whether to cache calls to get ffmpeg codec, pixel- and container-formats
/// </summary>
public bool UseCache { get; set; } = true;
/// <inheritdoc/>
object ICloneable.Clone() => Clone();
/// <summary>
/// Creates a new object that is a copy of the current instance.
/// </summary>
public FFOptions Clone() => (FFOptions)MemberwiseClone();
}
}