omx: Only include OMX_VideoExt.h conditionally

It does not exist on the RPi for example.
This commit is contained in:
Sebastian Dröge 2014-06-24 14:52:43 +02:00
parent c0183cc313
commit b9238195dd
3 changed files with 20 additions and 4 deletions

View file

@ -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]) 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") 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_CHECK_DECLS([OMX_VIDEO_CodingVP8],
[ [
AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support]) AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])
HAVE_VP8=yes HAVE_VP8=yes
], [ ], [
HAVE_VP8=no HAVE_VP8=no
], [[#include <OMX_Video.h> ], [[$VIDEO_HEADERS]])
#include <OMX_VideoExt.h>]])
AM_CONDITIONAL(HAVE_VP8, test "x$HAVE_VP8" = "xyes") AM_CONDITIONAL(HAVE_VP8, test "x$HAVE_VP8" = "xyes")
AC_CHECK_DECLS([OMX_VIDEO_CodingTheora], AC_CHECK_DECLS([OMX_VIDEO_CodingTheora],
@ -186,7 +199,7 @@ AC_CHECK_DECLS([OMX_VIDEO_CodingTheora],
HAVE_THEORA=yes HAVE_THEORA=yes
], [ ], [
HAVE_THEORA=no HAVE_THEORA=no
], [[#include <OMX_Video.h>]]) ], [[$VIDEO_HEADERS]])
AM_CONDITIONAL(HAVE_THEORA, test "x$HAVE_THEORA" = "xyes") AM_CONDITIONAL(HAVE_THEORA, test "x$HAVE_THEORA" = "xyes")
dnl Check for -Bsymbolic-functions linker flag used to avoid dnl Check for -Bsymbolic-functions linker flag used to avoid

View file

@ -52,6 +52,10 @@
#include <OMX_Broadcom.h> #include <OMX_Broadcom.h>
#endif #endif
#ifdef HAVE_VIDEO_EXT
#include <OMX_VideoExt.h>
#endif
#ifdef GST_OMX_STRUCT_PACKING #ifdef GST_OMX_STRUCT_PACKING
#pragma pack() #pragma pack()
#endif #endif

View file

@ -23,7 +23,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstomxvideodec.h" #include "gstomxvideodec.h"
#include <OMX_VideoExt.h>
G_BEGIN_DECLS G_BEGIN_DECLS