diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-08-23 23:31:59 -0400 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com> | 2012-08-23 23:31:59 -0400 |
commit | 50dd59fb835eb5538d1a9c6baa80991281c283d2 (patch) | |
tree | 433004e4b647cb93367753a2b0b1cd248d5fab15 | |
parent | be46e993dcd894601b88195d410fee13d75e6c07 (diff) |
Drop X11 code from Android platform_crate_native_image_buffer draft
-rw-r--r-- | sys/android/video_platform_wrapper.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sys/android/video_platform_wrapper.c b/sys/android/video_platform_wrapper.c index d2e435c15..02c8c39b7 100644 --- a/sys/android/video_platform_wrapper.c +++ b/sys/android/video_platform_wrapper.c @@ -158,21 +158,18 @@ platform_destroy_native_window (EGLNativeDisplayType display, } /* XXX: Drafted implementation */ -EGLClientBuffer -platform_crate_native_image_buffer (void) +EGLint * +platform_crate_native_image_buffer (EGLNativeWindowType win, EGLConfig config, + EGLNativeDisplayType display, const EGLint * egl_attribs) { - XWindowAttributes xattribs; - EGLNativePixmapType pix; + EGLNativePixmapType pix = NULL; EGLSurface pix_surface; EGLint *buffer = NULL; - if (!XGetWindowAttributes (display, win, &xattribs)) { - GST_CAT_ERROR (GST_CAT_DEFAULT, "Unable to get window attributes"); - goto ERROR; - } - - pix = XCreatePixmap (display, win, xattribs.width, xattribs.height, - xattribs.depth); + /* XXX: Need to figure out how to create an egl_native_pixmap_t to + * feed to eglCreatePixmapSurface. Another option: create an + * android_native_buffer_t to pass straight to eglCreateImageKHR. + */ pix_surface = eglCreatePixmapSurface (display, config, pix, egl_attribs); @@ -197,7 +194,7 @@ platform_crate_native_image_buffer (void) EGL_ERROR: GST_CAT_ERROR (GST_CAT_DEFAULT, "EGL call returned error %x", eglGetError ()); - XFreePixmap (display, pix); + /* XXX: Free native pixmap here */ ERROR: GST_CAT_ERROR (GST_CAT_DEFAULT, "Can't create native buffer. Bailing out"); return NULL; |