nvdec: "OpenGL context is not CUDA-compatible, fallback to system memory" after creating glimagesink in 1.20.3
Michiel Konstapel
michiel at aanmelder.nl
Mon Jul 18 08:38:49 UTC 2022
After updating from gstreamer from 1.18.3 to 1.20.3 (and Ubuntu from
20.04 to 22.04) my pipeline no longer works:
nvdec gstnvdec.c:1770:gst_nvdec_check_cuda_device_from_context: CUDA
call failed: CUDA_ERROR_INVALID_GRAPHICS_CONTEXT, invalid OpenGL or
DirectX context
nvdec gstnvdec.c:1822:gst_nvdec_ensure_gl_context:<nvh264dec0> Current
OpenGL context is not CUDA-compatible
nvdec gstnvdec.c:646:gst_nvdec_negotiate:<nvh264dec0> OpenGL context is
not CUDA-compatible, fallback to system memory
(Then negotiation fails because downstream expects memory:GLMemory)
However, this only happens when there is a glimagesink in the pipeline.
If I take that out, then apparently nvh264dec gets a context it likes
and all is well.
This gst-launch pipeline works, and prints helpful messages indicating
both get different, suitable contexts?
gst-launch-1.0 v4l2src device=/dev/video0 ! h264parse ! nvh264dec !
"video/x-raw(memory:GLMemory)" ! glimagesink
Setting pipeline to PAUSED ...
error: XDG_RUNTIME_DIR not set in the environment.
Pipeline is live and does not need PREROLL ...
Got context from element 'sink': gst.gl.GLDisplay=context,
gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayEGL\)\ gldisplayegl0";
Got context from element 'nvh264dec0': gst.cuda.context=context,
gst.cuda.context=(GstCudaContext)"\(GstCudaContext\)\ cudacontext0",
cuda-device-id=(int)0;
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Any clue on how to fix this, or where to start debugging?
Thanks in advance,
Michiel
More information about the gstreamer-devel
mailing list