My Project
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CaptureFactory Class Reference

CaptureFactory for creating Capture classes. More...

#include <CaptureFactory.h>

Public Types

typedef std::vector< std::string > CapturePluginVector
 Vector of strings.
 
typedef std::vector< CaptureDeviceCaptureDeviceVector
 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...
 
CapturecreateCapture (const CaptureDevice captureDevice)
 Create Capture class. Transfers onwership to the caller. More...
 

Static Public Member Functions

static CaptureFactoryinstance ()
 The singleton instance of CaptureFactory.
 

Protected Member Functions

 ~CaptureFactory ()
 Destructor.
 

Detailed Description

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.

Member Function Documentation

◆ createCapture()

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.

Parameters
captureDeviceCaptureDevice object specifying the plugin to use.
Returns
A new Capture class for which the caller takes ownership.

◆ enumerateDevices()

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.

Parameters
captureTypeForce the enumeration of only one type of plugin.
Returns
A vector of CaptureDevice objects that are currently available.

◆ enumeratePlugins()

CapturePluginVector enumeratePlugins ( )

Enumerate capture plugins currently available.

This method should be used carfully since it will load all the available plugins.

Returns
A vector of strings identifying all currently available capture plugins.

The documentation for this class was generated from the following file: