About QT & nveglglessink

Hi everyone,

I’m currently working on implementing a video-player on QT using the following pipeline,
which only take about 5-10% cpu rate to play a 1080p mp4 file under terminal.

gst-launch-1.0 filesrc location=/path/to/file ! qtdemux ! h264parse ! queue ! 
               omxh264dec ! identity ! nveglglessink

But, so far I’m only able to run with a alternative pipe under QT

gst-launch-1.0 filesrc location=/path/to/file ! qtdemux ! h264parse ! queue ! 
               omxh264dec ! autovideoconvert ! identity ! nveglglessink

Now, here comes the odd part!
This two pipes works perfectly under terminals, but when trying to run them in QT.
The first can’t run because of internal error, which later found out to that it’s videonode can’t handle
the video format. The second runs with the cpu rate about 50-60%.

So in order to move on, there are several questions that I need to figure out.

Q1. I suppose that nveglegessink is using EGL and EGL is supported by xcb(x11) on jtk1, right?

Q2. Base on Q1. I build QT 5.4.0 with a qtmultimedia dev-branch that implements gst-1.0
from source, with config: -egl -opengl es2 -qpa xcb and Set QT_VIDEONODE=egl to use it’s egl
support videonode. It didn’t work out. What’s missing? configuration? or env settings?

Q3. Replace the autovideoconvert with nvvidconv in the second pipe gets the same result in QT.
On the other hand, run it under terminal the cpu pop to 50-60% ? Why?

Please, share your opinions or tell me what kind info you need.

Thx.

P.S. My jtk1 version is R21.1

[EDIT]
Scratch the misinterpreted part. check post #11.

I can only answer something related to Q1. Yes, EGL is supported on X11 (and only on X11).

Doing any videoconvert increases the load quite much, especially if it’s using anything else that nvvidconv as all others are using CPU only. I haven’t had very good experiences with nvvidconv either though.

Would you be interested in creating and sharing a minimal Qt code that uses the pipelines to render the video? That would allow others to try it and maybe provide some suggestions.

A short (perhaps irrelevant) note: Remember that if you run remote display EGL will not be supported unless your machine doing display has EGL. It might be relevant to know if you are sitting directly at the Jetson’s X11 display when running your app.

Similar issues exist for use of CUDA on remote machines, since GPU can be mistaken for remote display hardware.

Sorry for the late response.

After digging deeply through QT qtmultimedia source code.

I think the problem is that even I set the videonode to use egl and

replaced the xvimagesink of QGstreamerWindow to nveglglessink it’s not enough.

The QGstreamerVidoeRenderer and QGstvideoBuffer need to be changed as while.

Meaning that there’s still a long way to go.

Thx.

I think you can look at Freescale iMX modification in qt multimedia dev branch for inspiration,
ubuntu modification for mir or sailfish modification for qualcomm is also good inspiration.

Well,
the matter of fact, I did try-hard to imitate the QGstreamerMirTextureRenderer initially,
before I came across a hack inside of QDeclarativeVidpeOutput.
In bool QDeclarativeVideoOutput::createBackend(QMediaService *service),
it checks and tries to create rederer-kind backends before moves on to window-kinds,
so I bypass it to use window-kinds, QGstreamerVideoWindow, directly.

And it works for the QGstreamerVideoWindow’s original gst-sink xvimagesink, plays 1080p mp4 file with cpu rate 45-50%, but with nveglglessink I get the follow message under GST_DEBUG=2.

0:00:01.200304500 19026 0xb35030c0 ERROR            
egladaption /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gstegladaptation_egl.c:141:
gst_egl_adaptation_init_display:<eglglessink0> 
    Could not get EGL display connection

0:00:01.200349417 19026 0xb35030c0 ERROR            
egladaption /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gstegladaptation_egl.c:179:
gst_egl_adaptation_init_display:<eglglessink0> 
    Couldn't setup window/surface from handle

0:00:01.200378583 19026 0xb35030c0 ERROR          
nveglglessink /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gsteglglessink.c:502:egl_init:<eglglessink0> 
    Couldn't init EGL display

0:00:01.200405333 19026 0xb35030c0 ERROR          
nveglglessink /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gsteglglessink.c:528:
egl_init:<eglglessink0> 
    Failed to perform EGL init

GStreamer; Unable to pause - "file:///1080p.mp4"

0:00:01.200694417 19026 0xb35030c0 ERROR            
egladaption /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gstegladaptation_egl.c:141:
gst_egl_adaptation_init_display:<eglglessink0> 
    Could not get EGL display connection

0:00:01.200733417 19026 0xb35030c0 ERROR            
egladaption /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gstegladaptation_egl.c:179:
gst_egl_adaptation_init_display:<eglglessink0> 
    Couldn't setup window/surface from handle

0:00:01.200761167 19026 0xb35030c0 ERROR          
nveglglessink /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gsteglglessink.c:502:egl_init:<eglglessink0> 
    Couldn't init EGL display

0:00:01.200787167 19026 0xb35030c0 ERROR          
nveglglessink /dvs/git/dirty/git-master_linux/external/gstreamer/gst-nveglglessink/ext/eglgles/gsteglglessink.c:528:
egl_init:<eglglessink0> 
    Failed to perform EGL init


I double checked the *configures and digged through QXcbWindow, put debug message in it,
confirmed that I’m using egl with xcb.
And It still gave me this.

*configure:
QT 5.4.0 with qtmultimedia dev-branch gst-1.0 with main config: -egl -opengl es2 -qpa xcb

[EDIT]
Scratch the misinterpreted part. check post #11.

Had no ideal or break through since last post.
So here comes the whole package:
https://www.dropbox.com/s/ycf6txys4zns5bw/qt-5_4_0-dev-1_0.tar.bz2?dl=0

As I mentioned before, it’s the newly released Qt5.4.0 merged wtih the following dev-branch
https://github.com/qtproject/qtmultimedia/commit/108dda7a90bd0f0337358b0db47ae55acd16dea6

Mainly tinkered files:

qtmultimedia/src/plugins/gstreamer/mediaplayer/gstreamerplayerservice.cpp
qtmultimedia/src/plugins/gstreamer/mediaplayer/gstreamerplayersession.h
qtmultimedia/src/plugins/gstreamer/mediaplayer/gstreamerplayersession.cpp

and the hacked is in

qtmultimedia/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp

[s]
QT Build Configuration

#!/bin/sh
./configure -release -opensource -confirm-license \
-no-pch -nomake tests -nomake examples \
-skip qtwebkit -skip qtwebkit-examples \
-skip qtwebchannel -skip qtwebengine -skip qtwayland \
-egl \
-qpa xcb \
-no-eglfs \
-opengl es2 \
-qreal float \
-force-pkg-config \

(optional)
-prefix /usr/local/QT-5.4.0-dev 
-v

[/s]
Notes:
1.L4T Ver. R21.1
2.the original qtmultimedia folder is renamed as qtmultimedia_bak.
3.Inside the modified qtmultimedia also contains a backup of plagins/gstreamer/mediaplayer,
named mediaplayer_bak. In case anyone want to tried the original dev-branch.
4.And plz remember to pass GST-VERSION=1.0 to qtmultimedia.
5.the gst-sink switch is in gstreamerplayerservice.cpp. Pass nothing but this, as LINE 101, it will go for default sink xvimagesink

LINE:100 //--- TESTING
LINE:101 //m_videoWindow = new QGstreamerVideoWindow(this);
LINE:102 m_videoWindow = new QGstreamerVideoWindow(this, "nveglglessink");

[EDIT]
Scratch the config part. check post #11.

Some heads-ups.
1.It takes about 2 hours to make the package on JTK1, using make -j4 and skip all the webkits, so be patient.
2.If you encountered problem with -lQt5Designer while making qtquick1, remove -lQt5Designer from the following Makefile.

qtquick1/src/plugins/qdeclarativeview

3.After make & make install, you need a test program. Example qmlvideo of multimedia is the one you’re looking for.

qtmultimedia/examples/multimedia/video/qmlvideo

Some Updates:

Run: es2_info

EGL_VERSION: 1.4
EGL_VENDOR: NVIDIA
    ......
EGL_CLIENT_APIS: OpenGL_ES
GL_VERSION: OpenGL ES 3.1 NVIDIA 21.1
GL_RENDERER: GK20A/NullRM/AXI

Run: glx_info

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    ......
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    ......
GLX version: 1.4
GLX extensions:
    ......
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GK20A/NullRM/AXI
OpenGL core profile version string: 4.3.0 NVIDIA 21.1
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
    ......

[s]
Seems pretty legit that I’m using the correct libs, the thing that’s brothering me is this line

EGL_CLIENT_APIS: OpenGL_ES

The GL libs support up to OpenGL ES 3.1, but using OpenGL_ES as EGL_CLIENT’s api?
Well then, I rebuilt QT with config -opengl desktop instead of -opengl es2 .[/s]
And example program qmlvideo, got segfault while try to play, following with gdb log.

Message from  eglglessink0 : 32768

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb03ff430 (LWP 11998)]
0xb6057b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
(gdb) bt full
#0  0xb6057b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
No symbol table info available.
#1  0xae8bfef0 in ?? ()
   from /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstnveglglessink.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Work!Work!

[EDIT]
Scratch the misinterpreted part.

After testing with some OpenGL sample code, scratched the OpenGL_ES1 part of my last reply.
I’m now pretty sure that config with -opengl es2 is the right one.

As for the problem with nveglglessink won’t work,
went through the QT’s XCB platform & public gsteglglessink code and some test code,

Display* xdpy = XOpenDisplay("");
EGLDisplay tdpy = eglGetDisplay(xdpy);

Function eglgetdisplay() is the key.
It failed with ErrCode:3002 EGL_BAD_ACCESS when I tried to run these.
The EGLDisplay is most likely bounded to the xcb window already, so the eglgetdisplay() failed,
so much for the hack of using window-kind backend.
For now, I think this came to a dead end.
Even tried to inmate QGstreamerGLTexureRender to build a class around nveglglessink seems impossible,
cuz of gltexturesink, used in QGstreamerGLTexureRender, has some key properties
that allows it to pass display and context which nveglglessink doesn’t.
Final idea, build a gst-sink, as QGstVideoRendererSink or QVideoSurfaceGstSink, using egl myself…

More work!!!

[EDIT]
Scratch the misinterpreted part.

With more code digging, I think I made a critical mistake about the Qt’s OpenGL settings.

Qt configuration: -opengl ES2 is NOT the best option for JTK1 (it still works under some circumstances).
But in my case this configure led to the failure of eglgetdisplay() EGL_BAD_ACESS by occupied the EGL in the first place in QT.
The meaning of using EGL over XCB is much simpler than my original understanding. Just call the xcb and let it take care of EGL itself. So the proper config might be -opengl desktop or -opengl dynamic which only load EGL libs for preparation for XCB, not do all the matter for it.
And this works fine with QT example: contextinfo that can create all opengl contexts versioning from 1.0 to 4.4 (I’m using -opengl dynamic which auto select desktop while running).
Result Output of contextinfo OpenGL 4.4

*** Context information ***
Vendor: NVIDIA Corporation
Renderer: GK20A/NullRM/AXI
OpenGL version: 4.4.0 NVIDIA 21.1
GLSL version: 4.40 NVIDIA via Cg compiler

*** QSurfaceFormat from context ***
OpenGL version: 4.4
Profile: compatibility
Options: 
Renderable type: OpenGL
Depth buffer size: 24
Stencil buffer size: 0
Samples: -1
Red buffer size: 8
Green buffer size: 8
Blue buffer size: 8
Alpha buffer size: 0
Swap interval: 1

*** QSurfaceFormat from window surface ***
OpenGL version: 4.4
Profile: none
Options: 
Renderable type: OpenGL
Depth buffer size: 24
Stencil buffer size: 0
Samples: -1
Red buffer size: 8
Green buffer size: 8
Blue buffer size: 8
Alpha buffer size: 0
Swap interval: 1

*** Qt build information ***
Qt OpenGL configuration: Desktop
Qt OpenGL library handle: 0

Found 297 extensions:
......
GL_NVX_conditional_render
GL_NVX_nvenc_interop
GL_NV_ES1_1_compatibility
GL_NV_ES3_1_compatibility
GL_NV_bindless_multi_draw_indirect
GL_NV_bindless_multi_draw_indirect_count
GL_NV_bindless_texture
GL_NV_blend_equation_advanced
GL_NV_blend_equation_advanced_coherent
GL_NV_blend_square
GL_NV_compute_program5
GL_NV_conditional_render
GL_NV_copy_depth_to_color
GL_NV_copy_image
GL_NV_depth_buffer_float
GL_NV_depth_clamp
GL_NV_draw_texture
GL_NV_explicit_multisample
GL_NV_fence
GL_NV_float_buffer
GL_NV_fog_distance
GL_NV_fragment_program
GL_NV_fragment_program2
GL_NV_fragment_program_option
GL_NV_framebuffer_multisample_coverage
GL_NV_geometry_shader4
GL_NV_gpu_program4
GL_NV_gpu_program4_1
GL_NV_gpu_program5
GL_NV_gpu_program5_mem_extended
GL_NV_gpu_program_fp64
GL_NV_gpu_shader5
GL_NV_half_float
GL_NV_light_max_exponent
GL_NV_multisample_coverage
GL_NV_multisample_filter_hint
GL_NV_occlusion_query
GL_NV_packed_depth_stencil
GL_NV_parameter_buffer_object
GL_NV_parameter_buffer_object2
GL_NV_path_rendering
GL_NV_pixel_data_range
GL_NV_point_sprite
GL_NV_primitive_restart
GL_NV_register_combiners
GL_NV_register_combiners2
GL_NV_shader_atomic_counters
GL_NV_shader_atomic_float
GL_NV_shader_buffer_load
GL_NV_shader_storage_buffer_object
GL_NV_shader_thread_group
GL_NV_shader_thread_shuffle
GL_NV_texgen_reflection
GL_NV_texture_barrier
GL_NV_texture_compression_vtc
GL_NV_texture_env_combine4
GL_NV_texture_multisample
GL_NV_texture_rectangle
GL_NV_texture_shader
GL_NV_texture_shader2
GL_NV_texture_shader3
GL_NV_transform_feedback
GL_NV_transform_feedback2
GL_NV_vdpau_interop
GL_NV_vertex_array_range
GL_NV_vertex_array_range2
GL_NV_vertex_attrib_integer_64bit
GL_NV_vertex_buffer_unified_memory
GL_NV_vertex_program
GL_NV_vertex_program1_1
GL_NV_vertex_program2
GL_NV_vertex_program2_option
GL_NV_vertex_program3
GL_S3_s3tc
GL_SGIS_generate_mipmap
GL_SGIS_texture_lod
GL_SGIX_depth_texture
GL_SGIX_shadow
GL_SUN_slice_accum
......

But it segfalut when tried to run the example qmlvideo with nveglglessink modification.
Seems like there’s something odd happening inside nveglglessink

(gdb) run
Starting program: /JTK1/qmlvideo 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
QML debugging is enabled. Only use this in a safe environment.
[New Thread 0xb4255430 (LWP 8835)]
[New Thread 0xb32eb430 (LWP 8837)]
[New Thread 0xb2036430 (LWP 8838)]
[New Thread 0xb0dff430 (LWP 8839)]
[New Thread 0xb03ff430 (LWP 8840)]
[Thread 0xb0dff430 (LWP 8839) exited]
[Thread 0xb03ff430 (LWP 8840) exited]
	=============================================================
	| WARNING!!! THIS VERSION OF QMEDIAPLAYER HAS BEEN MODIFIED |
	| BASE ON QT DEVELOPMENT PORJECT THAT PORTS GST 0.10 TO 1.0 |
	| GST_VERSION: 1.2.4, WITH VIDEO OUTPUT SINK: nveglglessink |
	=============================================================
0:00:00.123237000  8832 0xb39030c0 WARN                     omx /dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomx.c:2778:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /root/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and Mjstreaming[New Thread 0xb03ff430 (LWP 8841)]
[New Thread 0xb0dff430 (LWP 8842)]
[New Thread 0xae470430 (LWP 8843)]
[New Thread 0xadc70430 (LWP 8844)]
0:00:01.245543499  8832   0x45c120 WARN                 qtdemux qtdemux.c:7977:qtdemux_parse_trak:<qtdemux0> unknown version 00000000
0:00:01.247655666  8832 0xb39030c0 WARN             autoconvert gstautoconvert.c:1247:gst_auto_convert_src_query:<autoconvertchild> Got upstream query of type duration while no element was selected, forwarding.
0:00:01.247805916  8832 0xb39030c0 WARN             autoconvert gstautoconvert.c:1247:gst_auto_convert_src_query:<autoconvertchild> Got upstream query of type seeking while no element was selected, forwarding.
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 4935: NvMMLiteBlockOpen 
[New Thread 0xab6eb430 (LWP 8845)]
[New Thread 0xaaeeb430 (LWP 8846)]
NvMMLiteBlockCreate : Block : BlockType = 261 
[New Thread 0xaa6eb430 (LWP 8847)]
TVMR: cbBeginSequence: 571: BeginSequence  1920x1088, bVPR = 0
TVMR: cbBeginSequence: 813: DecodeBuffers = 3 
TVMR: cbBeginSequence: 833: Display Resolution : (1920x1080) 
TVMR: cbBeginSequence: 834: Display Aspect Ratio : (1920x1080) 
TVMR: cbBeginSequence: 996: SurfaceLayout = 3
TVMR: cbBeginSequence: 1026: NumOfSurfaces = 7, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1 
Allocating new output: 1920x1088 (x 9), ThumbnailMode = 0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb0dff430 (LWP 8842)]
0xb6055b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
(gdb) bt full
#0  0xb6055b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
No symbol table info available.
#1  0xae87aef0 in ?? () from /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstnveglglessink.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

More Updates.

I successfully build an eglglessink from gst-plugins-bad1.0-1.24 with *patch on JTK1.
It works perfectly, as low cpu usage as nveglglessink under console with gst-pipeline

gst-launch-1.0 filesrc location=/1080p.mp4 ! qtdemux ! h264parse ! queue ! omxh264dec ! autovideoconvert ! identity ! eglglessink

And with the same issue as well, under QT it segfault. But this time we have more GDB info.

(gdb) r
Starting program: /JTK1/qmlvideo 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb4255430 (LWP 22260)]
[New Thread 0xb32eb430 (LWP 22262)]
[New Thread 0xb2036430 (LWP 22263)]
[New Thread 0xb0d7f430 (LWP 22264)]
[New Thread 0xb03ff430 (LWP 22265)]
[Thread 0xb0d7f430 (LWP 22264) exited]
[Thread 0xb03ff430 (LWP 22265) exited]
	=============================================================
	| WARNING!!! THIS VERSION OF QMEDIAPLAYER HAS BEEN MODIFIED |
	| BASE ON QT DEVELOPMENT PORJECT THAT PORTS GST 0.10 TO 1.0 |
	| GST_VERSION: 1.2.4, WITH VIDEO OUTPUT SINK: nveglglessink |
	=============================================================
0:00:00.215734167 22257 0xb39030c0 WARN                     omx /dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomx.c:2778:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /root/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and Mjstreaming[New Thread 0xb03ff430 (LWP 22267)]
[New Thread 0xb0d7f430 (LWP 22268)]
[New Thread 0xae392430 (LWP 22269)]
[New Thread 0xadb92430 (LWP 22270)]
0:00:02.483581416 22257   0x520f20 WARN                 qtdemux qtdemux.c:7977:qtdemux_parse_trak:<qtdemux0> unknown version 00000000
0:00:02.497137416 22257 0xb39030c0 WARN             autoconvert gstautoconvert.c:1247:gst_auto_convert_src_query:<autoconvertchild> Got upstream query of type duration while no element was selected, forwarding.
0:00:02.497377916 22257 0xb39030c0 WARN             autoconvert gstautoconvert.c:1247:gst_auto_convert_src_query:<autoconvertchild> Got upstream query of type seeking while no element was selected, forwarding.
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 4935: NvMMLiteBlockOpen 
[New Thread 0xab5eb430 (LWP 22271)]
[New Thread 0xaadeb430 (LWP 22272)]
NvMMLiteBlockCreate : Block : BlockType = 261 
[New Thread 0xaa5eb430 (LWP 22273)]
TVMR: cbBeginSequence: 571: BeginSequence  1920x1088, bVPR = 0
TVMR: cbBeginSequence: 813: DecodeBuffers = 3 
TVMR: cbBeginSequence: 833: Display Resolution : (1920x1080) 
TVMR: cbBeginSequence: 834: Display Aspect Ratio : (1920x1080) 
TVMR: cbBeginSequence: 996: SurfaceLayout = 3
TVMR: cbBeginSequence: 1026: NumOfSurfaces = 7, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1 
Allocating new output: 1920x1088 (x 9), ThumbnailMode = 0

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb0d7f430 (LWP 22268)]
0xb6055b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
(gdb) bt full
#0  0xb6055b66 in glGetString () from /usr/lib/arm-linux-gnueabihf/libGL.so.1
No symbol table info available.
#1  0xae8da394 in gst_egl_adaptation_init_exts (ctx=ctx@entry=0x425500)
    at gstegladaptation_egl.c:126
        eglexts = 0x443300 "EGL_NV_system_time EGL_KHR_surfaceless_context EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_config_attribs EGL_KH"...
        glexts = <optimized out>
        __FUNCTION__ = "gst_egl_adaptation_init_exts"
#2  0xae8d9d1c in gst_egl_adaptation_init_surface (ctx=0x425500, format=GST_VIDEO_FORMAT_I420)
    at gstegladaptation.c:470
        ret = 174 '\256'
        texnames = {0x0, 0x0, 0x0}
        frag_prog = 0x0
        free_frag_prog = 0
        i = <optimized out>
        __FUNCTION__ = "gst_egl_adaptation_init_surface"
#3  0xae8d7644 in gst_eglglessink_configure_caps (caps=0x3c5800, eglglessink=<optimized out>)
    at gsteglglessink.c:2146
        ret = <optimized out>
        info = {finfo = 0xaed4f64c, interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, 
          flags = GST_VIDEO_FLAG_NONE, width = 1920, height = 1080, size = 3110400, views = 1, 
          chroma_site = GST_VIDEO_CHROMA_SITE_UNKNOWN, colorimetry = {
            range = GST_VIDEO_COLOR_RANGE_16_235, matrix = GST_VIDEO_COLOR_MATRIX_BT709, 
            transfer = GST_VIDEO_TRANSFER_BT709, primaries = GST_VIDEO_COLOR_PRIMARIES_BT709}, 
          par_n = 1, par_d = 1, fps_n = 30, fps_d = 1, offset = {0, 2073600, 2592000, 0}, stride = {
            1920, 960, 960, 0}, _gst_reserved = {0x0, 0x0, 0x0, 0x0}}
#4  render_thread_func (eglglessink=0x46e4f8) at gsteglglessink.c:576
        caps = 0x3c5800
        object = 0x3c5800
        message = <optimized out>
        val = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, 
              v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}, {v_int = 0, v_uint = 0, 
              v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, 
              v_pointer = 0x0}}}
        item = 0x55bcf0
        last_flow = GST_FLOW_OK
        __FUNCTION__ = "render_thread_func"
#5  0xb5f75eda in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

which trace back to gstegladaptation_egl.c

void
gst_egl_adaptation_init_exts (GstEglAdaptationContext * ctx)
{
  ......
  eglexts = eglQueryString (gst_egl_display_get (ctx->display), EGL_EXTENSIONS);
  glexts = glGetString (GL_EXTENSIONS); <--- This Line !!!
  ......
  return;
}

Haven’t totally figure it out yet, just keep on digging !!!

*patch:
bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=730986

Last update.

I had been tinkering with eglglessink ever since I can build it from source.
Witch is definitely not good, one obviuos reasons is that this gst-element is out of dated.
( Removed & Replaced by glimagesink from gst-plugins-bad last April )

Still, I managed to modified the sink’s code to take in native display and play 1080p 30fps mp4 film with
about 12% cpu rate using Qt’s sample: qmlvideo.
BUT!!!
This only works for single mediaplayer per window. (with a *technical hiccup)
If there’re multiple medaiplayers under the same window, they can’t run simultaneously.
The start of one will stop the others. Totally, not acceptable for my application.
I think this topic came to a Dead End.

P.S.
*technical hiccup: need to start the video twice at first play.

https://github.com/kulve/gst-multiwindow seems to have similar issue when playing multiple video streams using nveglglessink. It should be fixed in next L4T release.

Hi, this subject is quiet old, but it seems to be still actual. Today, I encountered the very same error trying to mix qt, 4k video and gstreamer…

Thread 36 “omxh265dec-omxh” received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f0bfff020 (LWP 21680)]
0x0000007fb67dc98c in glGetString () from /usr/lib/aarch64-linux-gnu/tegra/libGL.so.1
(gdb)
(gdb) bt
#0 0x0000007fb67dc98c in glGetString () from /usr/lib/aarch64-linux-gnu/tegra/libGL.so.1
#1 0x0000007fa9d7ef04 in ?? () from /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnveglglessink.so
#2 0x0000007fa9d7e738 in ?? () from /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnveglglessink.so
#3 0x0000007fa9d82c3c in ?? () from /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnveglglessink.so
#4 0x0000007fafa35634 in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
#5 0x0000007f1b7fc8b8 in ?? ()

over sinks are well handled, but for instance for nvoverlaysink, one cannot get any new window upon the always fullscreen content…

Otherwise, trying to decode the stream using gstreamer gave nice results :

gst-launch-1.0 filesrc location=bbb_sunflower_2160p_60fps_hevc.mp4 ! decodebin ! nveglglessink

did play the content fairly well.

does someone have any hints about any progress about the subject ?

I am working on a Jetson TX2, and am using the latest jetpack version.