When the dqBuffer of the output plane is called, how is the data passed to the capture plane?
// Read video frame from file till EOS is reached and queue buffer on conv0 output plane
while (!ctx.got_error && !ctx.conv0->isInError() &&
(!ctx.conv1 || !ctx.conv1->isInError()) && !eos)
{
struct v4l2_buffer v4l2_buf;
struct v4l2_plane planes[MAX_PLANES];
NvBuffer *buffer;
memset(&v4l2_buf, 0, sizeof(v4l2_buf));
memset(planes, 0, sizeof(planes));
v4l2_buf.m.planes = planes;
if (ctx.conv0-><b>output_plane.dqBuffer</b>(v4l2_buf, &buffer, NULL, 100) < 0)
{
cerr << "ERROR while DQing buffer at conv0 output plane" << endl;
abort(&ctx);
goto cleanup;
}
if (read_video_frame(ctx.in_file, *buffer) < 0)
{
cerr << "Could not read complete frame from input file" << endl;
cerr << "File read complete." << endl;
v4l2_buf.m.planes[0].bytesused = 0;
eos = true;
}
ret = ctx.conv0->output_plane.qBuffer(v4l2_buf, NULL);
if (ret < 0)
{
cerr << "Error while queueing buffer at conv0 output plane" << endl;
abort(&ctx);
goto cleanup;
}
}
Thanks!