configure: Add configure option to pack OpenMAX structures

This is required to set to 4 for the Raspberry Pi for example.
This commit is contained in:
Sebastian Dröge 2012-12-19 11:22:16 +01:00
parent b8498d6dbc
commit 7c53535026
2 changed files with 32 additions and 0 deletions

View file

@ -167,6 +167,16 @@ AC_ARG_ENABLE(Bsymbolic,
enable_Bsymbolic=no)
LDFLAGS="${SAVED_LDFLAGS}"])
AC_ARG_WITH([omx-struct-packing],
AS_HELP_STRING([--with-omx-struct-packing],[Force OpenMAX struct packing, (default is none)]),
[ac_cv_omx_struct_packing="$withval"], [ac_cv_omx_struct_packing="none"])
if test x"$ac_cv_omx_struct_packing" != x"none"; then
AC_MSG_NOTICE([Using $ac_cv_omx_struct_packing as OpenMAX struct packing])
AC_DEFINE_UNQUOTED(GST_OMX_STRUCT_PACKING, $ac_cv_omx_struct_packing, [The struct packing used for OpenMAX structures])
fi
dnl *** set variables based on configure arguments ***
dnl set license and copyright notice

View file

@ -27,9 +27,31 @@
#include <gst/video/video.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef GST_OMX_STRUCT_PACKING
# if GST_OMX_STRUCT_PACKING == 1
# pragma pack(1)
# elif GST_OMX_STRUCT_PACKING == 2
# pragma pack(2)
# elif GST_OMX_STRUCT_PACKING == 4
# pragma pack(4)
# elif GST_OMX_STRUCT_PACKING == 8
# pragma pack(8)
# else
# error "Unsupported struct packing value"
# endif
#endif
#include <OMX_Core.h>
#include <OMX_Component.h>
#ifdef GST_OMX_STRUCT_PACKING
#pragma pack()
#endif
#include "gstomxrecmutex.h"
G_BEGIN_DECLS