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.
39 lines
1.0 KiB
39 lines
1.0 KiB
namespace ErsatzTV.FFmpeg.Decoder.Cuvid; |
|
|
|
public class DecoderVp9Cuvid : DecoderBase |
|
{ |
|
private readonly FrameState _desiredState; |
|
|
|
public DecoderVp9Cuvid(FrameState desiredState) |
|
{ |
|
_desiredState = desiredState; |
|
} |
|
|
|
public override string Name => "vp9_cuvid"; |
|
public override IList<string> InputOptions |
|
{ |
|
get |
|
{ |
|
IList<string> result = base.InputOptions; |
|
|
|
if (_desiredState.Deinterlaced) |
|
{ |
|
result.Add("-deint"); |
|
result.Add("2"); |
|
} |
|
|
|
result.Add("-hwaccel_output_format"); |
|
result.Add("cuda"); |
|
|
|
return result; |
|
} |
|
} |
|
|
|
protected override FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Hardware; |
|
|
|
public override FrameState NextState(FrameState currentState) |
|
{ |
|
FrameState result = base.NextState(currentState); |
|
return _desiredState.Deinterlaced ? result with { Deinterlaced = true } : result; |
|
} |
|
}
|
|
|