JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
VideoDisplayGUI.H
Go to the documentation of this file.
1// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2//
3// JeVois Smart Embedded Machine Vision Toolkit - Copyright (C) 2020 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#ifdef JEVOIS_PRO
19
20#pragma once
21
25#include <jevois/GPU/GPUimage.H>
27#include <atomic>
28
29namespace jevois
30{
31 class GUIhelper;
32
33 //! Video output to local screen with basic GUI
34 /*! This class provides accelerated OpenGL-ES display on JeVois-Pro, using Dear-ImGui for a simple graphical
35 interface. \ingroup core */
37 {
38 public:
39 //! Constructor
40 VideoDisplayGUI(std::shared_ptr<GUIhelper> helper, size_t nbufs = 2);
41
42 //! Virtual destructor for safe inheritance
43 virtual ~VideoDisplayGUI();
44
45 //! Set the video format and frame rate, allocate the buffers
46 virtual void setFormat(VideoMapping const & m) override;
47
48 //! Get a pre-allocated image so that we can fill the pixel data and later send out using send()
49 virtual void get(RawImage & img) override;
50
51 //! Send an image out to display
52 virtual void send(RawImage const & img) override;
53
54 //! Start streaming
55 virtual void streamOn() override;
56
57 //! Abort streaming
58 /*! This only cancels future get() and done() calls, one should still call streamOff() to turn off streaming. */
59 virtual void abortStream() override;
60
61 //! Stop streaming
62 virtual void streamOff() override;
63
64 private:
65 std::vector<std::shared_ptr<VideoBuf> > itsBuffers;
67 std::shared_ptr<jevois::GUIhelper> itsHelper;
68 std::atomic<bool> itsStreaming;
69 };
70}
71
72#endif // JEVOIS_PRO
Thread-safe synchronized producer/consumer queue.
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
Definition RawImage.H:111
Video output to local screen with basic GUI.
virtual void streamOff() override
Stop streaming.
virtual void streamOn() override
Start streaming.
virtual void setFormat(VideoMapping const &m) override
Set the video format and frame rate, allocate the buffers.
virtual void send(RawImage const &img) override
Send an image out to display.
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()
virtual ~VideoDisplayGUI()
Virtual destructor for safe inheritance.
virtual void abortStream() override
Abort streaming.
Base class for video output. Gadget, MovieOutput, VideoDisplay, and VideoOutputNone derive from it.
Definition VideoOutput.H:28
Main namespace for all JeVois classes and functions.
Definition Concepts.dox:2
Simple struct to hold video mapping definitions for the processing Engine.