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

Hi, I would like to pass information to libnvsample_cudaprocess.so which is used in a gstreamer pipeline by nvivafilter.

Which is the easiest way to do this?

Which method do I use for a “one off” way to pass information, and which way can I dynamically pass data to my .so file while it is running in the pipeline?

I’d prefer to use a proper method compatible with nvivafilter rather than setting up my own Linux IPC method which could be nasty given the .so is dynamically used by nvivafilter.

Thanks.

You may get the public sources of nvvidconv that has similar implementation as nvivafilter, so you would be able to use the same CUDA processing with minor adaptation. You would be able to add properties to your custom plugin and check for these in your implementation.

My specific question was about nvivafilter.

I’d prefer not to have to build my own version of gstreamer plugins - I just want to use my .so.

Also, nvvidconv has no “cuda-process=true” option hence I expect it would not be optimised for CUDA.

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

1 Like

Thanks, I hadn’t realised it was as simple as setting a variable shared with the library.

Is there a speed difference between the first approach of nvivafilter and the second approach of appsink?

Hi,
It depends on yout use-case. It is fixed interface in using nvivafilter. If you need more flexibility in your development, may use appsink so that NvBuffer APIs can be used.

Honey_Patouceul’s suggestion is good. Since nvvidconv plugin is open source from Jetpack 4.5.1, you can download the source code and do customization on it.

1 Like

Okay, well I’ll just use the simplest solution for now and consider nvvidconv in the future. Thanks again.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.