First of all, thank you for all of your help.
Unfortunately, with the IDR problem still present, and with metadata not available on GStreamer, I’ve pivoted to using the V4L interface directly.
Despite all of your genuine effort, I have to admit I have found the overall experience to be very disappointing. I also have a latency problem, but I suspect it has to do with the way I’m allocating the buffers (no pool because it’s test code), so probably on my end.
But even without it, I found the documentation to be insufficient, and the examples of poor coverage and confusing. Worse, the API itself does not expose the full power that the underlying API has.
For comparison’s sake, starting from scratch with the V4L interface allowed me to reach the same point in only three days of work, and with zero reliance on NVidia support, because the provided example covers the entire API. I would not call teasing the desired flow from 2000 lines of code “optimal”, but at least it is possible to do.
It seems to me that GStreamer is hailed as the front-door way of using the encoder, but it is simply not up to the task.
I honestly do appreciate your help.