mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* minimize cached ffmpeg capabilities * use set intersect * try disabling work ahead on nvidia/windowspull/1489/head
14 changed files with 187 additions and 35 deletions
@ -0,0 +1,31 @@ |
|||||||
|
namespace ErsatzTV.FFmpeg.Capabilities; |
||||||
|
|
||||||
|
public record FFmpegKnownDecoder |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
|
||||||
|
private FFmpegKnownDecoder(string Name) |
||||||
|
{ |
||||||
|
this.Name = Name; |
||||||
|
} |
||||||
|
|
||||||
|
public static readonly FFmpegKnownDecoder Av1Cuvid = new("av1_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder H264Cuvid = new("h264_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder HevcCuvid = new("hevc_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder Mpeg2Cuvid = new("mpeg2_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder Mpeg4Cuvid = new("mpeg4_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder Vc1Cuvid = new("vc1_cuvid"); |
||||||
|
public static readonly FFmpegKnownDecoder Vp9Cuvid = new("vp9_cuvid"); |
||||||
|
|
||||||
|
public static IList<string> AllDecoders => |
||||||
|
new[] |
||||||
|
{ |
||||||
|
Av1Cuvid.Name, |
||||||
|
H264Cuvid.Name, |
||||||
|
HevcCuvid.Name, |
||||||
|
Mpeg2Cuvid.Name, |
||||||
|
Mpeg4Cuvid.Name, |
||||||
|
Vc1Cuvid.Name, |
||||||
|
Vp9Cuvid.Name |
||||||
|
}; |
||||||
|
} |
||||||
@ -0,0 +1,13 @@ |
|||||||
|
namespace ErsatzTV.FFmpeg.Capabilities; |
||||||
|
|
||||||
|
public record FFmpegKnownEncoder |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
|
||||||
|
private FFmpegKnownEncoder(string Name) |
||||||
|
{ |
||||||
|
this.Name = Name; |
||||||
|
} |
||||||
|
|
||||||
|
public static IList<string> AllEncoders => Array.Empty<string>(); |
||||||
|
} |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
namespace ErsatzTV.FFmpeg.Capabilities; |
||||||
|
|
||||||
|
public record FFmpegKnownFilter |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
|
||||||
|
private FFmpegKnownFilter(string Name) |
||||||
|
{ |
||||||
|
this.Name = Name; |
||||||
|
} |
||||||
|
|
||||||
|
public static readonly FFmpegKnownFilter ScaleNpp = new("scale_npp"); |
||||||
|
|
||||||
|
public static IList<string> AllFilters => |
||||||
|
new[] |
||||||
|
{ |
||||||
|
ScaleNpp.Name |
||||||
|
}; |
||||||
|
} |
||||||
@ -0,0 +1,27 @@ |
|||||||
|
namespace ErsatzTV.FFmpeg.Capabilities; |
||||||
|
|
||||||
|
public record FFmpegKnownHardwareAcceleration |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
|
||||||
|
private FFmpegKnownHardwareAcceleration(string Name) |
||||||
|
{ |
||||||
|
this.Name = Name; |
||||||
|
} |
||||||
|
|
||||||
|
public static readonly FFmpegKnownHardwareAcceleration Amf = new("amf"); |
||||||
|
public static readonly FFmpegKnownHardwareAcceleration Cuda = new("cuda"); |
||||||
|
public static readonly FFmpegKnownHardwareAcceleration Qsv = new("qsv"); |
||||||
|
public static readonly FFmpegKnownHardwareAcceleration Vaapi = new("vaapi"); |
||||||
|
public static readonly FFmpegKnownHardwareAcceleration VideoToolbox = new("videotoolbox"); |
||||||
|
|
||||||
|
public static IList<string> AllAccels => |
||||||
|
new[] |
||||||
|
{ |
||||||
|
Amf.Name, |
||||||
|
Cuda.Name, |
||||||
|
Qsv.Name, |
||||||
|
Vaapi.Name, |
||||||
|
VideoToolbox.Name |
||||||
|
}; |
||||||
|
} |
||||||
@ -0,0 +1,23 @@ |
|||||||
|
using System.Diagnostics.CodeAnalysis; |
||||||
|
|
||||||
|
namespace ErsatzTV.FFmpeg.Capabilities; |
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "IdentifierTypo")] |
||||||
|
[SuppressMessage("ReSharper", "StringLiteralTypo")] |
||||||
|
public record FFmpegKnownOption |
||||||
|
{ |
||||||
|
public string Name { get; } |
||||||
|
|
||||||
|
private FFmpegKnownOption(string Name) |
||||||
|
{ |
||||||
|
this.Name = Name; |
||||||
|
} |
||||||
|
|
||||||
|
public static readonly FFmpegKnownOption ReadrateInitialBurst = new("readrate_initial_burst"); |
||||||
|
|
||||||
|
public static IList<string> AllOptions => |
||||||
|
new[] |
||||||
|
{ |
||||||
|
ReadrateInitialBurst.Name |
||||||
|
}; |
||||||
|
} |
||||||
Loading…
Reference in new issue