JeVois
1.19
JeVois Smart Embedded Machine Vision Toolkit
|
Share this page: |
|
|
|
 |
 |
|
Go to the documentation of this file.
23 #include <opencv2/core/version.hpp>
24 #include <opencv2/videoio.hpp>
43 virtual void setFormat(VideoMapping
const & m)
override;
Video output to a movie file, using OpenCV video encoding.
virtual void streamOn() override
Start streaming.
MovieOutput(std::string const &fn)
Constructor.
std::future< void > itsRunFut
Future for our run() thread.
virtual ~MovieOutput()
Virtual destructor for safe inheritance.
std::atomic< bool > itsSaving
True when we are saving to file.
Base class for video output. Gadget, MovieOutput, VideoDisplay, and VideoOutputNone derive from it.
Thread-safe synchronized producer/consumer queue.
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
int itsFileNum
File number, gets incremented on each streamOff() to avoid overwriting previous files.
@ Block
Block until operation can be completed.
virtual void streamOff() override
Stop streaming.
void run()
Use a thread to encode and save frames.
virtual void abortStream() override
Abort streaming.
virtual void get(RawImage &img) override
Get a pre-allocated image so that we can fill the pixel data and later send out using send()
std::string itsFilebase
Current file base to save video to.
std::string itsFilename
Current file name to save video to.
virtual void send(RawImage const &img) override
Send an image out.
std::shared_ptr< VideoBuf > itsBuffer
Our single video buffer.
VideoMapping itsMapping
Our current video mapping, we resize the input to the mapping's camera dims.
jevois::BoundedBuffer< cv::Mat, jevois::BlockingBehavior::Block, jevois::BlockingBehavior::Block > itsBuf
Buffer of frames to encode and write to file.
std::atomic< bool > itsRunning
True when our run() thread should keep running.
virtual void setFormat(VideoMapping const &m) override
Set the video format and frame rate.