Hello
I have question about Jetson video decoder with non-blocking mode.
In 00_video_decode example, function decoder_polling_fcn
has folloing code.
while (!ctx->got_error && !ctx->dec->isInError())
{
/* wait on polling semaphore */
sem_wait(&ctx->pollthread_sema);
if (ctx->got_eos)
{
cout << "Decoder got eos, exiting poll thread \n";
return NULL;
}
devicepoll.req_events = POLLIN | POLLOUT | POLLERR | POLLPRI;
/* This call shall wait in the v4l2 decoder library.
Refer V4L2_CID_MPEG_VIDEO_DEVICE_POLL */
ctx->dec->DevicePoll(&devicepoll);
/* We can check the devicepoll.resp_events bitmask to see
which events are set. */
sem_post(&ctx->decoderthread_sema);
}
And, NvVideoEncoder.hpp::DevicePoll
has these document.
/**
* Issues Poll on the device which blocks until :
* a) Either there is something to dequeue from capture or output plane or any events.
* b) Poll was interrupted by a call to the device using V4L2_CID_SET_POLL_INTERRUPT
* c) Application has already interrupted polling by V4L2_CID_SET_POLL_INTERRUPT
*/
int DevicePoll(v4l2_ctrl_video_device_poll *devicepoll);
I think that POLLIN
indicates capture plane has something to dequeue. And POLLOUT
indicates
output plane has something to dequeue. Is my understanding correct?
And, what is POLLPRI
means?
regards.