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>
57 lines
2.8 KiB
Diff
57 lines
2.8 KiB
Diff
From: Vincent Davis Jr <vince@underview.tech>
|
|
Date: Fri, 07 Jan 2022 07:10:47 PM CST
|
|
Subject: [PATCH] Use packageconfig to acquire mmal flags
|
|
|
|
Need to use userland graphics libraries package files as it's best to not assume /opt/vc is where
|
|
all libs and headers are installed per distro. Also, needed to include $BCMHOST_MMAL_LIBS variable as
|
|
AC_CHECK_LIB(bcm_host) fails to find `vc_tv_unregister_callback_full`. Adding $BCMHOST_MMAL_LIBS uses all
|
|
libs inside bcm_host,mmal,vcsm,openmaxil .pc files when checking for `vc_tv_unregister_callback_full`
|
|
function.
|
|
|
|
Upstream-status: Pending
|
|
|
|
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
|
|
diff --git a/configure.ac b/configure.ac
|
|
index bff220510..4d487409d 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -3483,23 +3483,25 @@ AC_ARG_ENABLE(mmal_avcodec,
|
|
[Use MMAL enabled avcodec libs (default disable)]))
|
|
if test "${enable_mmal}" != "no"; then
|
|
VLC_SAVE_FLAGS
|
|
- LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif"
|
|
- CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux"
|
|
- AC_CHECK_HEADERS(interface/mmal/mmal.h,
|
|
- [ AC_CHECK_LIB(bcm_host, vc_tv_unregister_callback_full, [
|
|
+ PKG_CHECK_MODULES(BCMHOST_MMAL, [bcm_host mmal vcsm openmaxil egl], [
|
|
+ HAVE_MMAL=yes
|
|
+ AC_CHECK_HEADERS(interface/mmal/mmal.h,
|
|
+ [ AC_CHECK_LIB(bcm_host $BCMHOST_MMAL_LIBS, vc_tv_unregister_callback_full, [
|
|
have_mmal="yes"
|
|
- VLC_ADD_PLUGIN([mmal])
|
|
- VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
|
|
- VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
|
|
- VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif -lvchiq_arm -lvcsm ]) ], [
|
|
+ VLC_ADD_PLUGIN([bcm_host mmal vcsm openmaxil egl])
|
|
+ VLC_ADD_CFLAGS([bcm_host mmal vcsm openmaxil egl],[$BCMHOST_MMAL_CFLAGS])
|
|
+ VLC_ADD_LIBS([bcm_host mmal vcsm openmaxil egl],[$BCMHOST_MMAL_LIBS]) ], [
|
|
AS_IF([test "${enable_mmal}" = "yes"],
|
|
[ AC_MSG_ERROR([Cannot find bcm library...]) ],
|
|
[ AC_MSG_WARN([Cannot find bcm library...]) ])
|
|
- ],
|
|
- [])
|
|
- ] , [ AS_IF([test "${enable_mmal}" = "yes"],
|
|
- [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
|
|
- [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
|
|
+ ],[])
|
|
+ ],[ AS_IF([test "${enable_mmal}" = "yes"],
|
|
+ [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
|
|
+ [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
|
|
+ ],:[
|
|
+ AC_MSG_WARN([${BCMHOST_PKG_ERRORS}: userland graphics not available.])
|
|
+ HAVE_MMAL=no
|
|
+ ])
|
|
VLC_RESTORE_FLAGS
|
|
fi
|
|
AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
|