Headless mode for GL plugin

Alexander Yanin sashayanin at gmail.com
Mon Mar 26 11:17:22 UTC 2018


Here are the debug logs:
​https://pastebin.com/x610epZd

No, I am running on a system with one GPU.

2018-03-26 13:25 GMT+03:00 Matthew Waters <ystreet00 at gmail.com>:

> Hmm, from your earlier log, it seems the gldisplaygbm is not being used
>
> Step 1 is to figure out why.
>
> Try getting some more debug logs from the gbm detection with:
>
> GST_DEBUG=gldisplay:7,gleglgbm:7,gl*:4,3 gst-launch-1.0 <pipeline>
>
> This should show what's detected and what fails for you.
>
> Random side guess.  Are you running on a dual-GPU system?
>
> Cheers
> -Matt
>
>
> On 26/03/18 21:16, Alexander Yanin wrote:
>
> It seems that this flag is set:
>> $ cat ​/usr/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h | grep
> GST_GL_HAVE_WINDOW_GBM
>
> #define GST_GL_HAVE_WINDOW_GBM 1
>
> GBM platform is supported by EGL. eglinfo output:
>
> GBM platform:
> EGL API version: 1.4
> EGL vendor string: Mesa Project
> EGL version string: 1.4 (DRI2)
> EGL client APIs: OpenGL OpenGL_ES
>
> openglmixer plugin is linked against GBM and EGL:
>
> $ ldd /usr/lib/gstreamer-1.0/libgstopenglmixers.so
>
> libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007f9b28daa000)
> libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f9b28b98000)
> libgbm.so.1 => /usr/lib/libgbm.so.1 (0x00007f9b28989000)
>
> 2018-03-26 12:53 GMT+03:00 Matthew Waters <ystreet00 at gmail.com>:
>
>> Arch may be missing the GBM window system.
>>
>> Check if
>>
>> #define GST_GL_HAVE_WINDOW_GBM 1
>>
>> Is true inside /usr/lib/gstreamer-1.0/gst/gl/gstglconfig.h
>>
>> Cheers
>> -Matt
>>
>>
>> On 26/03/18 19:45, Alexander Yanin wrote:
>>
>> Unfortunately, it doesn't work out of the box for me on Arch. Here is the
>> output^
>>
>> glcontext gstglcontext.c:337:gst_gl_context_new: creating a context for
>> display <gldisplayegl0>, user choice:(null)
>> glwindow gstglwindow.c:251:gst_gl_window_new: creating a window, user
>> choice:gbm
>> glwindow gstglwindow.c:293:gst_gl_window_new: Could not create window.
>> user specified gbm, creating dummy window
>> glcontext gstglcontext.c:1240:gst_gl_context_create_thread:<glcontextegl23>
>> Attempting to create opengl context. user chosen api(s) (any), compiled api
>> support (opengl opengl3 gles2) display api (opengl opengl3 gles2)
>> glcontext gstglcontext.c:1244:gst_gl_context_create_thread:<glcontextegl23>
>> Failed to create context
>> glcontext gstglcontext.c:1046:gst_gl_context_create:<glcontextegl23> gl
>> thread created
>> glmixer gstglbasemixer.c:176:_get_gl_context:<mixer> error: Failed to
>> initialize egl: EGL_NOT_INITIALIZED
>>
>> Did Arch maintainers miss some compile-time flags or have I done
>> something wrong?
>>
>> 2018-03-23 15:30 GMT+03:00 Alexander Yanin <sashayanin at gmail.com>:
>>
>>> Thank you, Matt. I will try, hope this should work with 1.14​
>>>
>>> 2018-03-23 15:25 GMT+03:00 Matthew Waters <ystreet00 at gmail.com>:
>>>
>>>> It should work out of the box if you don't already have an X11/Wayland
>>>> display server running.  It's chosen after X11/Wayland connections fail.
>>>>
>>>> You can also force it by setting the environment variable
>>>> GST_GL_WINDOW=gbm
>>>>
>>>> e.g. GST_DEBUG=gl*:4 GST_GL_WINDOW=gbm gst-launch-1.0 videotestsrc !
>>>> glupload ! gleffects_squeeze ! glcolorconvert ! gldownload ! pngenc !
>>>> filesink location=test.png
>>>>
>>>> Cheers
>>>> -Matt
>>>>
>>>>
>>>> On 23/03/18 22:57, Alexander Yanin wrote:
>>>>
>>>> ​Thanks! Fine, what I need to do to make it work on Intel Kabylake with
>>>> Mesa and without neither xorg nor wayland? Would it work right out of the
>>>> box or should I perform some additional actions to make it run?
>>>>
>>>> 2018-03-23 14:50 GMT+03:00 Matthew Waters <ystreet00 at gmail.com>:
>>>>
>>>>> Accessing the GPU without a windowing system is something that is very
>>>>> specific to every driver/hardware combination.  We support (with 1.14) one
>>>>> method using kms and a libgbm compatible driver which are used by all of
>>>>> the Mesa drivers.  Some other embedded systems (rpi, imx6) have other ways.
>>>>> That nvidia blog post you've linked contains references to
>>>>> EGL_EXT_device_query
>>>>> <https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_query.txt>
>>>>> which I guess is nvidia's way of performing a similar thing and such a
>>>>> method could be added to the GStreamer GL library and plugins.
>>>>>
>>>>> Cheers
>>>>> -Matt
>>>>>
>>>>>
>>>>> On 23/03/18 21:10, Alexander Yanin wrote:
>>>>>
>>>>> Hi!
>>>>>
>>>>> Is it possible to use GL elements (like glvideomixer, glupload,
>>>>> gleffects, etc) without anything like Wayland, Xorg, etc? In particular, I
>>>>> want to use glvideomixer instead of compositor on a server without any
>>>>> display attached. I heard about a possible workaround using frame buffer,
>>>>> but I didn't manage to find a way to use glvideomixer without xorg or
>>>>> wayland. It crushes on context initialization.
>>>>>
>>>>> Here is the output:
>>>>>
>>>>> glmixer gstglbasemixer.c:217:_get_gl_context:<mixer> error: Failed to
>>>>> initialize egl: EGL_NOT_INITIALIZED
>>>>> glwindow gstglwindow.c:285:gst_gl_window_new: Could not create
>>>>> window. user specified (null), creating dummy window
>>>>> glcontext gstglcontext.c:1235:gst_gl_context_create_thread:<glcontextegl48>
>>>>> Failed to create context
>>>>>
>>>>> So, is there a way to bypass this issue without using xorg or wayland?
>>>>> I heard that it is possible to initialize EGL without xorg [1]. Is it
>>>>> possible to use this approach within gl elements?
>>>>>
>>>>> [1] - https://devblogs.nvidia.com/egl-eye-opengl-visualization-w
>>>>> ithout-x-server/
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>>
>>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180326/0a24eeaf/attachment-0001.html>


More information about the gstreamer-devel mailing list