mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 12:59:03 +02:00

This adds support for building rpidistro version of VLC with hardware acceleration through MMAL. The version of VLC located in meta-openembedded/meta-multimedia/recipes-multimedia/vlc uses mainline VLC and doesn't give all the proper flags. The series of patches attached to commit gives necessarly vlc mmal flags. * https://code.videolan.org/videolan/vlc/-/issues/24617 * https://bugs.gentoo.org/723006 The build fails with errors such as "multiple definition of `pf_enable_graphic_buffers'" when omxil is enabled. The issue seems to be due to compiler flags. Adding -fcommon to both cflags and cxxflags yields a full compile. Signed-off-by: Vincent Davis Jr <vince@underview.tech>
59 lines
2.4 KiB
Diff
59 lines
2.4 KiB
Diff
From: Vincent Davis Jr <vince@underview.tech>
|
|
Date: Fri, 07 Jan 2022 07:01:47 PM CST
|
|
Subject: [PATCH] Fix EGL macro undeclared and EGLImageKHR
|
|
|
|
* Fixes compiler issues related to EGL macro constant/enum value type not being defined
|
|
* Updates EGLImage to EGLImageKHR
|
|
|
|
Upstream-status: Pending
|
|
|
|
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
|
|
diff --git a/modules/hw/mmal/converter_mmal.c b/modules/hw/mmal/converter_mmal.c
|
|
index f31cb81d8..426af668b 100644
|
|
--- a/modules/hw/mmal/converter_mmal.c
|
|
+++ b/modules/hw/mmal/converter_mmal.c
|
|
@@ -28,6 +28,34 @@
|
|
|
|
#define TRACE_ALL 0
|
|
|
|
+// Pass Yocto related build errors
|
|
+#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
|
+#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
|
+#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
|
|
+#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
|
|
+#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
|
+#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
|
|
+#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
|
|
+#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
|
|
+#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
|
|
+#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
|
|
+#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
|
|
+#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
|
|
+#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
|
|
+#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
|
|
+#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
|
|
+#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
|
+#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
|
+#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
|
|
+#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
|
|
+#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
|
|
+#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
|
|
+#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
|
|
+#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
|
|
+#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
|
|
+#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
|
|
+#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
|
|
+
|
|
typedef struct mmal_gl_converter_s
|
|
{
|
|
EGLint drm_fourcc;
|
|
@@ -199,7 +227,7 @@ static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc,
|
|
|
|
*a = EGL_NONE;
|
|
|
|
- const EGLImage image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
|
|
+ const EGLImageKHR image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
|
|
if (!image) {
|
|
msg_Err(tc, "Failed to import fd %d: Err=%#x", fd, tc->vt->GetError());
|
|
goto fail;
|