Files
ersatztv/ErsatzTV.FFmpeg/Decoder/V4l2m2m/DecoderVp9V4l2m2m.cs
T
Jason DoveandGitHub 307b9dadd2 partial v4l2m2m accel support (#2416)
* start to add v4l2m2m accel

* add v4l2m2m pipeline

* add encoders

* fix decoders and encoders

* output software frames from decoders

* more buffers

* hide v4l2m2m from ui
2025-09-14 11:48:24 +00:00

28 lines
811 B
C#

using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.Decoder.V4l2m2m;
public class DecoderVp9V4l2m2m : DecoderBase
{
public override string Name => "vp9_v4l2m2m";
protected override FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Software;
public override FrameState NextState(FrameState currentState)
{
FrameState nextState = base.NextState(currentState);
return currentState.PixelFormat.Match(
pixelFormat =>
{
if (pixelFormat.BitDepth == 10)
{
return nextState with { PixelFormat = new PixelFormatP010() };
}
return nextState with { PixelFormat = new PixelFormatNv12(pixelFormat.Name) };
},
() => nextState);
}
}