* fix subtitles test and nvidia subtitles * new ffmpeg pipelines; software and nvidia * partial qsv * fix qsv * fix software pipeline * add vaapi pipeline * fix qsv 10-bit h264 output * nvidia fixes * properly disable 10-bit h264 hardware encoders * more nvidia fixes * add video toolbox pipeline
23 lines
717 B
C#
23 lines
717 B
C#
using ErsatzTV.FFmpeg.Format;
|
|
|
|
namespace ErsatzTV.FFmpeg.Decoder;
|
|
|
|
public class DecoderVaapi : DecoderBase
|
|
{
|
|
protected override FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Hardware;
|
|
|
|
public override string Name => "implicit_vaapi";
|
|
|
|
public override IList<string> InputOptions(InputFile inputFile) =>
|
|
new List<string> { "-hwaccel_output_format", "vaapi" };
|
|
|
|
public override FrameState NextState(FrameState currentState)
|
|
{
|
|
FrameState nextState = base.NextState(currentState);
|
|
|
|
return currentState.PixelFormat.Match(
|
|
pixelFormat => nextState with { PixelFormat = new PixelFormatNv12(pixelFormat.Name) },
|
|
() => nextState);
|
|
}
|
|
}
|