mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 15:08:48 +00:00
msdk: Fix libdrm dependency detection and usage
drm_fourcc.h should be picked up via the pkgconfig include, not the system includedir directly. Also consolidate the libdrm usage in va and msdk. All this allows it to be picked up consistently (via the subproject, for example). Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760>
This commit is contained in:
parent
e892b0d63d
commit
da86a92a2d
9 changed files with 17 additions and 9 deletions
|
@ -81,10 +81,8 @@ if host_system == 'linux'
|
|||
endif
|
||||
platform_deps += [libva_drm_dep]
|
||||
|
||||
libdrm_dep = dependency('libdrm', version: '>=2.4', required: get_option('drm'))
|
||||
if libdrm_dep.found()
|
||||
platform_deps += [libdrm_dep]
|
||||
extra_args += ['-DHAVE_LIBDRM']
|
||||
endif
|
||||
|
||||
va_sources += va_linux_sources
|
||||
|
|
|
@ -398,6 +398,17 @@ if x11_dep.found()
|
|||
cdata.set('HAVE_X11', 1)
|
||||
endif
|
||||
|
||||
# Optional dep of msdk and va
|
||||
if host_system not in ['darwin', 'ios', 'android', 'windows']
|
||||
libdrm_dep = dependency('libdrm', version : '>=2.4.50',
|
||||
required : get_option('drm').enabled() or get_option('msdk').enabled(),
|
||||
)
|
||||
cdata.set('HAVE_LIBDRM', libdrm_dep.found())
|
||||
else
|
||||
libdrm_dep = dependency('', required: false)
|
||||
endif
|
||||
|
||||
|
||||
#
|
||||
# Solaris and Illumos distros split a lot of networking-related code
|
||||
# into '-lsocket -lnsl'. Anything that calls socketpair(), getifaddr(),
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <va/va.h>
|
||||
#include <va/va_drmcommon.h>
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <unistd.h>
|
||||
#include "gstmsdkallocator.h"
|
||||
#include "gstmsdkallocator_libva.h"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "gstmsdkcaps.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <gst/video/video-info-dma.h>
|
||||
#include "gstmsdkallocator_libva.h"
|
||||
#include <gst/va/gstvavideoformat.h>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "gstmsdkcaps.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <gst/va/gstvaallocator.h>
|
||||
#include <gst/va/gstvavideoformat.h>
|
||||
#else
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "gstmsdkcaps.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include "gstmsdkallocator_libva.h"
|
||||
#include <gst/va/gstvaallocator.h>
|
||||
#else
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
#include "gstmsdkallocator.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include "gstmsdkallocator_libva.h"
|
||||
#include <gst/va/gstvaallocator.h>
|
||||
#include <gst/va/gstvavideoformat.h>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "gstmsdkcaps.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <drm_fourcc.h>
|
||||
#include <gst/va/gstvavideoformat.h>
|
||||
#else
|
||||
#include <gst/d3d11/gstd3d11.h>
|
||||
|
|
|
@ -184,7 +184,6 @@ if host_machine.system() == 'windows'
|
|||
else
|
||||
libdl_dep = cc.find_library('dl', required: get_option('msdk'))
|
||||
libgudev_dep = dependency('gudev-1.0', required: get_option('msdk'), allow_fallback: true)
|
||||
libdrm_dep = dependency('libdrm', required: get_option('msdk'))
|
||||
msdk_deps = declare_dependency(dependencies: [gstva_dep, libdl_dep, libgudev_dep, libdrm_dep])
|
||||
msdk_deps_found = gstva_dep.found() and libdl_dep.found() and libgudev_dep.found() and libdrm_dep.found()
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue