[Bug 703343] Add EGLImage support (consume and provide buffer pool)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Feb 6 04:32:09 PST 2014


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

--- Comment #3 from Julien Isorce <julien.isorce at gmail.com> 2014-02-06 12:32:04 UTC ---
I think we could create an "eglimagetrans" element that propose a
GstEGLImageBufferPool to upstream.

It would work in several different ways depending on what upstream and
downstream can support.

It only make sense to use the eglimagetrans element if downstream supports
GstVideoGLTextureUploadMeta.

A: If downstream also propose a GL context then it uses this context (or do GL
context sharing if there is a thread boundary).

Then it creates a GstEGLImageBufferPool using eglCreateImageKHR (gl_context,
EGL_GL_TEXTURE_2D_KHR, texture).


B: If downstream does not propose a gl context then it attempts to create a
GstEGLImageBufferPool using eglCreateImageKHR (EGL_NO_CONTEXT,
EGL_IMAGE_BRCM_MULTIMEDIA, bits) on RPI or EGL_NATIVE_BUFFER_ANDROID on android
 (Depends if the platform supports
http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_pixmap.txt)

In any case A or B, eglimagetrans attachs a GstVideoGLTextureUploadMeta to each
buffer that will call glEGLImageTargetTexture2DOES.

Finally eglimagetrans propose its pool to upstream. omxvideodec already knows
how to use it.

It avoid to manually make use of GstEGLImageBufferPool in every external
element that would like to provide it to upstream. (ex: playbin uri=foo
video-sink="eglimagetrans ! webkitvideosink)

Should be implemented in a way that eglimagetrans would be hidden when doing
omxvideodec ! glimagesink (factorized in GstGLUpload).
So that eglimagetrans is only required when using an external sink (= sink
which is not part of gst-plugins-gl)

Or re-enable glupload element
or use GstGLUpload in the external sink.

(Also it should be possible to do the reverse way, gleffects !
gstomxvideoencoder)

Depends on https://bugzilla.gnome.org/show_bug.cgi?id=706054

-- 
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