Skip to content

Commit

Permalink
for #27: get buffer asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet authored Oct 27, 2019
1 parent 79af898 commit 1802120
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/v4l2grab_h264.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main(int argc, char **argv)

while (!stop)
{
OMX_BUFFERHEADERTYPE *buf = ilclient_get_input_buffer(video_encode, 200, 1);
OMX_BUFFERHEADERTYPE *buf = ilclient_get_input_buffer(video_encode, 200, 0);
if (buf != NULL)
{
/* fill it */
Expand All @@ -168,7 +168,7 @@ int main(int argc, char **argv)
}
}

OMX_BUFFERHEADERTYPE *out = ilclient_get_output_buffer(video_encode, 201, 1);
OMX_BUFFERHEADERTYPE *out = ilclient_get_output_buffer(video_encode, 201, 0);
if (out != NULL)
{
if (out->nFilledLen > 0)
Expand All @@ -191,8 +191,6 @@ int main(int argc, char **argv)
{
LOG(WARN) << "Error filling buffer:" << r ;
}
} else {
LOG(WARN) << "Error filling buffer is null" ;
}

}
Expand Down

0 comments on commit 1802120

Please sign in to comment.