[Gridflow-dev] missing include linux/videodev.h in src/videodev.cxx
matju at artengine.ca
Fri Dec 30 16:40:58 EST 2011
Le 2011-12-30 à 15:52:00, Claude Heiland-Allen a écrit :
> libv4l2 makes it really easy to capture frames with a blocking read
> interface whether the underlying driver supports it or not, also
> performing some colour space conversions if needed/desired.
I didn't realise that. Indeed, it would be one less source of bugs,
especially as a separate thread is another source of bugs, and at the same
time, it allows the read-interface to get all the advantages of a
mmap-interface, afaik. (Right ?)
> Enumerating controls (possible use cases: knowing which #io.v4l2 methods to
> register, or even generating a Pd controller GUI patch for that particular
[#camera] already colours all widgets according to which attributes are
returned when calling the «get» method on [#in].
> is somewhat tricky but certainly possible (something like calling an
> ioctl() incrementing an id until it fails, do this twice for two
> different control id ranges):
If that depends completely on the driver and not on the device, does this
means that it is a very fast operation to perform ?
> I do have a BTTV PCI card somewhere in a cupboard, maybe I should dig it
> out for experimentation before analogue TV broadcast end here...).
If you still have a PCI port... ;) I don't even have that. But I do keep a
bit of PCI hardware just in case. (Actually, I do have some PCI ports, but
only on computers that I don't use anymore.)
> It should be easiesst to use blocking interfaces (eg "v4l2_read()") in
> another thread, the tricky part (as always..) is the communication
> between threads (what about frame dropping if the camera captures faster
> than the pd/gridflow processing can support?).
Yes, of course. This is what is already done in [#io.quicktimecamera]
(but it's a default behaviour of that API).
And I wouldn't be against the same thing for movies, but I'd rather have
it set to off by default.
There's a class named Format (C++-level only) that is the base class of
all [#io.$1] classes. The threading could be implemented once, in there,
for use by all other Format subclasses at once. Same goes for any feature
that could be used by enough Format subclasses at once.
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC
More information about the Gridflow-dev