v4l2, why need VIDIOC_DQBUF 2 times to get the latest frame

Open
#1,297 16 comments 0 reactions 1 assignee View on GitHub

@6by9 is already working on this.

Since May 18, 2017.

Assessment

This issue has not been assessed yet.

Description

Assigned for implementation/action

hello, I have a raspberry pi 2 mode b+

I want to take a still image from camera through v4l2 api,
This is my code http://paste.ubuntu.com/15099128/,
my question is why do I need ioctl VIDIOC_QBUF and VIDIOC_DQBUF 2 times to get the latest frame?
Thanks.

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.