I’m looking at the places that NvBufferTransform is used in the samples, and as someone completely new to this API, it’s not clear to me how to replace NvVideoConverter with NvBufferTransform in the 06_jpeg_decode sample code. Their interfaces are different, NvVideoConverter is a class while NvBufferTransform is a function, etc.
Are there any tips, pointers, or example code that you can provide to help?
In the 06_jpeg_decode example which uses NvVideoConverter, a callback function is used that has NvBuffer in its signature, and then the callback function passes the NvBuffer object to write_video_frame().
If I instead use NvBufferTransform, the callback won’t be used, correct? If that’s the case, then how do I get an NvBuffer object after calling NvBufferTransform? NvBufferCreate() seems like it creates the NvBuffer internally and only exposes a file descriptor to me. But to write the outout image, I need an NvBuffer object, not just a file descriptor, correct? Am I supposed to use NvBuffer2Raw() to retrieve the image data from the NvBuffer file descriptor?
edit: I see in the 00_video_decode example that dump_dmabuf() is used for this. I will try that. Is this correct?