Hello there, hoping you can help me out with an issue we’re running into. We’re seeing that stopping a gstreamer pipeline with one of the hardware encoders in it destroys our EGLContext.
I have made a small sample program, which works on JetPack 4.4.1 (L4T 32.4.4), but fails on JetPack 5.0.2.
eglcontext-repro.cpp (2.0 KB)
You can compile it as follows:
g++ eglcontext-repo.cpp -o repro -I/usr/include/gstreamer-1.0/ -I/usr/lib/aarch64-linux-gnu/glib-2.0/include/ -I/usr/include/glib-2.0/ -I/usr/include -lEGL -lgstreamer-1.0
On JetPack 5.0.2:
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 0
NVMEDIA: Need to set EMC bandwidth : 846000
NVMEDIA: Need to set EMC bandwidth : 846000
NVMEDIA_ENC: bBlitMode is set to TRUE
tmp: tmp.cpp:66: int main(): Assertion `eglGetCurrentContext() != EGL_NO_CONTEXT && "CONTEXT IS NO LONGER CURRENT"' failed.
Aborted (core dumped)
On JetPack 4.4.1:
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 0
When I replace the part from nvv4l2h264enc
with fakesink, the assert passes.
Hoping you can help me out, thanks in advance!