aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-04-15 18:44:28 -0700
committerKhem Raj <raj.khem@gmail.com>2020-04-16 11:40:40 -0700
commit0c4be31f62fcdd755aa42653bbecc17b462d8999 (patch)
tree4082d035bb63f387580c4b06bf3b5455f5e69f2f /meta-multimedia
parenteb3264e3137b9096bf47f8d80dc3b4eda19a031a (diff)
downloadmeta-openembedded-contrib-0c4be31f62fcdd755aa42653bbecc17b462d8999.tar.gz
vlc: Use pkgconfig to find userland graphics libs
Add mmal, x264, fluidsynth as packageconfigs so it can be easily enabled/disabled by users Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Andreas Müller <schnitzeltony@gmail.com>
Diffstat (limited to 'meta-multimedia')
-rw-r--r--meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch61
-rw-r--r--meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb9
2 files changed, 68 insertions, 2 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch
new file mode 100644
index 0000000000..424aaa2815
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0001-Use-packageconfig-to-detect-mmal-support.patch
@@ -0,0 +1,61 @@
+From e8716a7755eef93e1033bb913e1eb4faee54658f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Apr 2020 18:29:26 -0700
+Subject: [PATCH] Use packageconfig to detect mmal support
+
+This needs userland graphics libraries, because distros may install it
+in different locations, therefore its best to rely on pkgconf to find
+the libs and header locations instead of assuming /opt/vc which might
+work on some distros ( like raspbian ) but not everywhere
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 31 +++++++++++--------------------
+ 1 file changed, 11 insertions(+), 20 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d7cf692..f81b99d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3427,27 +3427,18 @@ AC_ARG_ENABLE(mmal,
+ AS_HELP_STRING([--enable-mmal],
+ [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
+ 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, [
+- 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 ]) ], [
+- 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...]) ]) ])
+- VLC_RESTORE_FLAGS
++ PKG_CHECK_MODULES(BCMHOST, [bcm_host], [
++ HAVE_BCMHOST=yes
++ AC_DEFINE(HAVE_BCMHOST, 1, [Define this if you have have userlang graphics installed])
++ VLC_ADD_LIBS([bcmhost],[$BCMHOST_LIBS])
++ VLC_ADD_CFLAGS([bcmhost],[$BCMHOST_CFLAGS])
++ ],:
++ [AC_MSG_WARN([${BCMHOST_PKG_ERRORS}: userland graphics not available.])
++ HAVE_BCMHOST=no])
++
++ AC_CHECK_HEADERS(interface/mmal/mmal.h)
+ fi
+-AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
++AM_CONDITIONAL([HAVE_MMAL], [test "${have_bcmhost}" = "yes"])
+
+ dnl
+ dnl evas plugin
+--
+2.26.1
+
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
index 556e79c7e6..e4fa7acbf1 100644
--- a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
+++ b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.9.2.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \
dbus libxml2 gnutls \
- tremor faad2 ffmpeg flac fluidsynth alsa-lib \
+ tremor faad2 ffmpeg flac alsa-lib \
lua-native lua libidn \
avahi jpeg xz libmodplug mpeg2dec \
libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \
@@ -22,6 +22,7 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz \
file://0006-make-opencv-configurable.patch \
file://0007-use-vorbisidec.patch \
file://0008-fix-luaL-checkint.patch \
+ file://0001-Use-packageconfig-to-detect-mmal-support.patch \
"
SRC_URI[sha256sum] = "a9bdad293d81cd48516abad8d490d8ab4012964ae541ff19e00021e071e47601"
@@ -51,12 +52,16 @@ EXTRA_OECONF = "\
"
PACKAGECONFIG ?= " \
- live555 dc1394 dv1394 notify fontconfig freetype dvdread png \
+ live555 dc1394 dv1394 notify fontconfig fluidsynth freetype dvdread png \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ x264 \
"
inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'qmake5_paths', '', d)}
+PACKAGECONFIG[mmal] = "--enable-omxil --enable-omxil-vout --enable-rpi-omxil --enable-mmal,,userland"
+PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
+PACKAGECONFIG[fluidsynth] = ",,fluidsynth"
PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"