23#include <linux/videodev2.h>
49 VideoBuffers(
char const * name,
int const fd, v4l2_buf_type type,
size_t const num = 4);
61 std::shared_ptr<VideoBuf>
get(
size_t const index)
const;
68 void qbuf(
size_t const index);
74 void qbuf(
struct v4l2_buffer & buf);
83 void dqbuf(
struct v4l2_buffer & buf);
90 std::string
const itsName;
91 v4l2_buf_type
const itsType;
92 std::vector<std::shared_ptr<VideoBuf> > itsBuffers;
Collection of buffers for V4L2 video frames (Camera or Gadget) with hooks to the MMAP'd areas.
std::shared_ptr< VideoBuf > get(size_t const index) const
Get one buffer, by index [0 .. size()[.
void dqbufall()
Dequeue all buffers, typically used when stopping a stream, not that this may take some time.
void qbufall()
Queue all buffers, typically used when starting streaming on capture devices.
size_t nqueued() const
Get the number of buffers queued, this is always in [0 .. size()[.
size_t size() const
Get the number of buffers allocated.
void qbufallbutone(size_t const index)
Queue all buffers that are not already queued except one specified.
void qbuf(size_t const index)
Queue one buffer to V4L2, by index [0 .. size()[.
~VideoBuffers()
Free the MMAP'd memory area.
void dqbuf(struct v4l2_buffer &buf)
Dequeue the next captured/displayed buffer, blocks until one is available.
Main namespace for all JeVois classes and functions.