OpenVideo Documentation

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

openvideo::VideoWrapperSrc Class Reference
[Node Classes]

VideoWrapperSrc implements an OpenVideo node to access the videowrapper library. More...

#include <VideoWrapperSrc.h>

Inherits openvideo::Node.

List of all members.

Public Types

enum  { MAX_BUFFERS = 10 }

Public Member Functions

 VideoWrapperSrc ()
 ~VideoWrapperSrc ()
virtual bool setParameter (std::string key, std::string value)
virtual void init ()
virtual void process ()
virtual void postProcess ()
virtual void preProcess ()
virtual void initPixelFormats ()

Protected Attributes

unsigned short g_hVideo
char libId [20]
char formatId [20]
int cameraNum
int width
int height
int frameRate
int format
float scale
int numBuffers


Detailed Description

VideoWrapperSrc implements an OpenVideo node to access the videowrapper library.

The xml entry looks like this:

    <VideoWrapperSrc 
    name="VWSrc_1"
    libId="vc"
    formatId="UYVY"
    cameraNum="1"
    width="320"
    height="240"
    frameRate="15"
    scale="0"> 
    </VideoWrapperSrc>
    
The parameters are :
(libID,camNum,width,height,frameRate,scale refer all to VideoWrapper's init. string)

Definition at line 79 of file VideoWrapperSrc.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MAX_BUFFERS 

Definition at line 84 of file VideoWrapperSrc.h.


Constructor & Destructor Documentation

openvideo::VideoWrapperSrc::VideoWrapperSrc  ) 
 

Definition at line 117 of file VideoWrapperSrc.cxx.

References cameraNum, format, formatId, frameRate, height, libId, openvideo::Node::name, numBuffers, scale, openvideo::Node::typeName, and width.

openvideo::VideoWrapperSrc::~VideoWrapperSrc  ) 
 

Definition at line 127 of file VideoWrapperSrc.cxx.


Member Function Documentation

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

This function calls intializes the videowrapper lib.

it then opens and starts the video stream. Finally it creates a new context where it puts the video specific data on.

Reimplemented from openvideo::Node.

Definition at line 139 of file VideoWrapperSrc.cxx.

References cameraNum, openvideo::State::clear(), openvideo::State::format, format, openvideo::FORMAT_UNKNOWN, formatId, frameRate, openvideo::PixelFormat::fromOGL(), g_hVideo, openvideo::Manager::getInstance(), openvideo::State::height, height, libId, numBuffers, scale, openvideo::Node::state, openvideo::State::width, and width.

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

return value = the number of supported input formats.

the formats are stored in 'pixelFormats'.

Implements openvideo::Node.

Definition at line 132 of file VideoWrapperSrc.cxx.

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

void openvideo::VideoWrapperSrc::postProcess  )  [virtual]
 

releases the videoframe (which was previously locked by the process fucntion.

Reimplemented from openvideo::Node.

Definition at line 207 of file VideoWrapperSrc.cxx.

void openvideo::VideoWrapperSrc::preProcess  )  [virtual]
 

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 from openvideo::Node.

Definition at line 184 of file VideoWrapperSrc.cxx.

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

Updates the video frame at its context object.

Reimplemented from openvideo::Node.

Definition at line 190 of file VideoWrapperSrc.cxx.

References openvideo::State::findFreeBuffer(), openvideo::Manager::getInstance(), openvideo::VideoWrapperSrcBuffer::getNewFrame(), and openvideo::Node::state.

bool openvideo::VideoWrapperSrc::setParameter std::string  key,
std::string  value
[virtual]
 

Sets all relevat parameters.

Reimplemented from openvideo::Node.

Definition at line 213 of file VideoWrapperSrc.cxx.

References cameraNum, formatId, frameRate, height, MAX_BUFFERS, numBuffers, scale, openvideo::Node::setParameter(), and width.


Member Data Documentation

int openvideo::VideoWrapperSrc::cameraNum [protected]
 

self explaining variables.

Definition at line 140 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

int openvideo::VideoWrapperSrc::format [protected]
 

self explaining variables.

Definition at line 140 of file VideoWrapperSrc.h.

Referenced by init(), and VideoWrapperSrc().

char openvideo::VideoWrapperSrc::formatId[20] [protected]
 

the video format string.

Definition at line 135 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

int openvideo::VideoWrapperSrc::frameRate [protected]
 

self explaining variables.

Definition at line 140 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

unsigned short openvideo::VideoWrapperSrc::g_hVideo [protected]
 

the handle to the video stream

Definition at line 125 of file VideoWrapperSrc.h.

Referenced by init().

int openvideo::VideoWrapperSrc::height [protected]
 

self explaining variables.

Definition at line 140 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

char openvideo::VideoWrapperSrc::libId[20] [protected]
 

videowrapper's library id.

Definition at line 130 of file VideoWrapperSrc.h.

Referenced by init(), and VideoWrapperSrc().

int openvideo::VideoWrapperSrc::numBuffers [protected]
 

Number of frame buffers.

Definition at line 149 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

float openvideo::VideoWrapperSrc::scale [protected]
 

videowrapper's scale value.

Definition at line 145 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().

int openvideo::VideoWrapperSrc::width [protected]
 

self explaining variables.

Definition at line 140 of file VideoWrapperSrc.h.

Referenced by init(), setParameter(), and VideoWrapperSrc().


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