int
main(int argc, char *argv[])
{
NvVideoConverter *conv[64] = {0};
NvVideoDecoder *dec[64] = {0};
for (int i = 0; i < 64; i++)
{
conv[i] = NvVideoConverter::createVideoConverter("vic");
if(!conv[i])
{
printf("Could not create video converter%d\n", i);
return -1;
}
dec[i] = NvVideoDecoder::createVideoDecoder("dec");
if(!dec[i])
{
printf("Could not create video decoder%d\n", i);
return -1;
}
}
}
When creating the 17th device, an error is reported:
libv4l2: error attempting to open more then 16 video devices
In our needs, this amount is too small.
We need 9 decoding, and then take 9 vic stitch into a composite picture, and then encode to H265 es stream. 16 is not enough.
After compiling, replace /usr/lib/aarch64-linux-gnu/libv4l2.so.0.0.0, run mmapi sample will be an error:
[ERROR] (NvV4l2Element.cpp:63) Could not open device ‘/dev/nvhost-nvdec’: Inappropriate ioctl for device
2, I found that each process can create 16 v4l2 elements, can I create multiple processes to complete my work, the processes passed video data by dma_buf fd ?