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. | |
typedef std::vector< std::string > | CapturePluginVector |
Vector of strings. | |
Public Member Functions | |
Capture * | createCapture (const CaptureDevice captureDevice) |
Create Capture class. Transfers onwership to the caller. | |
CaptureDeviceVector | enumerateDevices (const std::string &captureType="") |
Enumerate capture devices currently available. | |
CapturePluginVector | enumeratePlugins () |
Enumerate capture plugins currently available. | |
Static Public Member Functions | |
static CaptureFactory * | instance () |
The singleton instance of CaptureFactory. | |
Protected Member Functions | |
~CaptureFactory () | |
Destructor. | |
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.
alvar::CaptureFactory::~CaptureFactory | ( | ) | [protected] |
Destructor.
Definition at line 215 of file CaptureFactory.cpp.
alvar::CaptureFactory::CaptureFactory | ( | ) | [private] |
Definition at line 210 of file CaptureFactory.cpp.
alvar::CaptureFactory::CaptureFactory | ( | const CaptureFactory & | ) | [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.
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.
CaptureFactory * alvar::CaptureFactory::instance | ( | ) | [static] |
The singleton instance of CaptureFactory.
Definition at line 196 of file CaptureFactory.cpp.
CaptureFactory& alvar::CaptureFactory::operator= | ( | const CaptureFactory & | ) | [private] |
CaptureFactoryPrivate* alvar::CaptureFactory::d [private] |
Definition at line 133 of file CaptureFactory.h.
CaptureFactory::CaptureFactoryDestroyer alvar::CaptureFactory::mDestroyer [static, private] |
Definition at line 130 of file CaptureFactory.h.
CaptureFactory * alvar::CaptureFactory::mInstance = NULL [static, private] |
Definition at line 128 of file CaptureFactory.h.
Mutex alvar::CaptureFactory::mMutex [static, private] |
Definition at line 129 of file CaptureFactory.h.