From b9238195dd983ec2803073ab66167324de9afe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 24 Jun 2014 14:52:43 +0200 Subject: omx: Only include OMX_VideoExt.h conditionally It does not exist on the RPi for example. --- configure.ac | 19 ++++++++++++++++--- omx/gstomx.h | 4 ++++ omx/gstomxvp8dec.h | 1 - 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 5617323..eda593e 100644 --- a/configure.ac +++ b/configure.ac @@ -170,14 +170,27 @@ dnl Check for external OpenMAX IL headers AC_CHECK_HEADER([OMX_Core.h], [HAVE_EXTERNAL_OMX=yes], [HAVE_EXTERNAL_OMX=no], [AC_INCLUDES_DEFAULT]) AM_CONDITIONAL(HAVE_EXTERNAL_OMX, test "x$HAVE_EXTERNAL_OMX" = "xyes") +dnl Our internal OpenMAX IL headers have OMX_VideoExt.h +HAVE_VIDEO_EXT=yes +if test "x$HAVE_EXTERNAL_OMX" = "xyes"; then + AC_CHECK_HEADER([OMX_VideoExt.h], [HAVE_VIDEO_EXT=yes], [HAVE_VIDEO_EXT=no], [AC_INCLUDES_DEFAULT]) +fi + +VIDEO_HEADERS="#include " +if test "x$HAVE_VIDEO_EXT" = "xyes"; then + AC_DEFINE(HAVE_VIDEO_EXT, 1, [OpenMAX IL has OMX_VideoExt.h header]) + VIDEO_HEADERS="$VIDEO_HEADERS +#include +" +fi + AC_CHECK_DECLS([OMX_VIDEO_CodingVP8], [ AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support]) HAVE_VP8=yes ], [ HAVE_VP8=no - ], [[#include - #include ]]) + ], [[$VIDEO_HEADERS]]) AM_CONDITIONAL(HAVE_VP8, test "x$HAVE_VP8" = "xyes") AC_CHECK_DECLS([OMX_VIDEO_CodingTheora], @@ -186,7 +199,7 @@ AC_CHECK_DECLS([OMX_VIDEO_CodingTheora], HAVE_THEORA=yes ], [ HAVE_THEORA=no - ], [[#include ]]) + ], [[$VIDEO_HEADERS]]) AM_CONDITIONAL(HAVE_THEORA, test "x$HAVE_THEORA" = "xyes") dnl Check for -Bsymbolic-functions linker flag used to avoid diff --git a/omx/gstomx.h b/omx/gstomx.h index f78bbf9..9ad8e2f 100644 --- a/omx/gstomx.h +++ b/omx/gstomx.h @@ -52,6 +52,10 @@ #include #endif +#ifdef HAVE_VIDEO_EXT +#include +#endif + #ifdef GST_OMX_STRUCT_PACKING #pragma pack() #endif diff --git a/omx/gstomxvp8dec.h b/omx/gstomxvp8dec.h index 5648ba3..f99f4ce 100644 --- a/omx/gstomxvp8dec.h +++ b/omx/gstomxvp8dec.h @@ -23,7 +23,6 @@ #include #include "gstomxvideodec.h" -#include G_BEGIN_DECLS -- cgit v1.2.1