Building an image with yocto for an 'am335x' processor will fail,
because 'gbm.h' can not be found and 'EGL_PLATFORM_GBM_MESA' is not defined.
So simply adding define of 'EGL_PLATFORM_GBM_MESA' in 'gstgldisplay_egl.c'
and adding 'GBM_CFLAGS' in 'gst-gl.m4' to get rid of this errors and complete
a full build process.
ERRORs were:
-----------
gst-plugins-base-1.14.1/gst-libs/gst/gl/gbm/gstglwindow_gbm_egl.h:24:10:
fatal error: gbm.h: No such file or directory
#include <gbm.h>
^~~~~~~
gst-plugins-base-1.14.1/gst-libs/gst/gl/egl/gstgldisplay_egl.c:157:39:
error: 'EGL_PLATFORM_GBM_MESA' undeclared (first use in this function);
did you mean 'EGL_PLATFORM_WAYLAND'?
ret = _gst_eglGetPlatformDisplay (EGL_PLATFORM_GBM_MESA, (gpointer) display,
^~~~~~~~~~~~~~~~~~~~~
https://bugzilla.gnome.org/show_bug.cgi?id=796885
#ifndef EGL_PLATFORM_WAYLAND
#define EGL_PLATFORM_WAYLAND 0x31D8
#endif
+#ifndef EGL_PLATFORM_GBM_MESA
+#define EGL_PLATFORM_GBM_MESA 0x31D7
+#endif
#ifndef EGL_PLATFORM_ANDROID
#define EGL_PLATFORM_ANDROID 0x3141
#endif
AC_MSG_WARN([EGL is required by the Mesa GBM EGL backend])
else
HAVE_WINDOW_GBM=yes
- GL_CFLAGS="$GL_CFLAGS $DRM_CFLAGS"
+ GL_CFLAGS="$GL_CFLAGS $DRM_CFLAGS $GBM_CFLAGS"
fi
fi