Nvivafilter - what is the purpose of pre_process and post_process?

I have a gstreamer pipeline that uses this element:

nvivafilter cuda-process=true customer-lib-name="libnvsample_cudaprocess.so"

I have some things that I need doing once for the lifetime of the filter. To my dismay, I discovered that pre_process and post_process are called for EVERY frame, and not just once for the lifetime of the filter. gpu_process is also called once for every frame.

So what is the point of pre_process() and post_process() functions as they can already be wrapped up in gpu_process?

Thank you.

Hi,

You can add the function to the initial stage which will only use ONCE when pipeline initialization.

The pre-process and post-process usually refer to the image handling function.
Like some format transform or data parsing, rather than function setup.

Thanks.