Error generated while running the code after connecting the camera

Hi,
You may refer to this patch to use NvBufurface APIs:
How to create opencv gpumat from nvstream? - #18 by DaneLLL

We will also check and try to have a sample for Jetpack 5. Not sure which version you are using. It would be great if you can use latest Jetpack 5.1.2.