diff options
| author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2014-05-12 13:34:07 +0300 |
|---|---|---|
| committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2014-05-12 13:34:07 +0300 |
| commit | 0d205ba48e9fa4e1a741de95cc9abea1c4f15a6b (patch) | |
| tree | 7df8e5e83485e4e7e27fcbe69734c41705e3f348 /m4 | |
| parent | 92759df506622b9680eb94de79d9482ba1e162d3 (diff) | |
| download | xine-lib-0d205ba48e9fa4e1a741de95cc9abea1c4f15a6b.tar.gz xine-lib-0d205ba48e9fa4e1a741de95cc9abea1c4f15a6b.tar.bz2 | |
add libmmal-based HW video decoder plugin for Raspberry Pi
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/decoders.m4 | 35 | ||||
| -rw-r--r-- | m4/summary.m4 | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 46be43e33..6e9db8c07 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -549,6 +549,41 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ fi AM_CONDITIONAL([ENABLE_VPX], [test x"$have_vpx" = x"yes"]) + dnl Broadcom MMAL (Multi Media Abstraction Layer) decoder plugin for RPi + AC_ARG_ENABLE([mmal], + [AS_HELP_STRING([--enable-mmal], [Enable libmmal based HW decoder plugin for Raspberry Pi (default: enabled)])], + [test x"$enableval" != x"no" && enable_mmal="yes"]) + if test x"$enable_mmal" != "no"; then + saved_CPPFLAGS="$CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="${LDFLAGS} -L/opt/vc/lib" + CPPFLAGS="${CPPFLAGS} -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads" + + AC_CHECK_LIB([bcm_host], [bcm_host_init], [have_mmal=yes], [have_mmal=no]) + if test x"$enable_mmal" = x"yes" && test x"$have_mmal" != x"yes"; then + AC_MSG_ERROR([Cannot find bcm library]) + else + AC_CHECK_HEADERS([interface/mmal/mmal.h], [have_mmal=yes], [have_mmal=no]) + if test x"$enable_mmal" = x"yes" && test x"$have_mmal" != x"yes"; then + AC_MSG_ERROR([Cannot find MMAL headers]) + fi + fi + + if test x"$have_mmal" = x"yes"; then + MMAL_LIBS="-lbcm_host -lmmal -lmmal_core -lmmal_util" + MMAL_LDFLAGS="-L/opt/vc/lib" + MMAL_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux" + AC_SUBST(MMAL_LIBS) + AC_SUBST(MMAL_LDFLAGS) + AC_SUBST(MMAL_CFLAGS) + AC_DEFINE([HAVE_MMAL], 1, [Define this if you have MMAL installed]) + fi + + CPPFLAGS="$saved_CPPFLAGS" + LDFLAGS="$saved_LDFLAGS" + fi + AM_CONDITIONAL([ENABLE_MMAL], [test x"$have_mmal" = x"yes"]) + dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$have_gdkpixbuf" = x"yes"]) ]) diff --git a/m4/summary.m4 b/m4/summary.m4 index 2b1bc40d3..e0085a57f 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -85,6 +85,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ test x"$have_theora" = x"yes" && echo " - theora" test x"$have_w32dll" = x"yes" && echo " - w32dll" test x"$have_vdpau" = x"yes" && echo " - vdpau" + test x"$have_mmal" = x"yes" && echo " - mmal (Broadcom HW)" test x"$have_vpx" = x"yes" && echo " - libvpx (VP8/VP9)" if test x"$with_external_ffmpeg" != x"no"; then echo " - ffmpeg (external library)" |
