build: include OMX_IndexExt and OMX_ComponentExt if present

These files may be used by OMX implementation to define custom extensions.
Include them if present as we are already doing with OMX_VideoExt.h

https://bugzilla.gnome.org/show_bug.cgi?id=784847
This commit is contained in:
Guillaume Desmottes 2017-06-02 12:36:30 +02:00 committed by Julien Isorce
parent fe9cdb9b19
commit 4488ab97af
3 changed files with 42 additions and 2 deletions

View file

@ -242,10 +242,14 @@ 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
dnl Our internal OpenMAX IL headers have OMX_VideoExt.h, OMX_IndexExt.h and OMX_ComponentExt.h
HAVE_VIDEO_EXT=yes
HAVE_INDEX_EXT=yes
HAVE_COMPONENT_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])
AC_CHECK_HEADER([OMX_IndexExt.h], [HAVE_INDEX_EXT=yes], [HAVE_INDEX_EXT=no], [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADER([OMX_ComponentExt.h], [HAVE_COMPONENT_EXT=yes], [HAVE_COMPONENT_EXT=no], [AC_INCLUDES_DEFAULT])
fi
VIDEO_HEADERS="#include <OMX_Video.h>"
@ -256,6 +260,14 @@ if test "x$HAVE_VIDEO_EXT" = "xyes"; then
"
fi
if test "x$HAVE_INDEX_EXT" = "xyes"; then
AC_DEFINE(HAVE_INDEX_EXT, 1, [OpenMAX IL has OMX_IndexExt.h header])
fi
if test "x$HAVE_COMPONENT_EXT" = "xyes"; then
AC_DEFINE(HAVE_COMPONENT_EXT, 1, [OpenMAX IL has OMX_ComponentExt.h header])
fi
AC_CHECK_DECLS([OMX_VIDEO_CodingVP8],
[
AC_DEFINE(HAVE_VP8, 1, [OpenMAX IL has VP8 support])

View file

@ -168,8 +168,10 @@ have_external_omx = cc.has_header(
args : gst_omx_args,
required : false)
extra_video_headers = ''
# Our internal OpenMAX IL headers have OMX_VideoExt.h
# Our internal OpenMAX IL headers have OMX_VideoExt.h, OMX_IndexExt.h and OMX_ComponentExt.h
have_video_ext = true
have_index_ext = true
have_component_ext = true
if have_external_omx
have_video_ext = cc.has_header (
@ -180,12 +182,30 @@ if have_external_omx
extra_video_headers += '''
#include <OMX_VideoExt.h>'''
endif
have_index_ext = cc.has_header (
'OMX_IndexExt.h',
args : gst_omx_args,
required : false)
have_component_ext = cc.has_header (
'OMX_ComponentExt.h',
args : gst_omx_args,
required : false)
endif
if have_video_ext
cdata.set ('HAVE_VIDEO_EXT', 1)
endif
if have_index_ext
cdata.set ('HAVE_INDEX_EXT', 1)
endif
if have_component_ext
cdata.set ('HAVE_COMPONENT_EXT', 1)
endif
have_omx_vp8 = cc.has_header_symbol(
'OMX_Video.h',
'OMX_VIDEO_CodingVP8',

View file

@ -61,6 +61,14 @@
#include <OMX_VideoExt.h>
#endif
#ifdef HAVE_INDEX_EXT
#include <OMX_IndexExt.h>
#endif
#ifdef HAVE_COMPONENT_EXT
#include <OMX_ComponentExt.h>
#endif
#ifdef GST_OMX_STRUCT_PACKING
#pragma pack()
#endif