JeVois  1.6
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
VideoOutputNone.C
Go to the documentation of this file.
1 // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 //
3 // JeVois Smart Embedded Machine Vision Toolkit - Copyright (C) 2016 by Laurent Itti, the University of Southern
4 // California (USC), and iLab at USC. See http://iLab.usc.edu and http://jevois.org for information about this project.
5 //
6 // This file is part of the JeVois Smart Embedded Machine Vision Toolkit. This program is free software; you can
7 // redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
8 // Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
10 // License for more details. You should have received a copy of the GNU General Public License along with this program;
11 // if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12 //
13 // Contact information: Laurent Itti - 3641 Watt Way, HNB-07A - Los Angeles, CA 90089-2520 - USA.
14 // Tel: +1 213 740 3527 - itti@pollux.usc.edu - http://iLab.usc.edu - http://jevois.org
15 // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
16 /*! \file */
17 
19 #include <jevois/Debug/Log.H>
20 
21 // ##############################################################################################################
23 { }
24 
25 // ##############################################################################################################
27 {
28  // Allocate one buffer:
29  itsBuffer.reset(new jevois::VideoBuf(-1, m.osize(), 0));
30 
31  // Attach it to our image:
32  itsImage.width = m.ow;
33  itsImage.height = m.oh;
34  itsImage.fmt = m.ofmt;
35  itsImage.fps = m.ofps;
37  itsImage.bufindex = 0;
38 }
39 
40 // ##############################################################################################################
42 { img = itsImage; }
43 
44 // ##############################################################################################################
45 void jevois::VideoOutputNone::send(RawImage const & JEVOIS_UNUSED_PARAM(img))
46 { }
47 
48 // ##############################################################################################################
50 { }
51 
52 // ##############################################################################################################
54 { }
55 
56 // ##############################################################################################################
58 { }
float ofps
output frame rate in frames/sec
Definition: VideoMapping.H:46
unsigned int height
Image height in pixels.
Definition: RawImage.H:146
std::shared_ptr< VideoBuf > itsBuffer
A V4L2 video buffer, to be held in a shared_ptr.
Definition: VideoBuf.H:29
unsigned int ofmt
output pixel format, or 0 for no output over USB
Definition: VideoMapping.H:43
unsigned int fmt
Pixel format as a V4L2_PIX_FMT_XXX.
Definition: RawImage.H:147
std::shared_ptr< VideoBuf > buf
The pixel data buffer.
Definition: RawImage.H:149
void setFormat(VideoMapping const &m) override
Set the video format and frame rate.
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
Definition: RawImage.H:110
Simple struct to hold video mapping definitions for the processing Engine.
Definition: VideoMapping.H:41
void send(RawImage const &img) override
Send an image out.
unsigned int oh
output height
Definition: VideoMapping.H:45
virtual ~VideoOutputNone()
Virtual destructor for safe inheritance.
void streamOn() override
Start streaming.
unsigned int osize() const
Return the size in bytes of an output image.
Definition: VideoMapping.C:37
void streamOff() override
Stop streaming.
float fps
Programmed frames/s as given by current video mapping, may not be actual.
Definition: RawImage.H:148
jevois::RawImage itsImage
void get(RawImage &img) override
Get a pre-allocated image so that we can fill the pixel data and later send out using send() ...
size_t bufindex
The index of the data buffer in the kernel driver.
Definition: RawImage.H:150
unsigned int ow
output width
Definition: VideoMapping.H:44
void abortStream() override
Abort streaming.
unsigned int width
Image width in pixels.
Definition: RawImage.H:145