GNOME Bugzilla – Bug 784365
gst-omx: make generic the OMX_UseEGLImage code path
Last modified: 2017-08-01 09:46:37 UTC
Currently the code path, that negotiates and register eglimages with OMX_UseEGLImage, is guarded with #ifdef RPI. It makes it hard to maintain and improve. But thanks to Tizonia that works and Desktop and which supports OMX_UseEGLImage it is now possible to enable and test this code path on desktop. At the moment there is *no* Tizonia component that returns success when calling OMX_UseEGLImage but at least this allows to run the code and validate the fallback mechanism. But soon enough we should have a Tizonia hw component working on desktop so we will be able to fully test this omx/eglimage code path.
Created attachment 354709 [details] [review] omxvideodec: fix buffer leak when eglimage setup fails
Created attachment 354711 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path Tested on Desktop in a VM with Tizonia with pipeline: GST_GL_PLATFORM=egl GST_GL_API=gles2 GST_OMX_CONFIG_DIR=tizonia gst-launch-1.0 filesrc location=test.webm ! matroskademux ! omxvp8dec ! glimagesink This validate the build and the code path where OMX_UseEGLImage fails and the decoder fallbacks to classic path.
Created attachment 355426 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path Only include required gstgl headers (#include <gst/gl/egl/gstglmemoryegl.h>) instead of all gstgl headers (#include <gst/gl/gl.h>).
Comment on attachment 354709 [details] [review] omxvideodec: fix buffer leak when eglimage setup fails commit 7b114b131f018dddf06acacab1c9356299492725 Author: Julien Isorce <jisorce@oblong.com> Date: Thu Jun 29 23:17:26 2017 +0100 omxvideodec: fix buffer leak when eglimage setup fails Can happen if gst_buffer_pool_acquire_buffer succeeds but gst_buffer_n_memory (buffer) is not exactly 1. In theory this should not happen because the decoder requests EGLImage(RGBA) but better to fix any leak on corner cases. https://bugzilla.gnome.org/show_bug.cgi?id=784365
Created attachment 356687 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path Just rebase
Created attachment 356688 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path Build fix
Built and tested on rpi3. Doesn't seem to cause any regression.
Comment on attachment 355426 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path commit 86d9a2c81c60a3a246c7052e70e9d50b8a12b156 Author: Julien Isorce <jisorce@oblong.com> Date: Mon Jul 17 21:06:47 2017 +0100 omxvideodec: make generic the OMX_UseEGLImage code path Will be easier to maintain and to make enhancements. Tested with Tizonia on Desktop. Also tested with Bellagio to make sure it does not crash when calling OMX_UseEGLImage and indeed it returns NotImplemented. Then gst-omx fallback to OMX_UseBuffer if it can and so on. Also tested on rpi to make sure there is no regression. https://bugzilla.gnome.org/show_bug.cgi?id=784365
(In reply to Guillaume Desmottes from comment #7) > Built and tested on rpi3. Doesn't seem to cause any regression. Thx a lot!
Comment on attachment 356688 [details] [review] omxvideodec: make generic the OMX_UseEGLImage code path commit 86d9a2c81c60a3a246c7052e70e9d50b8a12b156 Author: Julien Isorce <jisorce@oblong.com> Date: Mon Jul 17 21:06:47 2017 +0100 omxvideodec: make generic the OMX_UseEGLImage code path Will be easier to maintain and to make enhancements. Tested with Tizonia on Desktop. Also tested with Bellagio to make sure it does not crash when calling OMX_UseEGLImage and indeed it returns NotImplemented. Then gst-omx fallback to OMX_UseBuffer if it can and so on. Also tested on rpi to make sure there is no regression. https://bugzilla.gnome.org/show_bug.cgi?id=784365