added cudaFromGstSample to jetson-inference python bindings


I tried to get jetson-inference to analyze a video file (H.264 encoded) using python and GStreamer but I found some road blocks like what to do with the GstSample obtained from GStreamer and how to copy it (since it’s NVMM memory) to CUDA so it can then be used by jetson-inference.

After a couple of nights I ended up being able to load and analyze a video file using jetson-inference. I created a new cudaFromGstSample that can be used from directly from python. This is not optimal since a memcpy needs to happen, but it was good enough for my use case.

I’m not 100% sure that what I did was the right thing, so I’d love to hear any comments.

Here’s the pull request for the jetson-utils repo with more details:



Thanks for your contribute.
I will forward this information to Dusty : )