Hi im trying to color convert a video stream and encode it with x264. The code works if I copy the data after NvBufferTransform with NvBufferMap and then from that buffer to the output_plan of the encoder. Since this operation takes quite some time, I was wondering if I can color convert the image directly into the output_plane fd of the encoder. A shortend version of the programm looks like:
NvBuffer* buffer;
ctx.enc->output_plane.dqBuffer(v4l2_buf, &buffer, NULL, 10);
int fd = buffer->planes[0].fd;
int ret = NvBufferTransform(tctx.in_dmabuf_fd, fd, &tctx.transform_params);
ret = ctx.enc->output_plane.qBuffer(v4l2_buf, NULL);
The qBuffer functions blocks after around 10 calls which indicates that the encoder is not encoding the image. What am I’m doing wrong?
Best
Michael