summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2014-05-15 03:21:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-15 03:21:01 +0000
commit574b641173debed3c0714628dba963e4d276374d (patch)
treeefa56e409b855e76aaa9eaf8f2ede18d6ecf443f /include
parent2f9a3e73bfd9f51b8e08b16b0bfdea33efeaa89d (diff)
parentabec6ad341b81cc5c36ecd93c9f3794989226664 (diff)
downloadframeworks_native-574b641173debed3c0714628dba963e4d276374d.zip
frameworks_native-574b641173debed3c0714628dba963e4d276374d.tar.gz
frameworks_native-574b641173debed3c0714628dba963e4d276374d.tar.bz2
Merge "Allow OMX pointer types to be forced to 32 bits"
Diffstat (limited to 'include')
-rw-r--r--include/media/openmax/OMX_Types.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/include/media/openmax/OMX_Types.h b/include/media/openmax/OMX_Types.h
index 9dec372..71e346a 100644
--- a/include/media/openmax/OMX_Types.h
+++ b/include/media/openmax/OMX_Types.h
@@ -211,7 +211,25 @@ typedef enum OMX_BOOL {
OMX_TRUE = !OMX_FALSE,
OMX_BOOL_MAX = 0x7FFFFFFF
} OMX_BOOL;
-
+
+/*
+ * Temporary Android 64 bit modification
+ *
+ * #define OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
+ * overrides all OMX pointer types to be uint32_t.
+ *
+ * After this change, OMX codecs will work in 32 bit only, so 64 bit processes
+ * must communicate to a remote 32 bit process for OMX to work.
+ */
+
+#ifdef OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
+
+typedef uint32_t OMX_PTR;
+typedef OMX_PTR OMX_STRING;
+typedef OMX_PTR OMX_BYTE;
+
+#else /* OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS */
+
/** The OMX_PTR type is intended to be used to pass pointers between the OMX
applications and the OMX Core and components. This is a 32 bit pointer and
is aligned on a 32 bit boundary.
@@ -232,6 +250,8 @@ typedef char* OMX_STRING;
*/
typedef unsigned char* OMX_BYTE;
+#endif /* OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS */
+
/** OMX_UUIDTYPE is a very long unique identifier to uniquely identify
at runtime. This identifier should be generated by a component in a way
that guarantees that every instance of the identifier running on the system
@@ -312,7 +332,7 @@ typedef struct OMX_TICKS
/** Define the public interface for the OMX Handle. The core will not use
this value internally, but the application should only use this value.
*/
-typedef void* OMX_HANDLETYPE;
+typedef OMX_PTR OMX_HANDLETYPE;
typedef struct OMX_MARKTYPE
{
@@ -328,11 +348,11 @@ typedef struct OMX_MARKTYPE
/** OMX_NATIVE_DEVICETYPE is used to map a OMX video port to the
* platform & operating specific object used to reference the display
* or can be used by a audio port for native audio rendering */
-typedef void* OMX_NATIVE_DEVICETYPE;
+typedef OMX_PTR OMX_NATIVE_DEVICETYPE;
/** OMX_NATIVE_WINDOWTYPE is used to map a OMX video port to the
* platform & operating specific object used to reference the window */
-typedef void* OMX_NATIVE_WINDOWTYPE;
+typedef OMX_PTR OMX_NATIVE_WINDOWTYPE;
/** The OMX_VERSIONTYPE union is used to specify the version for
a structure or component. For a component, the version is entirely