summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-06-24 14:52:43 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-06-24 14:52:43 +0200
commitb9238195dd983ec2803073ab66167324de9afe01 (patch)
tree337ecbfa38a0959ce5df83ccd02d1959492ee377
parentc0183cc31344e2959a00493780f9a7bc3dc56fc9 (diff)
downloadgst-omx-b9238195dd983ec2803073ab66167324de9afe01.tar.gz
omx: Only include OMX_VideoExt.h conditionally
It does not exist on the RPi for example.
-rw-r--r--configure.ac19
-rw-r--r--omx/gstomx.h4
-rw-r--r--omx/gstomxvp8dec.h1
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 <OMX_Video.h>"
+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 <OMX_VideoExt.h>
+"
+fi
+
AC_CHECK_DECLS([OMX_VIDEO_CodingVP8],
[
AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
HAVE_VP8=yes
], [
HAVE_VP8=no
- ], [[#include <OMX_Video.h>
- #include <OMX_VideoExt.h>]])
+ ], [[$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 <OMX_Video.h>]])
+ ], [[$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 <OMX_Broadcom.h>
#endif
+#ifdef HAVE_VIDEO_EXT
+#include <OMX_VideoExt.h>
+#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 <gst/gst.h>
#include "gstomxvideodec.h"
-#include <OMX_VideoExt.h>
G_BEGIN_DECLS