gst-dsexample_sources plugin error when calling NvEGLImageFromFd

When I run with the example DeepStream plugin like so (on the Jetson TX2)

gst-launch-1.0 uridecodebin uri=file:///home/nvidia/Videos/short.mp4 ! dsexample ! fakesink

I get

NvEGLImageFromFd: Failed to create EGLImage from dma-buf fd (1027)

in the function

get_converted_mat

What could be the problem?

Thanks in advance

Hi Frederickk,
Do you have export DISPLAY=:0 before this command?

Thanks
wayne zhu

Yes

Another problem that could be related → from the sample
tegra_multimedia_api/samples/02_video_dec_cuda

When I run

video_dec_cuda ${HOME}/Videos/sample_720p.mp4 H264

I get the error:

Failed to query video capabilities: Inappropriate ioctl for device
NvMMLiteOpen : Block : BlockType = 261
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen
NvMMLiteBlockCreate : Block : BlockType = 261
Failed to query video capabilities: Inappropriate ioctl for device
Starting decoder capture loop thread
Input file read complete
TVMR: NvMMLiteTVMRDecDoWork: 6531: NVMMLITE_TVMR: EOS detected
TVMR: TVMRBufferProcessing: 5486: Processing of EOS
TVMR: TVMRBufferProcessing: 5563: Processing of EOS Done
Segmentation fault (core dumped)

Found the problem: missing eglInitialize in the sample