Question about Jetson NVDEC non-blocking bahavior

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.

Hi,
Please refer to the discussion in
linux - difference between POLLIN and POLLPRI in poll() syscall - Stack Overflow

Thank you.

I could confirm that POLLPRI event had occurred before V4L2_EVENT_RESOLUTION_CHANGE.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.