GL Studio C++ Runtime 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) 2017 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 ) || defined( GLSGEN_IMPORT_GLSVIDEOTOTEXTURE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
48  && defined( _MSC_VER )
49 # if defined( GLSGEN_EXPORT_GLSVIDEOTOTEXTURE ) || defined( GLS_EXPORT_GENERATED )
50 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec( dllexport )
51 # else
52 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec( dllimport )
53 # endif
54 #else
55 # define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT
56 #endif
57 ///////////////////////////////////////////////////////////////////////////////
58 
59 #define LIB_BASE_NAME "gls_video_to_texture"
60 #include "gls_auto_lib.h"
61 #undef LIB_BASE_NAME
62 
63 // Force inclusion of the DirectShow library
64 #ifdef NO_GLS_AUTOLIB
65 # define LIB_BASE_NAME "strmbase"
66 # ifdef GLS_LIB_TYPE
67 # undef GLS_LIB_TYPE
68 # endif
69 # define GLS_LIB_TYPE ""
70 # include "gls_auto_lib.h"
71 # undef GLS_LIB_TYPE
72 # undef LIB_BASE_NAME
73 #endif
74 
75 namespace disti
76 {
77 class GlsVideoToTextureSource;
78 
79 // SetValue enumerations
80 enum
81 {
82  GLS_GLSVIDEOTOTEXTURE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
83  GLS_GLSVIDEOTOTEXTURE_CAPTUREDEVICE
84 };
85 
86 /** Runtime implementation of a GlsVideoToTexture */
88 {
89  friend class GlsVideoToTextureEditor;
90 
91 private:
92  GlsVideoToTexture& operator=( const GlsVideoToTexture& ) DISTI_SPECIAL_MEM_FUN_DELETE;
93  GlsVideoToTexture( const GlsVideoToTexture& ) DISTI_SPECIAL_MEM_FUN_DELETE;
94 
95 public:
96  typedef GLPolygon _BaseClass;
97 
98  /** Create a new GlsVideoToTexture.
99  * \param generateInstance Whether or not to generate an instance name
100  * for this inputdevice */
101  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( bool generateInstance = false );
102  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( const GlsVideoToTexture& that, const bool generateNames );
103 
104  /** Destructs a GlsVideoToTexture object */
105  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT ~GlsVideoToTexture();
106 
107  static GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CreateInstance();
108 
109  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetAvailableAttributes( unsigned int value );
110 
111  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CloneObject( bool generateNames = false );
112 
113  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CopyProperties( DisplayObject* src );
114 
115  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
116  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
117 
118  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler );
119  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void Draw( void );
120 
121  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetValue( int spec, va_list& args );
122 
123  //////////////////////////////////////////////////
124  // GlsVideoToTexture specific operations
125  //////////////////////////////////////////////////
126  /** Sets the desired capture device index */
127  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CaptureDevice( const int& value );
128  /** Gets the capture device index */
129  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int CaptureDevice();
130 
131  /** Specifies how many execution frames required to update on texture
132  * 1 == Full update in one frame.
133  */
134  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void NumUpdateBlocks( const int& value );
135  /** Gets the number of execution frames required to update
136  */
137  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int NumUpdateBlocks();
138 
139 protected:
140  int _captureDevice;
141  int _numUpdateBlocks;
142  GlsVideoToTextureSource* _videoSource;
143 };
144 
145 } // namespace disti
146 
147 #endif
Definition: cull.h:49
Definition: gls_video_to_texture.h:87
virtual int NumUpdateBlocks()
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:278
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
Definition: display.h:97
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)