openvideo::GL_TEXTURE_2D_Sink Class Reference
[Node Classes]
This node implements a 2d texture which is updated every time the node is traversed.
More...
#include <GL_TEXTURE_2D_Sink.h>
Inherits openvideo::Node.
Public Member Functions | |
| GL_TEXTURE_2D_Sink () | |
| ~GL_TEXTURE_2D_Sink () | |
| virtual void | init () |
| virtual void | process () |
| void | acquire () |
| void | release () |
| unsigned int | get_video_texture_id () |
| virtual void | initPixelFormats () |
Public Attributes | |
| float | t_u0 |
| float | t_u1 |
| float | t_v0 |
| float | t_v1 |
| bool | isStarted |
Protected Types | |
| enum | { TEXTURE_WIDTH = 1024, TEXTURE_HEIGHT = 1024 } |
Protected Attributes | |
| ACE_Mutex * | mutex |
| bool | doubleBufferFlag |
| int | buffer |
| unsigned int | video_texture_id [1] |
| int | width |
| int | height |
| int | format |
| int | internalFormat |
| bool | flip_h |
| bool | flip_v |
Detailed Description
This node implements a 2d texture which is updated every time the node is traversed.GL_TEXTURE_2D_Sink takes the context of it's first registered parent node. The node can be used to integrate an OpenVideo sink into another programm. therefore it implements a way to lock and unlock the texture it updates.
Supported Pixel Formats:
- : R8G8B8
- : B8G8R8
- : R8G8B8X8
- : B8G8R8X8
- : L8
Definition at line 54 of file GL_TEXTURE_2D_Sink.h.
Member Enumeration Documentation
|
|
max. texture size Definition at line 139 of file GL_TEXTURE_2D_Sink.h. |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 61 of file GL_TEXTURE_2D_Sink.cxx. References buffer, height, internalFormat, isStarted, mutex, openvideo::Node::name, openvideo::Node::typeName, video_texture_id, and width. |
|
|
destructor
Definition at line 87 of file GL_TEXTURE_2D_Sink.cxx. References mutex. |
Member Function Documentation
|
|
aquires the mutex
Definition at line 96 of file GL_TEXTURE_2D_Sink.cxx. References mutex. |
|
|
opengl's texture id.
Definition at line 54 of file GL_TEXTURE_2D_Sink.cxx. References video_texture_id. |
|
|
creates the texture. original gl spec. Reimplemented from openvideo::Node. Definition at line 112 of file GL_TEXTURE_2D_Sink.cxx. References openvideo::Node::curPixelFormat, flip_h, flip_v, format, openvideo::FORMAT_B8G8R8, openvideo::FORMAT_B8G8R8X8, openvideo::FORMAT_L8, openvideo::FORMAT_R8G8B8, openvideo::FORMAT_R8G8B8X8, openvideo::PixelFormat::FormatToString(), openvideo::Manager::getInstance(), openvideo::State::height, height, openvideo::Node::inputs, internalFormat, isStarted, mutex, openvideo::Node::name, openvideo::Node::state, t_u0, t_u1, t_v0, t_v1, TEXTURE_HEIGHT, TEXTURE_WIDTH, video_texture_id, openvideo::State::width, and width. Referenced by process(). |
|
|
return value = the number of supported input formats. the formats are stored in 'pixelFormats'. Implements openvideo::Node. Definition at line 73 of file GL_TEXTURE_2D_Sink.cxx. References openvideo::FORMAT_B8G8R8, openvideo::FORMAT_B8G8R8X8, openvideo::FORMAT_L8, openvideo::FORMAT_R8G8B8, openvideo::FORMAT_R8G8B8X8, and openvideo::Node::pixelFormats. |
|
|
updates the texture with the video frame in it's context.
Reimplemented from openvideo::Node. Definition at line 245 of file GL_TEXTURE_2D_Sink.cxx. References buffer, openvideo::State::getCurrentBuffer(), openvideo::Buffer::getPixels(), openvideo::Manager::hasGLContext, height, init(), isStarted, openvideo::Buffer::lock(), mutex, openvideo::Node::state, openvideo::Buffer::unlock(), video_texture_id, and width. |
|
|
releases the mutex.
Definition at line 106 of file GL_TEXTURE_2D_Sink.cxx. References mutex. |
Member Data Documentation
|
|
Definition at line 113 of file GL_TEXTURE_2D_Sink.h. Referenced by GL_TEXTURE_2D_Sink(), and process(). |
|
|
Definition at line 111 of file GL_TEXTURE_2D_Sink.h. |
|
|
is the video fliped?
Definition at line 134 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
is the video fliped?
Definition at line 134 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
texture format.
Definition at line 124 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
video widht & height.
Definition at line 119 of file GL_TEXTURE_2D_Sink.h. Referenced by GL_TEXTURE_2D_Sink(), init(), and process(). |
|
|
Internal texture format. defines the number of color components in the texture. valid values = 1,2,3, or 4. Definition at line 129 of file GL_TEXTURE_2D_Sink.h. Referenced by GL_TEXTURE_2D_Sink(), and init(). |
|
|
indicated whether the sink is started or not.
Definition at line 102 of file GL_TEXTURE_2D_Sink.h. Referenced by GL_TEXTURE_2D_Sink(), init(), and process(). |
|
|
mutext to lock the sink's data.
Definition at line 109 of file GL_TEXTURE_2D_Sink.h. Referenced by acquire(), GL_TEXTURE_2D_Sink(), init(), process(), release(), and ~GL_TEXTURE_2D_Sink(). |
|
|
texture coordinates: two of them are 0 and the other two indicate the ratio between max. texture size and the current video size. flip_h, flip_v indicate which two of them are going to be 0. Definition at line 92 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
texture coordinates: two of them are 0 and the other two indicate the ratio between max. texture size and the current video size. flip_h, flip_v indicate which two of them are going to be 0. Definition at line 92 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
texture coordinates: two of them are 0 and the other two indicate the ratio between max. texture size and the current video size. flip_h, flip_v indicate which two of them are going to be 0. Definition at line 92 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
texture coordinates: two of them are 0 and the other two indicate the ratio between max. texture size and the current video size. flip_h, flip_v indicate which two of them are going to be 0. Definition at line 92 of file GL_TEXTURE_2D_Sink.h. Referenced by init(). |
|
|
Definition at line 115 of file GL_TEXTURE_2D_Sink.h. Referenced by get_video_texture_id(), GL_TEXTURE_2D_Sink(), init(), and process(). |
|
|
video widht & height.
Definition at line 119 of file GL_TEXTURE_2D_Sink.h. Referenced by GL_TEXTURE_2D_Sink(), init(), and process(). |
The documentation for this class was generated from the following files:
