OpenVideo Documentation

   Main Page       Modules       Class Hierarchy       Alphabetical List       Compound List       File List       Compound Members       Related Pages   

openvideo::TestSrc Class Reference
[Node Classes]

TestSrc implements an 320x240 image with a white background where a red,blue and green square moves on. More...

#include <TestSrc.h>

Inherits openvideo::Node.

List of all members.

Public Member Functions

 TestSrc ()
virtual ~TestSrc ()
virtual void init ()
virtual void process ()
virtual void initPixelFormats ()

Protected Attributes

int width
int height
int posX
int posY


Detailed Description

TestSrc implements an 320x240 image with a white background where a red,blue and green square moves on.

This node is used to test OpenVideo's environment with any input stream comming from a camera.

Definition at line 46 of file TestSrc.h.


Constructor & Destructor Documentation

openvideo::TestSrc::TestSrc  ) 
 

constructor.

creates a new context and allocates memory for the image.

Definition at line 82 of file TestSrc.cxx.

References height, openvideo::Node::name, openvideo::Node::state, openvideo::Node::typeName, and width.

openvideo::TestSrc::~TestSrc  )  [virtual]
 

Definition at line 91 of file TestSrc.cxx.

References openvideo::Node::state.


Member Function Documentation

void openvideo::TestSrc::init  )  [virtual]
 

clears the image and sets the widht and height onto its context.

Reimplemented from openvideo::Node.

Definition at line 106 of file TestSrc.cxx.

References openvideo::State::clear(), openvideo::Manager::getInstance(), height, openvideo::State::height, posX, posY, openvideo::Node::state, width, and openvideo::State::width.

void openvideo::TestSrc::initPixelFormats  )  [virtual]
 

return value = the number of supported input formats.

the formats are stored in 'pixelFormats'.

Implements openvideo::Node.

Definition at line 99 of file TestSrc.cxx.

References openvideo::FORMAT_B8G8R8, openvideo::FORMAT_R8G8B8, and openvideo::Node::pixelFormats.

void openvideo::TestSrc::process  )  [virtual]
 

updates the image by moving the three squares by one pixel.

Reimplemented from openvideo::Node.

Definition at line 128 of file TestSrc.cxx.

References openvideo::State::findFreeBuffer(), openvideo::Manager::getInstance(), openvideo::Buffer::getPixels(), height, openvideo::TestSrcBuffer::incUpdateCounter(), posX, posY, openvideo::Node::state, and width.


Member Data Documentation

int openvideo::TestSrc::height [protected]
 

image widht and height

Definition at line 77 of file TestSrc.h.

Referenced by init(), process(), and TestSrc().

int openvideo::TestSrc::posX [protected]
 

current square position.

Definition at line 82 of file TestSrc.h.

Referenced by init(), and process().

int openvideo::TestSrc::posY [protected]
 

current square position.

Definition at line 82 of file TestSrc.h.

Referenced by init(), and process().

int openvideo::TestSrc::width [protected]
 

image widht and height

Definition at line 77 of file TestSrc.h.

Referenced by init(), process(), and TestSrc().


The documentation for this class was generated from the following files:
 This page was generated at Wed May 31 13:04:18 2006 for OpenVideo by Doxygen.
 If you have any comments, please send a message to schmalstieg@icg.tu-graz.ac.at.
www.studierstube.org