GL Studio API
gls_video_to_texture.h
Go to the documentation of this file.
1 /*! \file
2  \brief The GlsVideoToTexture class
3 
4  \par Copyright Information
5 
6  Copyright (c) 2015 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef INCLUDE_VIDEO_TO_TEXTURE_H
41 #define INCLUDE_VIDEO_TO_TEXTURE_H
42 
43 #include "glpolygon.h"
44 #include "gls_cpp_lang_support.h"
45 
46 //////////////////// Provides support for creating DLLs ////////////////////////
47 #if (defined(GLSGEN_EXPORT_GLSVIDEOTOTEXTURE) || \
48  defined(GLSGEN_IMPORT_GLSVIDEOTOTEXTURE) || \
49  defined(GLS_EXPORT_GENERATED) || \
50  defined(GLS_IMPORT_GENERATED)) \
51  && defined(_MSC_VER)
52 # if defined(GLSGEN_EXPORT_GLSVIDEOTOTEXTURE) || defined(GLS_EXPORT_GENERATED)
53 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec(dllexport)
54 # else
55 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec(dllimport)
56 # endif
57 #else
58 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT
59 #endif
60 ///////////////////////////////////////////////////////////////////////////////
61 
62 #define LIB_BASE_NAME "gls_video_to_texture"
63 #include "gls_auto_lib.h"
64 #undef LIB_BASE_NAME
65 
66 // Force inclusion of the DirectShow library
67 #ifdef NO_GLS_AUTOLIB
68 # define LIB_BASE_NAME "strmbase"
69 # ifdef GLS_LIB_TYPE
70 # undef GLS_LIB_TYPE
71 # endif
72 # define GLS_LIB_TYPE ""
73 # include "gls_auto_lib.h"
74 # undef GLS_LIB_TYPE
75 # undef LIB_BASE_NAME
76 #endif
77 
78 class GlsVideoToTextureSource;
79 
80 namespace disti
81 {
82 
83 // SetValue enumerations
84 enum {
85  GLS_GLSVIDEOTOTEXTURE_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
86  GLS_GLSVIDEOTOTEXTURE_CAPTUREDEVICE
87  };
88 
89 /** Runtime implementation of a GlsVideoToTexture */
91 {
92  friend class GlsVideoToTextureEditor;
93 
94 private:
95  GlsVideoToTexture& operator=( const GlsVideoToTexture& ) DISTI_SPECIAL_MEM_FUN_DELETE;
96  GlsVideoToTexture( const GlsVideoToTexture& ) DISTI_SPECIAL_MEM_FUN_DELETE;
97 
98 public:
99  typedef GLPolygon _BaseClass;
100 
101  /** Create a new GlsVideoToTexture.
102  * \param generateInstance Whether or not to generate an instance name
103  * for this inputdevice */
104  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture(bool generateInstance=false);
105  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( const GlsVideoToTexture& that, const bool generateNames );
106 
107 
108  /** Destructs a GlsVideoToTexture object */
109  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT ~GlsVideoToTexture();
110 
111  static GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CreateInstance();
112 
113  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetAvailableAttributes(unsigned int value);
114 
115  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CloneObject(bool generateNames = false);
116 
117  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CopyProperties(DisplayObject *src);
118 
119  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT InterfaceListType* GetCppInterfaceDescription(InterfaceListType* addToThisList= NULL );
120  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void GetCppInterfaceDescriptionFree(InterfaceListType* array);
121 
122  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices,Culler &culler );
123  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void Draw(void);
124 
125  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetValue(int spec,va_list &args);
126 
127  //////////////////////////////////////////////////
128  // GlsVideoToTexture specific operations
129  //////////////////////////////////////////////////
130  /** Sets the desired capture device index */
131  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CaptureDevice(const int &value);
132  /** Gets the capture device index */
133  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int CaptureDevice();
134 
135  /** Specifies how many execution frames required to update on texture
136  * 1 == Full update in one frame.
137  */
138  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void NumUpdateBlocks(const int &value);
139  /** Gets the number of execution frames required to update
140  */
141  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int NumUpdateBlocks();
142 
143 protected:
144 
145  int _captureDevice;
146  int _numUpdateBlocks;
147  GlsVideoToTextureSource *_videoSource;
148 
149 };
150 
151 } // namespace disti
152 
153 #endif
Definition: cull.h:50
Definition: gls_video_to_texture.h:90
virtual int NumUpdateBlocks()
Definition: dynamic_array.h:63
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:289
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: display.h:98
The disti::GLPolygon class. Implements Polygons.
virtual void Draw(void)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
virtual void CopyProperties(DisplayObject *src)
virtual DisplayObject * CloneObject(bool generateNames=false)
The gls_auto_lib.
virtual void SetValue(int spec, va_list &args)
virtual int CaptureDevice()
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
Definition: bmpimage.h:46
virtual void SetAvailableAttributes(unsigned int value)