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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user