FrameGrabberConfigurator Class Reference

This class is for run-time selection of a frame grabber driver. More...

#include <Devices/FrameGrabberConfigurator.H>

Inheritance diagram for FrameGrabberConfigurator:
Inheritance graph
[legend]
Collaboration diagram for FrameGrabberConfigurator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FrameGrabberConfigurator (OptionManager &mgr, const std::string &descrName="Frame Grabber Configurator", const std::string &tagName="FrameGrabberConfigurator")
 Constructor.
virtual ~FrameGrabberConfigurator ()
 destructor
nub::soft_ref< FrameIstreamgetFrameGrabber () const
 Get the chosen grabber.

Protected Member Functions

virtual void paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status)
 Intercept people changing our itsGrabberName ModelParam.

Protected Attributes

OModelParam< std::stringitsGrabberType
 Type of the grabber.
OModelParam< std::stringitsDeinterlacerType
 Type of the deinterlacer.

Detailed Description

This class is for run-time selection of a frame grabber driver.

This will export the --fg-type=XX command-line option and will instantiate a FrameIstream of the desired type as the option gets assigned a value. As this happens, new options may become available in the command-line. To see them, use --help AFTER you have chosen the type of grabber to use. The current grabber may be retrieved using getFrameGrabber().

Definition at line 55 of file FrameGrabberConfigurator.H.


Constructor & Destructor Documentation

FrameGrabberConfigurator::FrameGrabberConfigurator ( OptionManager mgr,
const std::string descrName = "Frame Grabber Configurator",
const std::string tagName = "FrameGrabberConfigurator" 
)

Constructor.

Definition at line 47 of file FrameGrabberConfigurator.C.

FrameGrabberConfigurator::~FrameGrabberConfigurator (  )  [virtual]

destructor

Definition at line 57 of file FrameGrabberConfigurator.C.


Member Function Documentation

nub::soft_ref< FrameIstream > FrameGrabberConfigurator::getFrameGrabber (  )  const

Get the chosen grabber.

You should call this during start() of the ModelComponent that needs the FrameIstream. CAUTION: this may be a null soft_ref if no grabber has been chosen.

Definition at line 61 of file FrameGrabberConfigurator.C.

void FrameGrabberConfigurator::paramChanged ( ModelParamBase *const   param,
const bool  valueChanged,
ParamClient::ChangeStatus status 
) [protected, virtual]

Intercept people changing our itsGrabberName ModelParam.

See ModelComponent.H; as parsing the command-line or reading a config file sets our name, we'll also here instantiate a controller of the proper type (and export its options)

Reimplemented from ModelComponent.

Definition at line 75 of file FrameGrabberConfigurator.C.

References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsDeinterlacerType, itsGrabberType, makeIEEE1394grabber(), makeKinectgrabber(), makeOpenNIgrabber(), makeV4L2grabber(), makeV4Lgrabber(), makeXCgrabber(), makeXCgrabberFlex(), MC_RECURSE, ModelComponent::removeSubComponent(), and nub::soft_ref< T >::reset().


Member Data Documentation

Type of the deinterlacer.

Definition at line 76 of file FrameGrabberConfigurator.H.

Referenced by paramChanged().

Type of the grabber.

Definition at line 75 of file FrameGrabberConfigurator.H.

Referenced by paramChanged().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:20 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3