JeVois  1.0
JeVois Smart Embedded Machine Vision Toolkit
VideoOutputNone.H
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 
18 #pragma once
19 
21 #include <jevois/Core/VideoBuf.H>
22 
23 namespace jevois
24 {
25  //! No-op VideoOutput derivative for when there is no video output
26  /*! This class derived from VideoOutput does (almost) nothing and can be used by Engine when no video output is
27  desired. \ingroup core */
29  {
30  public:
31  //! Virtual destructor for safe inheritance
32  virtual ~VideoOutputNone();
33 
34  //! Set the video format and frame rate
35  /*! In VideoOutputNone, this is a no-op. */
36  void setFormat(VideoMapping const & m) override;
37 
38  //! Get a pre-allocated image so that we can fill the pixel data and later send out using send()
39  /*! In VideoOutputNone, this returns a blank buffer. */
40  void get(RawImage & img) override;
41 
42  //! Send an image out
43  /*! In VideoOutputNone, this is a no-op. */
44  void send(RawImage const & img) override;
45 
46  //! Start streaming
47  /*! In VideoOutputNone, this is a no-op. */
48  void streamOn() override;
49 
50  //! Abort streaming
51  /*! In VideoOutputNone, this is a no-op. */
52  void abortStream() override;
53 
54  //! Stop streaming
55  /*! In VideoOutputNone, this is a no-op. */
56  void streamOff() override;
57 
58  protected:
59  std::shared_ptr<VideoBuf> itsBuffer;
61  };
62 }
63 
std::shared_ptr< VideoBuf > itsBuffer
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.
virtual ~VideoOutputNone()
Virtual destructor for safe inheritance.
void streamOn() override
Start streaming.
Base class for video output. Gadget, MovieOutput, VideoDisplay, and VideoOutputNone derive from it...
Definition: VideoOutput.H:27
void streamOff() override
Stop streaming.
jevois::RawImage itsImage
void abortStream() override
Abort streaming.
No-op VideoOutput derivative for when there is no video output.