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
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State 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"
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/// Automatically link the runtime library plugin (on Windows).
60#define LIB_BASE_NAME "gls_video_to_texture"
61#include "gls_auto_lib.h"
62#undef LIB_BASE_NAME
63
64/// Force inclusion of the DirectShow library.
65#ifdef NO_GLS_AUTOLIB
66# define LIB_BASE_NAME "strmbase"
67# ifdef GLS_LIB_TYPE
68# undef GLS_LIB_TYPE
69# endif
70/// DirectShow is always statically linked.
71# define GLS_LIB_TYPE ""
72# include "gls_auto_lib.h"
73# undef GLS_LIB_TYPE
74# undef LIB_BASE_NAME
75#endif
76
77namespace disti
78{
79class GlsVideoToTextureSource;
80
81// SetValue enumerations
82enum
83{
84 GLS_GLSVIDEOTOTEXTURE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
85 GLS_GLSVIDEOTOTEXTURE_CAPTUREDEVICE
86};
87
88/** Runtime implementation of a GlsVideoToTexture */
90{
91 friend class GlsVideoToTextureEditor;
92
93private:
96
97public:
98 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
99 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
100 typedef GLPolygon BaseClass; ///< Typedef for the base class.
101
102 /// Constructor
103 /// \param generateInstance Whether or not to generate an instance name for this object.
104 GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( bool generateInstance = false );
105
106 /// Copy constructor
107 /// \param that The object to copy from.
108 /// \param generateNames Whether or not to generate an instance name for this object.
110
111 /** Destructs a GlsVideoToTexture object */
113
114 /// \return A pointer to a new GlsVideoToTexture object.
116
118
120
122
125
128
129 virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
130
131 //////////////////////////////////////////////////
132 // GlsVideoToTexture specific operations
133 //////////////////////////////////////////////////
134
135 /// Sets the desired capture device index.
136 /// \param value The new capture device index to set.
137 virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CaptureDevice( const int& value );
138
139 /// \return The current capture device index.
141
142 /// Specifies how many execution frames required to update on texture.
143 /// 1 == Full update in one frame.
144 /// \param value The new number of execution frames.
145 virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void NumUpdateBlocks( const int& value );
146
147 /// \return The number of execution frames required to update.
149
150protected:
151 int _captureDevice; ///< The index of the device providing video input.
152 int _numUpdateBlocks; ///< The number of execution frames required to update on texture.
153 GlsVideoToTextureSource* _videoSource; ///< Observing pointer to the underlying video source device.
154};
155
156} // namespace disti
157
158#endif
Definition: cull.h:50
Definition: display.h:96
Definition: dynamic_array.h:79
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
Definition: gls_video_to_texture.h:90
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual int NumUpdateBlocks()
int _captureDevice
The index of the device providing video input.
Definition: gls_video_to_texture.h:151
GlsVideoToTextureSource * _videoSource
Observing pointer to the underlying video source device.
Definition: gls_video_to_texture.h:153
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
virtual int CaptureDevice()
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
int _numUpdateBlocks
The number of execution frames required to update on texture.
Definition: gls_video_to_texture.h:152
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
The disti::GLPolygon class. Implements Polygons.
The gls_auto_lib.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
#define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT
Provides support for creating DLLs.
Definition: gls_video_to_texture.h:55
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47