GL Studio C++ Runtime API
gls_video_to_texture.h
Go to the documentation of this file.
1/// \file gls_video_to_texture.h
2/// \brief The GlsVideoToTexture class
3///
4/// \par Copyright Information
5///
6/// Copyright (c) 2017 by The DiSTI Corporation.<br>
7/// 12249 Science Drive; Suite 300<br>
8/// Orlando, Florida 32826<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#ifndef INCLUDE_VIDEO_TO_TEXTURE_H
40#define INCLUDE_VIDEO_TO_TEXTURE_H
41
42#include "glpolygon.h"
44
45/// Provides support for creating DLLs.
46#if( defined( GLSGEN_EXPORT_GLSVIDEOTOTEXTURE ) || defined( GLSGEN_IMPORT_GLSVIDEOTOTEXTURE ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
47 && defined( _MSC_VER )
48# if defined( GLSGEN_EXPORT_GLSVIDEOTOTEXTURE ) || defined( GLS_EXPORT_GENERATED )
49# define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec( dllexport )
50# else
51# define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT __declspec( dllimport )
52# endif
53#else
54# define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT
55#endif
56///////////////////////////////////////////////////////////////////////////////
57
58/// Automatically link the runtime library plugin (on Windows).
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#ifndef NO_GLS_AUTOLIB
65# define LIB_BASE_NAME "strmbase"
66# ifdef GLS_LIB_TYPE
67# undef GLS_LIB_TYPE
68# endif
69/// DirectShow is always statically linked.
70# define GLS_LIB_TYPE ""
71# include "gls_auto_lib.h"
72# undef GLS_LIB_TYPE
73# undef LIB_BASE_NAME
74#endif
75
76namespace disti
77{
78class GlsVideoToTextureSource;
79
80// SetValue enumerations
81enum
82{
83 GLS_GLSVIDEOTOTEXTURE_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
84 GLS_GLSVIDEOTOTEXTURE_CAPTUREDEVICE
85};
86
87/** Runtime implementation of a GlsVideoToTexture */
89{
90 friend class GlsVideoToTextureEditor;
91
92private:
95
96public:
97 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
98 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
99 typedef GLPolygon BaseClass; ///< Typedef for the base class.
100
101 /// Constructor
102 /// \param generateInstance Whether or not to generate an instance name for this object.
103 GLSGEN_GLSVIDEOTOTEXTURE_EXPORT GlsVideoToTexture( bool generateInstance = false );
104
105 /// Copy constructor
106 /// \param that The object to copy from.
107 /// \param generateNames Whether or not to generate an instance name for this object.
109
110 /** Destructs a GlsVideoToTexture object */
112
113 /// \return A pointer to a new GlsVideoToTexture object.
115
117
119
121
122#ifndef GLES
123 /// \copydoc DisplayObject::GetCppInterfaceDescription
125 /// \copydoc DisplayObject::GetCppInterfaceDescriptionFree
127#endif
128
131
133
134 //////////////////////////////////////////////////
135 // GlsVideoToTexture specific operations
136 //////////////////////////////////////////////////
137
138 /// Sets the desired capture device index.
139 /// \param value The new capture device index to set.
140 virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void CaptureDevice( const int& value );
141
142 /// \return The current capture device index.
144
145 /// Specifies how many execution frames required to update on texture.
146 /// 1 == Full update in one frame.
147 /// \param value The new number of execution frames.
148 virtual GLSGEN_GLSVIDEOTOTEXTURE_EXPORT void NumUpdateBlocks( const int& value );
149
150 /// \return The number of execution frames required to update.
152
153protected:
154 int _captureDevice; ///< The index of the device providing video input.
155 int _numUpdateBlocks; ///< The number of execution frames required to update on texture.
156 GlsVideoToTextureSource* _videoSource; ///< Observing pointer to the underlying video source device.
157};
158
159} // namespace disti
160
161#endif
Definition: cull.h:49
Definition: display.h:95
Definition: dynamic_array.h:79
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
Definition: gls_video_to_texture.h:89
virtual int NumUpdateBlocks()
int _captureDevice
The index of the device providing video input.
Definition: gls_video_to_texture.h:154
GlsVideoToTextureSource * _videoSource
Observing pointer to the underlying video source device.
Definition: gls_video_to_texture.h:156
void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
void Draw() DISTI_METHOD_OVERRIDE
virtual int CaptureDevice()
int _numUpdateBlocks
The number of execution frames required to update on texture.
Definition: gls_video_to_texture.h:155
DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:540
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:245
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:487
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:221
#define GLSGEN_GLSVIDEOTOTEXTURE_EXPORT
Provides support for creating DLLs.
Definition: gls_video_to_texture.h:54
Definition: bmpimage.h:46