I just started looking into V4L2 and all the samples I can find use loops to poll images from the camera. Is there a way to register a callback instead of looping? I can't figure out when to poll images and it does not seem like a good idea to just poll all the time, or is it?
This is the sample I am currently looking at> https://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html Is some part of the mainloop blocking and waits for the next frame?