summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-07-12 20:11:32 -0500
committerDudemanguy <random342@airmail.cc>2023-07-14 14:24:45 +0000
commit2616b2b11eac26dfbb85926477a652d2a0540ef6 (patch)
tree127ff33a2175caf750bfe7a767a4bceee9222801 /video
parentcf0373e15bbe3da8af7b3d1bbe1ae5caee9672cf (diff)
downloadmpv-2616b2b11eac26dfbb85926477a652d2a0540ef6.tar.bz2
mpv-2616b2b11eac26dfbb85926477a652d2a0540ef6.tar.xz
build: make dmabuf-wayland a build option and require drm
It makes more sense as an option at this point. Also libdrm is not optional at all. You have to get a drm format and modifier for this to even work (the VO will just fail without DRM). Just hard require it and remove the guards. vaapi can remain optional.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_dmabuf_wayland.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c
index e46dcadb47..269ddc2a3d 100644
--- a/video/out/vo_dmabuf_wayland.c
+++ b/video/out/vo_dmabuf_wayland.c
@@ -15,6 +15,7 @@
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <libavutil/hwcontext_drm.h>
#include <sys/mman.h>
#include <unistd.h>
#include "config.h"
@@ -22,9 +23,6 @@
#if HAVE_VAAPI
#include <va/va_drmcommon.h>
#endif
-#if HAVE_DRM
-#include <libavutil/hwcontext_drm.h>
-#endif
#include "common/global.h"
#include "gpu/hwdec.h"
@@ -192,19 +190,16 @@ done:
static uintptr_t drmprime_surface_id(struct mp_image *src)
{
uintptr_t id = 0;
-#if HAVE_DRM
struct AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor *)src->planes[0];
AVDRMObjectDescriptor object = desc->objects[0];
id = (uintptr_t)object.fd;
-#endif
return id;
}
static void drmprime_dmabuf_importer(struct buffer *buf, struct mp_image *src,
struct zwp_linux_buffer_params_v1 *params)
{
-#if HAVE_DRM
int layer_no, plane_no;
int max_planes = 0;
const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor *)src->planes[0];
@@ -227,7 +222,6 @@ static void drmprime_dmabuf_importer(struct buffer *buf, struct mp_image *src,
plane.pitch, modifier >> 32, modifier & 0xffffffff);
}
}
-#endif
}
static intptr_t surface_id(struct vo *vo, struct mp_image *src)