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
This commit is contained in:
Jason Dove
2025-09-14 11:48:24 +00:00
committed by GitHub
parent 5379a893f7
commit 307b9dadd2
28 changed files with 498 additions and 17 deletions
@@ -40,6 +40,11 @@ public class FFmpegProfileEditViewModelValidator : AbstractValidator<FFmpegProfi
FFmpegProfileVideoFormat.Hevc
];
private static readonly List<FFmpegProfileVideoFormat> V4l2m2mFormats =
[
FFmpegProfileVideoFormat.H264,
FFmpegProfileVideoFormat.Hevc
];
public FFmpegProfileEditViewModelValidator()
{
RuleFor(x => x.Name).NotEmpty();
@@ -93,6 +98,14 @@ public class FFmpegProfileEditViewModelValidator : AbstractValidator<FFmpegProfi
.WithMessage("Amf supports formats (h264, hevc)");
});
When(
x => x.HardwareAcceleration == HardwareAccelerationKind.V4l2m2m,
() =>
{
RuleFor(x => x.VideoFormat).Must(c => V4l2m2mFormats.Contains(c))
.WithMessage("V4L2 M2M supports formats (h264, hevc)");
});
When(
x => x.VideoFormat == FFmpegProfileVideoFormat.Mpeg2Video,
() => RuleFor(x => x.BitDepth)