summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-07-31 12:59:15 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-08-03 16:56:17 -0700
commit64f4249604a99f19edd45ee1412a689259c685a6 (patch)
tree4c64dfa596e7ea8d85aa031f7bd959dc2e29ec0c /meson.build
parente9e50595895f3b467f36de2babdfdd8f3ba85452 (diff)
downloadmpv-64f4249604a99f19edd45ee1412a689259c685a6.tar.bz2
mpv-64f4249604a99f19edd45ee1412a689259c685a6.tar.xz
hwdec/dmabuf_interop: use AVDRMFrameDescriptor to describe dmabufs
Annoyingly, libva and libdrm use different structs to describe dmabufs and if we are going to support drmprime, we must pick one format and do some shuffling in the other case. I've decided to use AVDRMFrameDescriptor as our internal format as this removes the libva dependency from dmabuf_interop. That means that the future drmprime hwdec will be able to populate it directly and the existing hwdec_vaapi needs to copy the struct members around, but that's cheap and not a concern.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build24
1 files changed, 22 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 20dc9bb437..1ab8304613 100644
--- a/meson.build
+++ b/meson.build
@@ -1474,7 +1474,6 @@ vaapi_egl = {
if vaapi_egl['use']
dependencies += [vaapi_wayland['deps'], vaapi_drm['deps']]
features += vaapi_egl['name']
- sources += files('video/out/hwdec/dmabuf_interop_gl.c')
endif
vaapi_libplacebo = {
@@ -1483,13 +1482,32 @@ vaapi_libplacebo = {
}
if vaapi_libplacebo['use']
features += vaapi_libplacebo['name']
- sources += files('video/out/hwdec/dmabuf_interop_pl.c')
endif
if vaapi_egl['use'] or vaapi_libplacebo['use']
sources += files('video/out/hwdec/hwdec_vaapi.c')
endif
+dmabuf_interop_gl = {
+ 'name': 'dmabuf-interop-gl',
+ 'use': egl['use'] and drm['use']
+}
+
+if dmabuf_interop_gl['use']
+ features += dmabuf_interop_gl['name']
+ sources += files('video/out/hwdec/dmabuf_interop_gl.c')
+endif
+
+dmabuf_interop_pl = {
+ 'name': 'dmabuf-interop-pl',
+ 'use': vaapi_libplacebo['use']
+}
+
+if dmabuf_interop_pl['use']
+ features += dmabuf_interop_pl['name']
+ sources += files('video/out/hwdec/dmabuf_interop_pl.c')
+endif
+
vdpau_opt = get_option('vdpau').require(
x11['use'],
error_message: 'x11 was not found!',
@@ -1721,6 +1739,8 @@ conf_data.set10('HAVE_D3D_HWACCEL', d3d_hwaccel.allowed())
conf_data.set10('HAVE_D3D9_HWACCEL', d3d9_hwaccel.allowed())
conf_data.set10('HAVE_D3D11', d3d11.allowed())
conf_data.set10('HAVE_DIRECT3D', direct3d)
+conf_data.set10('HAVE_DMABUF_INTEROP_GL', dmabuf_interop_gl['use'])
+conf_data.set10('HAVE_DMABUF_INTEROP_PL', dmabuf_interop_pl['use'])
conf_data.set10('HAVE_DOS_PATHS', win32)
conf_data.set10('HAVE_DRM', drm['use'])
conf_data.set10('HAVE_DVBIN', dvbin.allowed())