Hi all:
I found that capture driver will confict with encode, here is my test case for you reference:
Case #1: get buffer and encode at the same thread work well
/* determine ready buffer */
rc = ioctl(Me->raw.capture_fd, VIDIOC_DQBUF, &buf);
/* encode the frame by raw data*/
.....
VIDENC1_process()
.....
/* return the buffer to driver */
rc = ioctl(Me->raw.capture_fd, VIDIOC_QBUF, &buf);
Case #2: get buffer at thread #1 and encode at thread #2, we will got error when call ioctl() in thread #1
/* determine ready buffer */
rc = ioctl(Me->raw.capture_fd, VIDIOC_DQBUF, &buf);
/* wake up encode thread */
/* return the buffer to driver */
rc = ioctl(Me->raw.capture_fd, VIDIOC_QBUF, &buf);
/* encode the frame by raw data*/
.....
VIDENC1_process()
.....
Anyone who can help on this?