JeVois  1.20
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 // ##############################################################################################################
26 void jevois::VideoOutputNone::setFormat(VideoMapping const & m)
27 {
28  // Allocate one buffer:
29  itsBuffer.reset(new jevois::VideoBuf(-1, m.osize(), 0, -1));
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;
36  itsImage.buf = itsBuffer;
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 { }
jevois::VideoOutputNone::get
void get(RawImage &img) override
Get a pre-allocated image so that we can fill the pixel data and later send out using send()
Definition: VideoOutputNone.C:41
jevois::RawImage
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
Definition: RawImage.H:110
jevois::VideoOutputNone::streamOff
void streamOff() override
Stop streaming.
Definition: VideoOutputNone.C:57
jevois::VideoOutputNone::send
void send(RawImage const &img) override
Send an image out.
Definition: VideoOutputNone.C:45
jevois::VideoOutputNone::streamOn
void streamOn() override
Start streaming.
Definition: VideoOutputNone.C:49
Log.H
VideoOutputNone.H
jevois::VideoOutputNone::~VideoOutputNone
virtual ~VideoOutputNone()
Virtual destructor for safe inheritance.
Definition: VideoOutputNone.C:22
jevois::VideoOutputNone::setFormat
void setFormat(VideoMapping const &m) override
Set the video format and frame rate.
Definition: VideoOutputNone.C:26
jevois::VideoOutputNone::abortStream
void abortStream() override
Abort streaming.
Definition: VideoOutputNone.C:53
jevois::VideoBuf
A V4L2 video buffer, to be held in a shared_ptr.
Definition: VideoBuf.H:29