dnl Needed for GtkBuilder to autoconnect signals
PKG_CHECK_MODULES(GMODULE_EXPORT, gmodule-export-2.0, HAVE_GMODULE_EXPORT=yes, HAVE_GMODULE_EXPORT=no)
-dnl x11 is optional for librfb
+dnl Needed by plugins that use g_module_*() API
+PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
+
+dnl x11 is optional for librfb and eglglessink
HAVE_X11=NO
PKG_CHECK_MODULES(X11, x11, HAVE_X11=yes, HAVE_X11=no)
AC_SUBST(X11_LIBS)
#include <gst/gst.h>
#include "video_platform_wrapper.h"
-#ifndef __BIONIC__
+#ifdef HAVE_X11
#include <X11/Xlib.h>
#endif
platform_wrapper_init (void)
{
GST_DEBUG_CATEGORY_INIT (eglgles_platform_wrapper,
- "EglGles Platform Wrapper", 0,
+ "eglglessink-platform", 0,
"Platform dependent native-window utility routines for EglGles");
return TRUE;
}
-#ifndef __BIONIC__
+#ifdef HAVE_X11
EGLNativeWindowType
platform_create_native_window (gint width, gint height)
{
d = XOpenDisplay (NULL);
if (d == NULL) {
- GST_CAT_ERROR (GST_CAT_DEFAULT, "Can't open X11 display");
+ GST_ERROR ("Can't open X11 display");
return (EGLNativeWindowType) 0;
}
XDestroyWindow (display, window);
return TRUE;
}
+#endif
-/* XXX: Missing implementation */
-EGLint *
-platform_crate_native_image_buffer (EGLNativeWindowType win, EGLConfig config,
- EGLNativeDisplayType display, const EGLint * egl_attribs)
-{
- return NULL;
-}
-
-#else
-/* Android does not support the creation of an egl window surface
- * from native code. Hence, we just return NULL here for the time
- * being. Function is left for reference as implementing it should
- * help us suport other EGL platforms.
- */
+#if !defined(HAVE_X11)
+/* Dummy functions for creating a native Window */
EGLNativeWindowType
platform_create_native_window (gint width, gint height)
{
- /* XXX: There was one example on AOSP that was using something
- * along the lines of window = android_createDisplaySurface();
- * but wasn't working properly.
- */
-
- GST_CAT_ERROR (GST_CAT_DEFAULT, "Android: Can't create native window");
+ GST_ERROR ("Can't create native window");
return (EGLNativeWindowType) 0;
}
platform_destroy_native_window (EGLNativeDisplayType display,
EGLNativeWindowType window)
{
- GST_CAT_ERROR (GST_CAT_DEFAULT, "Android: Can't destroy native window");
+ GST_ERROR ("Can't destroy native window");
return TRUE;
}