accessing memory of type EGLImage

Hi,

I’ve a gstreamer pipeline where plugins omxh264dec and nveglglesink are connected directly to each other. I can see that they negotiate to exchange buffers containing memory type “EGLImage” and format “RGBA”. Intermittently, I would like to pull samples from the sink (using it’s “last-sample” property) and process them. However, it seems, I cannot directly access the memory payload. The program seg faults when I try to copy the payload to a newly allocated system memory block.

How would I go about accessing memory of type EGLImage?

Thanks

Please refer to https://devtalk.nvidia.com/default/topic/1006870/jetson-tk1/processing-video-with-eglimages-/post/5140825/#5140825

Hi DaneLLL,

The attached post recommends using nveglglessink as the rendering plugin since it optimizes the slow rendering path implemented in the generic eglglessink plugin. I’m already using this plugin as my sink. The gst-launch equivalent for my pipeline looks like:

gst-launch-1.0 -v videotestsrc ! omxh264enc ! queue ! h264parse ! omxh264dec ! nveglglessink enable-last-sample=true

In some sense, I’m trying to achieve the exact opposite of your linked post. I would like to take the video data from the last sample, presumably in GPU memory and bring into CPU memory for further processing. Any insights on how to achieve this would be appreciated.

Thanks

Hi bob_the_builder,
You can get the source code of nveglglessink at
https://developer.nvidia.com/embedded/dlc/l4t-Jetson-TK1-GstEGL-Sources-R21-5

,implement the processing, rebuild and replace the library.