mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
840 B
25 lines
840 B
namespace ErsatzTV.FFmpeg.Decoder.Cuvid; |
|
|
|
public class DecoderVp9Cuvid : DecoderBase |
|
{ |
|
private readonly FFmpegState _ffmpegState; |
|
|
|
public DecoderVp9Cuvid(FFmpegState ffmpegState) => _ffmpegState = ffmpegState; |
|
|
|
public override string Name => "vp9_cuvid"; |
|
|
|
protected override FrameDataLocation OutputFrameDataLocation => |
|
_ffmpegState.EncoderHardwareAccelerationMode == HardwareAccelerationMode.None |
|
? FrameDataLocation.Software |
|
: FrameDataLocation.Hardware; |
|
|
|
public override IList<string> InputOptions(InputFile inputFile) |
|
{ |
|
IList<string> result = base.InputOptions(inputFile); |
|
|
|
result.Add("-hwaccel_output_format"); |
|
result.Add(_ffmpegState.EncoderHardwareAccelerationMode != HardwareAccelerationMode.None ? "cuda" : "nv12"); |
|
|
|
return result; |
|
} |
|
}
|
|
|