JeVois
1.20
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
|
|
|
Go to the documentation of this file.
24 #include <linux/usb/video.h>
25 #include <linux/videodev2.h>
73 bool multicam =
false);
79 void setFormat(jevois::VideoMapping
const & m)
override;
102 bool const itsMulticam;
109 std::future<void> itsRunFuture;
110 std::atomic<bool> itsRunning;
112 void processEvents();
113 void processEventSetup(
struct usb_ctrlrequest
const & ctrl,
struct uvc_request_data & resp);
114 void processEventStandard(
struct usb_ctrlrequest
const & ctrl,
struct uvc_request_data & resp);
115 void processEventClass(
struct usb_ctrlrequest
const & ctrl,
struct uvc_request_data & resp);
118 void processEventControl(uint8_t req, uint8_t cs, uint8_t entity_id, uint8_t len,
struct uvc_request_data & resp);
119 void processEventStreaming(uint8_t req, uint8_t cs,
struct uvc_request_data & resp);
122 struct v4l2_format itsFormat;
124 void fillStreamingControl(
struct uvc_streaming_control * ctrl, VideoMapping
const & m);
125 std::atomic<bool> itsStreaming;
129 struct uvc_streaming_control itsProbe;
130 struct uvc_streaming_control itsCommit;
132 std::deque<RawImage> itsImageQueue;
133 std::deque<size_t> itsDoneImgs;
135 mutable std::timed_mutex itsMtx;
JeVois gadget driver - exposes a uvcvideo interface to host computer connected over USB.
Base class for video output. Gadget, MovieOutput, VideoDisplay, and VideoOutputNone derive from it.
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
void setFormat(jevois::VideoMapping const &m) override
Set the video format and frame rate.
void streamOff() override
Stop streaming.
void abortStream() override
Abort streaming.
JeVois processing engine - gets images from camera sensor, processes them, and sends results over USB...
void streamOn() override
Start streaming.
virtual ~Gadget()
Close the device and free all resources.
void send(RawImage const &img) override
Send an image out over USB to the host computer.
Gadget(std::string const &devname, VideoInput *camera, Engine *engine, size_t const nbufs=0, bool multicam=false)
Construct and open the device.
Collection of buffers for V4L2 video frames (Camera or Gadget) with hooks to the MMAP'd areas.
void get(RawImage &img) override
Get a pre-allocated image so that we can fill the pixel data and later send out over USB using send()