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  DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
97  typedef GLPolygon _BaseClass;
98  typedef GLPolygon BaseClass;
99 
100  /** Create a new GlsVideoToTexture.
101  * \param generateInstance Whether or not to generate an instance name
102  * for this inputdevice */
103  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( bool generateInstance = false );
104  GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( const GlsVideoToTexture& that, const bool generateNames );
105 
106  /** Destructs a GlsVideoToTexture object */
107  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT ~GlsVideoToTexture();
108 
109  static GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CreateInstance();
110 
111  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetAvailableAttributes( unsigned int value );
112 
113  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT DisplayObject* CloneObject( bool generateNames = false );
114 
115  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CopyProperties( DisplayObject* src );
116 
117  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
118  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
119 
120  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void PreDraw( const OpenGLMatrices& parentMatrices, Culler& culler );
121  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void Draw( void );
122 
123  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetValue( int spec, va_list& args );
124 
125  //////////////////////////////////////////////////
126  // GlsVideoToTexture specific operations
127  //////////////////////////////////////////////////
128  /** Sets the desired capture device index */
129  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CaptureDevice( const int& value );
130  /** Gets the capture device index */
131  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int CaptureDevice();
132 
133  /** Specifies how many execution frames required to update on texture
134  * 1 == Full update in one frame.
135  */
136  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void NumUpdateBlocks( const int& value );
137  /** Gets the number of execution frames required to update
138  */
139  virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT int NumUpdateBlocks();
140 
141 protected:
142  int _captureDevice;
143  int _numUpdateBlocks;
144  GlsVideoToTextureSource* _videoSource;
145 };
146 
147 } // namespace disti
148 
149 #endif
Definition: cull.h:49
Definition: gls_video_to_texture.h:87
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual int NumUpdateBlocks()
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:471
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
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)