[Bug 706054] move GstEGLImageBufferPool and allocator from eglglessink to gstegl lib

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 22 00:56:32 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=706054
  GStreamer | gst-plugins-bad | git

--- Comment #34 from Julien Isorce <julien.isorce at gmail.com> 2014-01-22 08:56:29 UTC ---
(In reply to comment #33)
> Review of attachment 263277 [details]:
> 
> I did not have time to review it completely yet.

Thx!

> 
> ::: gst-libs/gst/egl/egl.h
> @@ +106,3 @@
> +    gpointer blocking_allocate_data, GDestroyNotify destroy_func);
> +void gst_egl_image_buffer_pool_replace_last_buffer (GstEGLImageBufferPool *
> pool, GstBuffer * buffer);
> +void gst_egl_image_buffer_pool_get_video_infos (GstEGLImageBufferPool * pool,
> GstVideoFormat * format, gint * width, gint * height);
> 
> Why not return a GstVideoInfo here?

Indeed :)

> 
> @@ +109,3 @@
> +
> +/* TODO: will be removed after moving gst_egl_image_allocator_alloc_eglimage
> */
> +GstAllocator *gst_egl_image_buffer_pool_get_allocator (GstEGLImageBufferPool *
> pool);
> 
> Do we want to move it, and where and how? It's involving lots of GL calls and
> with that we get lots of problems :)
> 
> Maybe for all this we should just get gst-plugins-gl into shape.

About "gst_egl_image_allocator_alloc_eglimage" here is the function:
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/eglgles/gstegladaptation_egl.c#n427

So yup I should at least change the comment. Because I will not move it to
gstegl lib for sure. After pushing attached patch 263277 the next step will be
to split gst_egl_image_allocator_alloc_eglimage to separate eglCreateImageKHR
calls and GL calls.

Also because we can create an eglimage from other EGLClientBuffer than
gltextures (ex: 

EGLint eglImageAttributes[] = {EGL_WIDTH, ImageWidth, EGL_HEIGHT, ImageHeight,
EGL_MATCH_FORMAT_KHR,  EGL_FORMAT_RGB_565_KHR, EGL_IMAGE_PRESERVED_KHR,
EGL_TRUE, EGL_NONE};

On RPI:
eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_IMAGE_BRCM_MULTIMEDIA, buf,
eglImageAttributes);

Or on Android:

EGLImageKHR image = eglCreateImageKHR(display, EGL_NO_CONTEXT,
EGL_NATIVE_BUFFER_ANDROID, cbuf, eglImageAttributes);

)

And the remaining GL calls will stay in eglglessink for now.

So this way we would be able to use GstEGLImageBufferPool in:

Current code that already use it:
- eglglessink
- gst-omx/testegl.c

Future code:
- gst-plugins-gl: we could start using the GstEGLImageBufferPool even if we
keep its code in -bad/gstegl lib for now.
- omxvideodec: create this buffer pool using EGL_NO_CONTEXT (see above) and put
glEGLImageTargetTexture2DOES call into a
gst_video_gl_texture_upload_meta_upload, so that webkit could use it without
having to use  the GstEGLImageBufferPool directly from the video sink.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list