VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gvimagegenerator.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2017 Graeme Walker
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
17 ///
18 /// \file gvimagegenerator.h
19 ///
20 
21 #ifndef GV_IMAGE_GENERATOR__H
22 #define GV_IMAGE_GENERATOR__H
23 
24 #include "gdef.h"
25 #include "gvcapturebuffer.h"
26 
27 namespace Gv
28 {
29  class ImageGenerator ;
30 }
31 
32 /// \class Gv::ImageGenerator
33 /// An abstract interface for filling a YUYV capture buffer with a generated image.
34 ///
36 {
37 public:
38  virtual bool init() = 0 ;
39  ///< Initialisation function. Returns true for rgb, false for yuyv.
40 
41  virtual void fillBuffer( CaptureBuffer & , const CaptureBufferScale & ) = 0 ;
42  ///< Fills the given capture buffer with a generated image.
43  ///< The buffer will have been already imbued with the
44  ///< relevant format.
45 
46  virtual ~ImageGenerator() ;
47  ///< Destructor.
48 
49 private:
50  void operator=( const ImageGenerator & ) ;
51 } ;
52 
53 #endif
virtual void fillBuffer(CaptureBuffer &, const CaptureBufferScale &)=0
Fills the given capture buffer with a generated image.
An abstract interface for filling a YUYV capture buffer with a generated image.
A video-capture buffer class to hold image data, with overloaded constructors for the various V4l i/o...
virtual bool init()=0
Initialisation function. Returns true for rgb, false for yuyv.
A structure holding capture buffer dimensions.
virtual ~ImageGenerator()
Destructor.