Files
ersatztv/ErsatzTV.FFmpeg/Decoder/DecoderAv1.cs
T
Jason DoveandGitHub 4d57ece30d check ffmpeg for available decoders, filters, encoders (#1183)
* check ffmpeg for available decoders, filters, encoders

* revert csproj change
2023-02-27 19:28:42 -06:00

31 lines
766 B
C#

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;
}