How can I pass information to a user CUDA library used by nvivafilter?

Hi,
There are two samples of customizing libnvsample_cudaprocess.so. Please refer ot the posts:
Unable to overlay text when using udpsrc - #13 by DaneLLL
New Features for nvivafilter - #8 by DaneLLL

Another approach is to pass NVMM buffer to appsink plugin and then you can use NvBuffer APIs to access/process the buffers. Please take a look at
How to run RTP Camera in deepstream on Nano - #29 by DaneLLL