CaptureFactory for creating Capture classes. More...
#include <CaptureFactory.h>
Classes | |
class | CaptureFactoryDestroyer |
CaptureFactoryDestroyer for deleting the CaptureFactory singleton. More... | |
Public Types | |
typedef std::vector< CaptureDevice > | CaptureDeviceVector |
Vector of CaptureDevices. More... | |
typedef std::vector< std::string > | CapturePluginVector |
Vector of strings. More... | |
Public Member Functions | |
Capture * | createCapture (const CaptureDevice captureDevice) |
Create Capture class. Transfers onwership to the caller. More... | |
CaptureDeviceVector | enumerateDevices (const std::string &captureType="") |
Enumerate capture devices currently available. More... | |
CapturePluginVector | enumeratePlugins () |
Enumerate capture plugins currently available. More... | |
Static Public Member Functions | |
static CaptureFactory * | instance () |
The singleton instance of CaptureFactory. More... | |
Protected Member Functions | |
~CaptureFactory () | |
Destructor. More... | |
Private Member Functions | |
CaptureFactory () | |
CaptureFactory (const CaptureFactory &) | |
CaptureFactory & | operator= (const CaptureFactory &) |
Private Attributes | |
CaptureFactoryPrivate * | d |
Static Private Attributes | |
static CaptureFactoryDestroyer | mDestroyer |
static CaptureFactory * | mInstance = NULL |
static Mutex | mMutex |
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.
typedef std::vector<CaptureDevice> alvar::CaptureFactory::CaptureDeviceVector |
Vector of CaptureDevices.
Definition at line 77 of file CaptureFactory.h.
typedef std::vector<std::string> alvar::CaptureFactory::CapturePluginVector |
Vector of strings.
Definition at line 63 of file CaptureFactory.h.
|
protected |
Destructor.
Definition at line 215 of file CaptureFactory.cpp.
|
private |
Definition at line 210 of file CaptureFactory.cpp.
|
private |
Capture * alvar::CaptureFactory::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. |
Definition at line 257 of file CaptureFactory.cpp.
CaptureFactory::CaptureDeviceVector alvar::CaptureFactory::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. |
Definition at line 234 of file CaptureFactory.cpp.
CaptureFactory::CapturePluginVector alvar::CaptureFactory::enumeratePlugins | ( | ) |
Enumerate capture plugins currently available.
This method should be used carfully since it will load all the available plugins.
Definition at line 220 of file CaptureFactory.cpp.
|
static |
The singleton instance of CaptureFactory.
Definition at line 196 of file CaptureFactory.cpp.
|
private |
|
private |
Definition at line 133 of file CaptureFactory.h.
|
staticprivate |
Definition at line 130 of file CaptureFactory.h.
|
staticprivate |
Definition at line 128 of file CaptureFactory.h.
|
staticprivate |
Definition at line 129 of file CaptureFactory.h.