JeVois
1.22
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Core/VideoOutput.H>
Base class for video output. Gadget, MovieOutput, VideoDisplay, and VideoOutputNone derive from it.
This virtual base class provides the interface for video output, as needed by Engine.
Definition at line 27 of file VideoOutput.H.
Public Member Functions | |
virtual | ~VideoOutput () |
Virtual destructor for safe inheritance. | |
virtual void | setFormat (VideoMapping const &m)=0 |
Set the video format and frame rate. | |
virtual void | get (RawImage &img)=0 |
Get a pre-allocated image so that we can fill the pixel data and later send out using send() | |
virtual void | send (RawImage const &img)=0 |
Send an image out. | |
virtual void | streamOn ()=0 |
Start streaming. | |
virtual void | abortStream ()=0 |
Abort streaming. | |
virtual void | streamOff ()=0 |
Stop streaming. | |
|
virtual |
Virtual destructor for safe inheritance.
Definition at line 21 of file VideoOutput.C.
|
pure virtual |
Abort streaming.
This only cancels future get() and send() calls, one should still call streamOff() to turn off streaming.
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.
|
pure virtual |
Get a pre-allocated image so that we can fill the pixel data and later send out using send()
May throw if no buffer is available, i.e., all have been queued to send to the host but have not yet been sent. Application code must balance exactly one send() for each get().
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.
|
pure virtual |
Send an image out.
May throw if the format is incorrect or std::overflow_error if we have not yet consumed the previous image.
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.
|
pure virtual |
Set the video format and frame rate.
Sometimes this may be implemented as a no-op. For the USB Gadget class, we cannot decide and set the format, it is set as the result of USB/UVC commands being received, so that the USB host is prepared to receive images with the selected format and frame size. For the VideoDisplay class, this allocates the output buffers and must be called before streaming starts.
Engine calls this (as well as setFormat() on the camera) from within its own setFormat(), so usually one would just set the format at the Engine level and not directly on VideoOutput.
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.
|
pure virtual |
Stop streaming.
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.
|
pure virtual |
Start streaming.
Implemented in jevois::Gadget, jevois::MovieOutput, jevois::VideoDisplay, jevois::VideoDisplayGL, jevois::VideoDisplayGUI, and jevois::VideoOutputNone.