![]() |
My Project
|
CaptureFactory for creating Capture classes. More...
#include <CaptureFactory.h>
Public Types | |
typedef std::vector< std::string > | CapturePluginVector |
Vector of strings. | |
typedef std::vector< CaptureDevice > | CaptureDeviceVector |
Vector of CaptureDevices. | |
Public Member Functions | |
CapturePluginVector | enumeratePlugins () |
Enumerate capture plugins currently available. More... | |
CaptureDeviceVector | enumerateDevices (const std::string &captureType="") |
Enumerate capture devices currently available. More... | |
Capture * | createCapture (const CaptureDevice captureDevice) |
Create Capture class. Transfers onwership to the caller. More... | |
Static Public Member Functions | |
static CaptureFactory * | instance () |
The singleton instance of CaptureFactory. | |
Protected Member Functions | |
~CaptureFactory () | |
Destructor. | |
CaptureFactory for creating Capture classes.
CaptureFactory is a singleton that creates Capture classes used to perform camera acquisition. Different backends are implemented as dynamicly loaded plugins so that platform dependancies can be handled at runtime and not compile time.
Definition at line 52 of file CaptureFactory.h.
Capture* createCapture | ( | const CaptureDevice | captureDevice | ) |
Create Capture class. Transfers onwership to the caller.
If the needed backend plugin is not loaded, an attempt is made to load it and an instance of it is kept such that it is available for subsequent calls.
captureDevice | CaptureDevice object specifying the plugin to use. |
CaptureDeviceVector enumerateDevices | ( | const std::string & | captureType = "" | ) |
Enumerate capture devices currently available.
This method should be used carfully since it will load all the known plugins and call their respective enumeration methods. The vector of CaptureDevice objects returned should be cached.
captureType | Force the enumeration of only one type of plugin. |
CapturePluginVector enumeratePlugins | ( | ) |
Enumerate capture plugins currently available.
This method should be used carfully since it will load all the available plugins.