Hello!
I want to write an encoder and decoder C (C++) solution for jetson structured as:
- encoder_init() / decoder_init() function that initializes everything needed for HW encoder/decoder to work on a buffer
- encode() / decode() functions that would take a buffer to be encoded/decoded (and probably size of that buffer). This function would be used every time a camera captures a frame
- destroy() function that would deallocate memory and/or destroy devices used.
There are sample programs in jetsons multimedia API that take raw yuv or h264 files as an input and use queues and threads so that the video frames could be loaded and encoded/decoded more efficiently… I do not need that at all…
I just need to prepare an encoder/decoder so that I could provide it with a “buffer” to be encoded/decoded.
I guess my question is how do i reconstruct that code for my purposes!
Here is that code