diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-08-23 21:58:54 -0400 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-08-23 21:58:54 -0400 |
commit | be46e993dcd894601b88195d410fee13d75e6c07 (patch) | |
tree | 7889cfa47a12fcafa2f84bb0bafbb2bd8bc790b9 | |
parent | 79efa79c51bd3187fd88968bae9ded9a82be31bb (diff) |
Rely on __BIONIC__ for Android/X11 conditionals
-rw-r--r-- | sys/android/gstvidroidsink.c | 6 | ||||
-rw-r--r-- | sys/android/video_platform_wrapper.c | 10 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/android/gstvidroidsink.c b/sys/android/gstvidroidsink.c index 795ea3e7e..f3decaba5 100644 --- a/sys/android/gstvidroidsink.c +++ b/sys/android/gstvidroidsink.c @@ -102,7 +102,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vidroidsink_debug); static PFNEGLCREATEIMAGEKHRPROC my_eglCreateImageKHR; static PFNEGLDESTROYIMAGEKHRPROC my_eglDestroyImageKHR; static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC my_glEGLImageTargetTexture2DOES; -#ifndef HAVE_X11 +#ifdef __BIONIC__ static PFNEGLUNLOCKSURFACEKHRPROC my_eglUnlockSurfaceKHR; #endif @@ -497,7 +497,7 @@ gst_vidroidsink_buffer_alloc (GstBaseSink * bsink, guint64 offset, gint width, height; vidroidsink = GST_VIDROIDSINK (bsink); -#ifdef HAVE_X11 +#ifndef __BIONIC__ /* no custom alloc for X11 */ GST_WARNING_OBJECT (vidroidsink, "No custom alloc for x11/mesa"); *buf = NULL; @@ -686,7 +686,7 @@ gst_vidroidsink_start (GstBaseSink * sink) GST_ERROR_OBJECT (vidroidsink, "Extension EGL_KHR_IMAGE not available"); goto HANDLE_ERROR; } -#ifndef HAVE_X11 +#ifdef __BIONIC__ my_eglUnlockSurfaceKHR = (PFNEGLUNLOCKSURFACEKHRPROC) eglGetProcAddress ("eglUnlockSurfaceKHR"); diff --git a/sys/android/video_platform_wrapper.c b/sys/android/video_platform_wrapper.c index df7c6c582..d2e435c15 100644 --- a/sys/android/video_platform_wrapper.c +++ b/sys/android/video_platform_wrapper.c @@ -55,15 +55,14 @@ #include <gst/gst.h> #include "video_platform_wrapper.h" -/* XXX: need a proper macro to choose between android and x11/mesa */ -#ifdef HAVE_X11 +#ifndef __BIONIC__ #include <X11/Xlib.h> #endif GST_DEBUG_CATEGORY_STATIC (vidroid_platform_wrapper); #define GST_CAT_DEFAULT vidroid_platform_wrapper -#ifndef HAVE_X11 +#ifdef __BIONIC__ static PFNEGLLOCKSURFACEKHRPROC my_eglLockSurfaceKHR; static EGLint lock_attribs[] = { @@ -80,7 +79,7 @@ platform_wrapper_init (void) "ViDroid Platform Wrapper", 0, "Platform dependent native-window utility routines for ViDroid"); -#ifndef HAVE_X11 +#ifdef __BIONIC__ my_eglLockSurfaceKHR = (PFNEGLLOCKSURFACEKHRPROC) eglGetProcAddress ("eglLockSurfaceKHR"); @@ -91,8 +90,7 @@ platform_wrapper_init (void) return; } -#ifdef HAVE_X11 - +#ifndef __BIONIC__ EGLNativeWindowType platform_create_native_window (gint width, gint height) { |