Creating a GStreamer source that publishes to NVMM

Hi,
Here is a sample that demonstrates

appsrc ! video/x-raw(memory:NVMM),format=RGBA,width=1920,height=1080 ! nvvidconv ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=a.mkv

Ensure you have installed jetson_multimedia_api(nvbuf_utils) and CUDA through SDKManager and run the build command:

// generate input frame data
$ gst-launch-1.0 videotestsrc num-buffers=150 ! video/x-raw,width=1920,height=1080,format=RGBA ! filesink location=1080.yuv
// build sample
$ CUDA_VER=10.2 make
// run
$ ./appsrc_nvmm
// check a.mkv for the effect

If you integrate it with test-appsrc, you should get a complete RTSP server.
gst-rtsp-server/test-appsrc.c at master · GStreamer/gst-rtsp-server · GitHub

This is another solution but not sure if it is better than your current implementation. FYR.