check ffmpeg for available decoders, filters, encoders (#1183)

* check ffmpeg for available decoders, filters, encoders

* revert csproj change
This commit is contained in:
Jason Dove
2023-02-27 19:28:42 -06:00
committed by GitHub
parent eddbf07b11
commit 4d57ece30d
27 changed files with 371 additions and 94 deletions
+30
View File
@@ -0,0 +1,30 @@
namespace ErsatzTV.FFmpeg.Decoder;
public class DecoderAv1 : DecoderBase
{
// ReSharper disable IdentifierTypo
private const string Libdav1d = "libdav1d";
private const string Libaomav1 = "libaom-av1";
private readonly IReadOnlySet<string> _ffmpegDecoders;
public DecoderAv1(IReadOnlySet<string> ffmpegDecoders)
{
_ffmpegDecoders = ffmpegDecoders;
}
public override string Name
{
get
{
if (_ffmpegDecoders.Contains(Libdav1d))
{
return Libdav1d;
}
return _ffmpegDecoders.Contains(Libaomav1) ? Libaomav1 : "av1";
}
}
protected override FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Software;
}