Nvdrmvideosink restriction

We tested the sample code that the algorithm closes the whole pipeline can test passed 600 times.
Is there any way not to close the pipeline every time and keeps the function works?

[Sample Code]
Nvdrmvideosink.cpp (1.6 KB)

Please share more information about your use-case. If the capability(width, height, format) is not changed it is possible to keep the pipeline alive without re-initialization. Would need more detail about the use-case.


Current Status:
• Connect more than 2 CAMs.
• Create an NVDRMSINK pipeline and switch back and forth between the connected cameras. Found the switch times higher than 128 times, the NVDRMSINK crashes at 128th time.
• NV has provided the countermeasure that shut down the NVDRMSINK(shut down the pipeline) and then restarted it after the camera switches.

• It could connect to more CAMs, and expect to run the NVDRMSIN continuously without shut down the pipeline every time.


One possible solution is to run the pipeline:

    << "appsrc ! "
    << "video/x-raw,width=1920,height=1080,format=YUY2 ! "
    << "nvvidconv ! video/x-raw(memory:NVMM),format=NV12 ! nvdrmvideosink sync=0 ";

And handle switching camera source in appsrc. If some sources have different resolution, you would need to upscale/downscale the resolution to be identical to the capability(video/x-raw,width=1920,height=1080,format=YUY2 in the example).