mpv-fourier: iter2 — wire v4l2request hwdec through drmprime VO
build and publish packages / distcc-avahi-aarch64 (push) Successful in 1m29s
build and publish packages / lmcp-any (push) Successful in 10s
build and publish packages / lmcp-debian (push) Successful in 8s
build and publish packages / claude-his-any (push) Successful in 7s
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Successful in 12m53s
build and publish packages / claude-his-debian (push) Successful in 6s
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Successful in 14s
build and publish packages / mpv-fourier-aarch64 (push) Successful in 1m4s

Adds Kwiboo / Langdale's 2024-08 patches (0001-meson + 0002-vo-hwdec-drmprime)
so AV_HWDEVICE_TYPE_V4L2REQUEST flows through mpv's drmprime VO hwdec and
`--hwdec=v4l2request` engages against the dmabuf-wayland VO instead of failing
with "Could not create device". The matcher previously filtered on
AV_HWDEVICE_TYPE_DRM and rejected v4l2request even when libavcodec's hwaccel
returned a valid PRIME descriptor.

PKGBUILD: pkgrel 9 → 10, source[] picks up both new patches, prepare() applies
them before the existing 0001-vo_dmabuf_wayland cache-sync workaround,
meson build flag -Dv4l2request=enabled added so the new option compiles in.

Stacks on top of iter1 (713a856): the dma_buf cache-sync workaround stays
load-bearing for the existing vaapi_dmabuf and drmprime_dmabuf import paths;
this iter only adds the wiring for the drmprime VO's hwdec selector.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude (noether)
2026-05-15 05:47:59 +00:00
committed by Markus Fritsche
parent 948088fc28
commit ee636a6d21
3 changed files with 506 additions and 2 deletions
@@ -0,0 +1,56 @@
From 9d3bbd3651eb8405b8609e4f5e8c4978056483d0 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 18 Aug 2024 17:42:14 -0700
Subject: [PATCH 1/2] meson: add detection logic for v4l2request support
We will probably adjust this to look for a specific libavutil version after
v4l2request support is merged upstream, but this check is fine for now.
---
meson.build | 11 +++++++++++
meson.options | 1 +
2 files changed, 12 insertions(+)
diff --git a/meson.build b/meson.build
index d4c75a907f..540f279dc7 100644
--- a/meson.build
+++ b/meson.build
@@ -1444,6 +1444,16 @@ if features['ios-gl']
sources += files('video/out/hwdec/hwdec_ios_gl.m')
endif
+v4l2request = get_option('v4l2request').require(
+ cc.has_header_symbol('libavutil/hwcontext.h',
+ 'AV_HWDEVICE_TYPE_V4L2REQUEST',
+ dependencies: libavutil)
+)
+features += {'v4l2request': v4l2request.allowed()}
+if features['v4l2request']
+ sources += files('video/v4l2request.c')
+endif
+
libva = dependency('libva', version: '>= 1.1.0', required: get_option('vaapi'))
vaapi_drm = dependency('libva-drm', version: '>= 1.1.0', required:
@@ -1911,6 +1921,7 @@ summary({'cocoa': features['cocoa'] and features['swift'],
'libmpv': get_option('libmpv'),
'lua': features['lua'],
'opengl': features['gl'],
+ 'v4l2request': features['v4l2request'],
'vulkan': features['vulkan'],
'wayland': features['wayland'],
'x11': features['x11']},
diff --git a/meson.options b/meson.options
index 836d16d03f..54ec2dccfc 100644
--- a/meson.options
+++ b/meson.options
@@ -103,6 +103,7 @@ option('d3d-hwaccel', type: 'feature', value: 'auto', description: 'D3D11VA hwac
option('d3d9-hwaccel', type: 'feature', value: 'auto', description: 'DXVA2 hwaccel')
option('gl-dxinterop-d3d9', type: 'feature', value: 'auto', description: 'OpenGL/DirectX DXVA2 hwaccel')
option('ios-gl', type: 'feature', value: 'auto', description: 'iOS OpenGL ES interop support')
+option('v4l2request', type: 'feature', value: 'auto', description: 'V4L2 Request API hwaccel')
option('videotoolbox-gl', type: 'feature', value: 'auto', description: 'Videotoolbox with OpenGL')
option('videotoolbox-pl', type: 'feature', value: 'auto', description: 'Videotoolbox with libplacebo')
--
2.52.0