Commit 04451330 authored by Martin Storsjö's avatar Martin Storsjö

iomx: Adjust ANDROID_API ifdefs to work with honeycomb 11, 12 and 13

This would allow building libiomx-hc.so with -DANDROID_API=13
instead of =11 as right now - using 13 would probably be more
correct as the headers match 3.2.
Signed-off-by: Martin Storsjö's avatarMartin Storsjö <martin@martin.st>
parent a65a4ad7
......@@ -30,7 +30,7 @@
#include <OMX_Core.h>
#include <OMX_Component.h>
#if ANDROID_API <= 11
#if ANDROID_API <= 13
#include <ui/android_native_buffer.h>
#include <ui/egl/android_natives.h>
#else
......@@ -44,7 +44,7 @@
#define NO_ERROR 0
typedef int32_t status_t;
#if ANDROID_API <= 11
#if ANDROID_API <= 13
typedef android_native_buffer_t ANativeWindowBuffer_t;
#endif
......@@ -81,7 +81,7 @@ int IOMXHWBuffer_Connect( void *window )
ANativeWindow *anw = (ANativeWindow *)window;
CHECK_ANW();
#if ANDROID_API > 11
#if ANDROID_API >= 14
if (native_window_api_connect( anw, NATIVE_WINDOW_API_MEDIA ) != 0) {
LOGE( "native_window_api_connect FAIL" );
return -EINVAL;
......@@ -95,7 +95,7 @@ int IOMXHWBuffer_Disconnect( void *window )
CHECK_ANW();
#if ANDROID_API > 11
#if ANDROID_API >= 14
native_window_api_disconnect( anw, NATIVE_WINDOW_API_MEDIA );
#endif
......@@ -141,7 +141,7 @@ int IOMXHWBuffer_Setup( void *window, int w, int h, int hal_format, int hw_usage
err = native_window_set_usage( anw, usage );
CHECK_ERR();
#if ANDROID_API <= 11
#if ANDROID_API <= 13
err = native_window_set_buffers_geometry( anw, w, h, hal_format );
CHECK_ERR();
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment