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.
26 lines
741 B
26 lines
741 B
using ErsatzTV.FFmpeg.Format; |
|
|
|
namespace ErsatzTV.FFmpeg.Encoder.Vaapi; |
|
|
|
public class EncoderHevcVaapi : EncoderBase |
|
{ |
|
private readonly FrameState _currentState; |
|
|
|
public EncoderHevcVaapi(FrameState currentState) |
|
{ |
|
_currentState = currentState; |
|
} |
|
|
|
public override FrameState NextState(FrameState currentState) => currentState with |
|
{ |
|
VideoFormat = VideoFormat.Hevc, |
|
FrameDataLocation = FrameDataLocation.Hardware |
|
}; |
|
|
|
public override string Name => "hevc_vaapi"; |
|
public override StreamKind Kind => StreamKind.Video; |
|
|
|
public override string Filter => _currentState.FrameDataLocation == FrameDataLocation.Software |
|
? "format=nv12|vaapi,hwupload" |
|
: string.Empty; |
|
}
|
|
|