
This class is for run-time selection of a frame grabber driver. More...
#include <Devices/FrameGrabberConfigurator.H>


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< FrameIstream > | getFrameGrabber () 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::string > | itsGrabberType |
| Type of the grabber. | |
| OModelParam< std::string > | itsDeinterlacerType |
| Type of the deinterlacer. | |
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.
| 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.
| 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().
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().
1.6.3