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

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Aug 26 03:07:41 PDT 2013


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

--- Comment #9 from Julien Isorce <julien.isorce at gmail.com> 2013-08-26 10:07:38 UTC ---
(In reply to comment #6)
> (In reply to comment #4)
> > > ::: gst-libs/gst/egl/Makefile.am
> > > @@ +20,3 @@
> > >      $(GST_LIBS) \
> > > +    $(EGL_LIBS) \
> > > +    $(EGLGLES_LIBS)
> > > 
> > > This now makes the egl library depend on GL or GLES, that's not how it was
> > > intended
> > 
> > Yes sure but how to deal with glGenTextures/glBindTexture/glTexImage2D calls
> > before the eglCreateImageKHR call then ?
> 
> That would be done by the callback that is passed to the pool, no?

No, there is 2 things. The callback I added in the API is to ask allocation in
another thread.
For example in eglglessink it would be a function that just call
gst_eglglessink_queue_object with structure name
""eglglessink-allocate-eglimage". Actually you cannot see it well in the patch
because of the move of the function. Sorry about that I'll do it step by step.

The second thing is just gst_egl_adaptation_allocate_eglimage that I renamed to

GstBuffer *
gst_egl_image_allocator_alloc_eglimage (GstAllocator * allocator,
    GstEGLDisplay * display, GstEGLContext * context, GstVideoFormat format,
    gint width, gint height)

and this is the function that I really need to factorize to avoid big copy/past
in webkitVideoSink (and also GstEGLBufferPool).
But this function depends on both egl and gl so ? Well I'll try to find a
solution

> 
> > > @@ +42,3 @@
> > > +
> > > +gboolean gst_gl_got_error (const char *wtf);
> > > +gboolean gst_egl_got_error (const char *wtf);
> > > 
> > > These should not be public
> > 
> > why ? if we want to use it in eglglessink as well
> 
> Because they're internal helper functions and not really pretty for general
> usage.
> 
> > > @@ +90,3 @@
> > > +EGLint gst_egl_display_get_major (GstEGLDisplay * display);
> > > +EGLint gst_egl_display_get_minor (GstEGLDisplay * display);
> > > +void gst_egl_display_set_version (GstEGLDisplay * display, EGLint major,
> > > EGLint minor);
> > > 
> > > Shouldn't the display get the version from itself, instead of having the user
> > > supply it?
> > 
> > ok so I should move the call to eglInitialise to gstegl lib:
> > 
> > So it's like replacing gst_egl_display_set_version by:
> > 
> > gboolean gst_egl_display_initialize (GstEGLDisplay * display)
> > [...]
> > 
> > ?
> 
> I guess so
> 
> > Actually every call to egl should go progressively to gstegl lib.
> 
> That's not really the goal of that library, we don't want to create
> GObject-like bindings for EGL. It should just contain whatever is necessary to
> allow EGLImage usage between different elements in GStreamer pipelines. These
> elements can use EGL and GL/GLES themselves.

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