openvideo::Node Class Reference
[Core Classes]
The Node class implements the 'AbstractProduct' part from the 'AbstractFactory' pattern [POSA96].
More...
#include <Node.h>
Inherited by openvideo::DSVLSrc, openvideo::GL_TEXTURE_2D_Sink, openvideo::GLUTSink, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::TestSrc, openvideo::V4L2Src, openvideo::VideoSink, openvideo::VideoSinkSubscriber, and openvideo::VideoWrapperSrc.
Public Member Functions | |
| Node () | |
| virtual | ~Node () |
| virtual void | initPixelFormats ()=0 |
| virtual bool | validateCurrentPixelFormat () |
| virtual const char * | getName () |
| virtual void | init () |
| virtual void | start () |
| virtual void | stop () |
| virtual void | process () |
| virtual void | postProcess () |
| virtual void | preProcess () |
| virtual bool | setParameter (std::string key, std::string value) |
| openvideo::State * | getState () |
| void | addOutput (openvideo::Node *output) |
| void | addInput (openvideo::Node *output) |
| std::vector< openvideo::Node * > * | getOutputs () |
| std::vector< openvideo::Node * > * | getInputs () |
| int | getInDegree () |
| int | getCurInDegree () |
| void | decCurInDegree () |
| int | getOutDegree () |
| int | getCurOutDegree () |
| void | decCurOutDegree () |
| void | resetCurInOutDegree () |
| const char * | getDefName () |
| virtual const std::string & | getTypeName () const |
Protected Attributes | |
| std::vector< openvideo::Node * > | outputs |
| std::vector< openvideo::Node * > | inputs |
| openvideo::State * | state |
| int | curInDegree |
| int | curOutDegree |
| std::string | name |
| std::string | typeName |
| std::string | defName |
| std::vector< PIXEL_FORMAT > | pixelFormats |
| PIXEL_FORMAT | curPixelFormat |
Detailed Description
The Node class implements the 'AbstractProduct' part from the 'AbstractFactory' pattern [POSA96].None of the functions is pure virtual but a node implementation should at least override the traversal function (process) to actually implement some action for a specific node.
Definition at line 51 of file Node.h.
Constructor & Destructor Documentation
|
|
The Constructor.
Definition at line 39 of file Node.cxx. References curInDegree, curOutDegree, curPixelFormat, openvideo::FORMAT_UNKNOWN, name, and state. |
|
|
The Destructor.
Definition at line 50 of file Node.cxx. References state. |
Member Function Documentation
|
|
Adds a new input node. This function gets called during the contruction of the graph and usually doesn't need to be overriden. Definition at line 155 of file Node.cxx. References curInDegree. Referenced by openvideo::Manager::buildSubGraph(). |
|
|
Adds a new children(output) to the node. This function gets called during the contruction of the graph and usually doesn't need to be overriden. Definition at line 148 of file Node.cxx. References curOutDegree, and outputs. Referenced by openvideo::Manager::buildSubGraph(). |
|
|
Decreases the current numer of imputs. Next to the total number of inputs, a node is able to keeps track of the current number of 'meet' inputs. This for example gets useful during the construction of a traversal order. Definition at line 198 of file Node.cxx. References curInDegree. Referenced by openvideo::Manager::initTopologicalSortedTraversal(). |
|
|
Decreases the current numer of outputs. Next to the total number of outputs, a node is able to keeps track of the current number of 'updated' outputs. This for example gets useful during the construction of a traversal order. Definition at line 192 of file Node.cxx. References curOutDegree. |
|
|
Returns the current number of parents(inputs). Next to the total number of inputs, a node is able to keeps track of the current number of 'meet' inputs. This for example gets useful during the construction of a traversal order. Definition at line 161 of file Node.cxx. References curInDegree. |
|
|
Returns the current number of children(outputs). Next to the total number of outputs, a node is able to keeps track of the current number of 'updated' outputs. This for example gets useful during the construction of a traversal order. Definition at line 179 of file Node.cxx. References curOutDegree. |
|
|
Return the nodes 'DEF' name.
Definition at line 131 of file Node.cxx. References defName. Referenced by openvideo::Manager::addNode(). |
|
|
Returns the total number of parents(inputs).
Definition at line 167 of file Node.cxx. References inputs. Referenced by openvideo::OpenCVSrc::init(). |
|
|
Returns a vector with all the input(parent) nodes.
Definition at line 143 of file Node.cxx. References inputs. |
|
|
Definition at line 95 of file Node.cxx. References name. Referenced by openvideo::GLUTSink::mainLoop(). |
|
|
Returns the total number of children(outputs). * Definition at line 173 of file Node.cxx. References outputs. |
|
|
Returns a vector with all the output(children) nodes.
Definition at line 137 of file Node.cxx. References outputs. |
|
|
Returns the node's state;.
Definition at line 57 of file Node.cxx. References state. |
|
|
|
|
|
Is called once before the (process)traversal starts. Init should be used to implement any initializations a specific node needs. Reimplemented in openvideo::DSVLSrc, openvideo::GL_TEXTURE_2D_Sink, openvideo::GLUTSink, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::TestSrc, openvideo::V4L2Src, openvideo::VideoSink, and openvideo::VideoWrapperSrc. |
|
|
return value = the number of supported input formats. the formats are stored in 'pixelFormats'. Implemented in openvideo::DSVLSrc, openvideo::GL_TEXTURE_2D_Sink, openvideo::GLUTSink, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::TestSrc, openvideo::V4L2Src, openvideo::VideoSink, openvideo::VideoWrapperSrc, and TestWinCE. |
|
|
This function is called after OpenVideo's graph is entirely traversed and before a new traversal is invoked. Here, a specific node implementation can reset some data before a new traversal will take place. Reimplemented in openvideo::DSVLSrc, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::V4L2Src, openvideo::VideoSink, and openvideo::VideoWrapperSrc. |
|
|
This function is called after OpenVideo's graph is entirely traversed and before a new traversal is invoked. Here, a specific node implementation can reset some data before a new traversal will take place. Reimplemented in openvideo::DSVLSrc, openvideo::ImageSrc, and openvideo::VideoWrapperSrc. |
|
|
This is the actual traversal fucntion. Process is called whenever a new traversal is invoked by the managers timer. A specific node implementation should do all its computations which need to be updated here. Reimplemented in openvideo::DSVLSrc, openvideo::GL_TEXTURE_2D_Sink, openvideo::GLUTSink, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::TestSrc, openvideo::V4L2Src, openvideo::VideoSink, and openvideo::VideoWrapperSrc. |
|
|
Resets the current numer of outputs and inputs to the total numer of in- and outputs.
Definition at line 185 of file Node.cxx. References curInDegree, curOutDegree, inputs, and outputs. |
|
||||||||||||
|
setParameter is called by OpenVideo's parser.
The function gets the xml (key)string and the corresponding value right out of the xml text file. A specific node implementation should override 'setParameter' to set all its parameters comming from the xml configuration. Reimplemented in openvideo::DSVLSrc, openvideo::ImageSrc, openvideo::OpenCVSrc, openvideo::V4L2Src, and openvideo::VideoWrapperSrc. Definition at line 63 of file Node.cxx. References curPixelFormat, defName, name, and openvideo::PixelFormat::StringToFormat(). Referenced by openvideo::Manager::addNode(), openvideo::VideoWrapperSrc::setParameter(), openvideo::V4L2Src::setParameter(), openvideo::OpenCVSrc::setParameter(), openvideo::ImageSrc::setParameter(), and openvideo::DSVLSrc::setParameter(). |
|
|
Is called once before the (process)traversal starts. Start should be used to implement any start routines a specific node needs. Reimplemented in openvideo::GLUTSink, openvideo::OpenCVSrc, and openvideo::V4L2Src. |
|
|
Is called after the (process)traversal finishes. Stop should be called to clean up any node specific data. Reimplemented in openvideo::OpenCVSrc, and openvideo::V4L2Src. |
|
|
Definition at line 83 of file Node.cxx. References curPixelFormat, and pixelFormats. |
Member Data Documentation
|
|
Current input degree. Next to the total number of inputs, a node is able to keeps track of the current number of 'meet' inputs. This for example gets useful during the construction of a traversal order. Definition at line 228 of file Node.h. Referenced by addInput(), decCurInDegree(), getCurInDegree(), Node(), and resetCurInOutDegree(). |
|
|
current output degree Next to the total number of outputs, a node is able to keeps track of the current number of 'updated' outputs. This for example gets useful during the construction of a traversal order. Definition at line 235 of file Node.h. Referenced by addOutput(), decCurOutDegree(), getCurOutDegree(), Node(), and resetCurInOutDegree(). |
|
|
Definition at line 256 of file Node.h. Referenced by openvideo::ImageSrc::init(), openvideo::GLUTSink::init(), openvideo::GL_TEXTURE_2D_Sink::init(), openvideo::DSVLSrc::init(), Node(), setParameter(), and validateCurrentPixelFormat(). |
|
|
The node's 'DEF' name.
Definition at line 249 of file Node.h. Referenced by getDefName(), and setParameter(). |
|
|
A vector to hold the children (inputs).
Definition at line 216 of file Node.h. Referenced by getInDegree(), getInputs(), openvideo::VideoSink::init(), openvideo::GLUTSink::init(), openvideo::GL_TEXTURE_2D_Sink::init(), and resetCurInOutDegree(). |
|
|
The node's name.
Definition at line 240 of file Node.h. Referenced by openvideo::DSVLSrc::DSVLSrc(), getName(), openvideo::GL_TEXTURE_2D_Sink::GL_TEXTURE_2D_Sink(), openvideo::GLUTSink::GLUTSink(), openvideo::ImageSrc::ImageSrc(), openvideo::GLUTSink::init(), openvideo::GL_TEXTURE_2D_Sink::init(), Node(), setParameter(), openvideo::TestSrc::TestSrc(), openvideo::VideoSink::VideoSink(), and openvideo::VideoWrapperSrc::VideoWrapperSrc(). |
|
|
A vector to hold the children (outputs).
Definition at line 211 of file Node.h. Referenced by addOutput(), getOutDegree(), getOutputs(), and resetCurInOutDegree(). |
|
|
|
|
The node's type name.
Definition at line 243 of file Node.h. Referenced by openvideo::DSVLSrc::DSVLSrc(), openvideo::GL_TEXTURE_2D_Sink::GL_TEXTURE_2D_Sink(), openvideo::GLUTSink::GLUTSink(), openvideo::ImageSrc::ImageSrc(), openvideo::TestSrc::TestSrc(), openvideo::VideoSink::VideoSink(), and openvideo::VideoWrapperSrc::VideoWrapperSrc(). |
The documentation for this class was generated from the following files:
