[FFmpeg-cvslog] configure: autodetect libdrm

Haihao Xiang git at videolan.org
Tue Jan 9 03:51:26 EET 2024


ffmpeg | branch: master | Haihao Xiang <haihao.xiang at intel.com> | Fri Dec 29 12:23:26 2023 +0800| [440e08e4bb463d37de1d67a1fc47ebae542570ef] | committer: Haihao Xiang

configure: autodetect libdrm

option kernel_driver for vaapi device creation can be used to choose the
desired device on Linux, which is more convenient than DRM render node
in a multiple-device system (e.g. Intel iGPU + AMD dGPU or inverse), but
this option requires libdrm works. vaapi is autodetected at
configuration time, let's make libdrm autodetected too.

Reviewed-by: Zhao Zhili <quinkblack at foxmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=440e08e4bb463d37de1d67a1fc47ebae542570ef
---

 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 0b5e83bd20..e87a09ce83 100755
--- a/configure
+++ b/configure
@@ -341,7 +341,7 @@ External library support:
   --disable-d3d12va        disable Microsoft Direct3D 12 video acceleration code [autodetect]
   --disable-dxva2          disable Microsoft DirectX 9 video acceleration code [autodetect]
   --disable-ffnvcodec      disable dynamically linked Nvidia code [autodetect]
-  --enable-libdrm          enable DRM code (Linux) [no]
+  --disable-libdrm         disable DRM code (Linux) [autodetect]
   --enable-libmfx          enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
   --enable-libvpl          enable Intel oneVPL code via libvpl if libmfx is not used [no]
   --enable-libnpp          enable Nvidia Performance Primitives-based code [no]
@@ -1857,7 +1857,6 @@ EXTERNAL_LIBRARY_LIST="
     libcodec2
     libdav1d
     libdc1394
-    libdrm
     libflite
     libfontconfig
     libfreetype
@@ -1935,6 +1934,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
     d3d12va
     dxva2
     ffnvcodec
+    libdrm
     nvdec
     nvenc
     vaapi
@@ -6759,7 +6759,7 @@ enabled libcodec2         && require libcodec2 codec2/codec2.h codec2_create -lc
 enabled libdav1d          && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d/dav1d.h" dav1d_version
 enabled libdavs2          && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
 enabled libdc1394         && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
-enabled libdrm            && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
+enabled libdrm            && check_pkg_config libdrm libdrm xf86drm.h drmGetVersion
 enabled libfdk_aac        && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
                                { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
                                  warn "using libfdk without pkg-config"; } }



More information about the ffmpeg-cvslog mailing list