diff --git a/configure.ac b/configure.ac index 3b105b8ddf..407bbeb7f0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 " @@ -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]) diff --git a/meson.build b/meson.build index ae618b2449..c9df6766a2 100644 --- a/meson.build +++ b/meson.build @@ -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 ''' 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', diff --git a/omx/gstomx.h b/omx/gstomx.h index 07417a9682..77a20660a2 100644 --- a/omx/gstomx.h +++ b/omx/gstomx.h @@ -61,6 +61,14 @@ #include #endif +#ifdef HAVE_INDEX_EXT +#include +#endif + +#ifdef HAVE_COMPONENT_EXT +#include +#endif + #ifdef GST_OMX_STRUCT_PACKING #pragma pack() #endif