Files
ersatztv/ErsatzTV.FFmpeg/Decoder/Cuvid/DecoderMpeg2Cuvid.cs
T
Jason DoveandGitHub 6b0ced6be9 fix nvidia watermark (#660)
* add watermark transcoding tests

* nvidia fixes

* update changelog
2022-02-28 14:21:42 -06:00

26 lines
710 B
C#

namespace ErsatzTV.FFmpeg.Decoder.Cuvid;
public class DecoderMpeg2Cuvid : DecoderBase
{
private readonly bool _contentIsInterlaced;
public DecoderMpeg2Cuvid(bool contentIsInterlaced)
{
_contentIsInterlaced = contentIsInterlaced;
}
public override string Name => "mpeg2_cuvid";
public override IList<string> InputOptions(InputFile inputFile)
{
IList<string> result = base.InputOptions(inputFile);
result.Add("-hwaccel_output_format");
result.Add("cuda");
return result;
}
protected override FrameDataLocation OutputFrameDataLocation =>
_contentIsInterlaced ? FrameDataLocation.Software : FrameDataLocation.Hardware;
}