This class manages all device plugins and maintains a device if asked to do so.
More...
#include <DeviceManager.h>
This class manages all device plugins and maintains a device if asked to do so.
This enables applications to access their output device without having to carry it through the whole application.
◆ get3DDevice()
| std::shared_ptr< I3DDevice > DeviceManager::get3DDevice |
( |
| ) |
|
|
static |
Returns the currently handled 3D device.
- Returns
- The handled device or nullptr if no device has been registered or the registered device is not an I3DDevice.
◆ getAvailableCaptureDeviceNames()
| std::vector< std::string > DeviceManager::getAvailableCaptureDeviceNames |
( |
| ) |
|
|
static |
Returns a list of available capture devices.
- Returns
- A list of strings with the names of available capture devices.
◆ getAvailableDeviceNames()
| std::vector< std::string > DeviceManager::getAvailableDeviceNames |
( |
| ) |
|
|
static |
Returns a list of available devices.
- Returns
- A list of strings with the names of available devices.
◆ getCaptureDeviceFactory()
| std::shared_ptr< ICaptureDeviceFactory > DeviceManager::getCaptureDeviceFactory |
( |
const std::string & | name | ) |
|
|
static |
Returns the factory for a specific capture device.
- Parameters
-
| name | The representative name of the capture device. |
- Returns
- The factory if it was found, or nullptr otherwise.
◆ getDefaultDeviceFactory()
| std::shared_ptr< IDeviceFactory > DeviceManager::getDefaultDeviceFactory |
( |
| ) |
|
|
static |
Returns the default device based on the priorities of the registered factories.
- Returns
- The default device or nullptr if no factory has been registered.
◆ getDevice()
| std::shared_ptr< IDevice > DeviceManager::getDevice |
( |
| ) |
|
|
static |
Returns the currently handled device.
- Returns
- The handled device or nullptr if no device has been registered.
◆ getDeviceFactory()
| std::shared_ptr< IDeviceFactory > DeviceManager::getDeviceFactory |
( |
const std::string & | name | ) |
|
|
static |
Returns the factory for a specific device.
- Parameters
-
| name | The representative name of the device. |
- Returns
- The factory if it was found, or nullptr otherwise.
◆ openCaptureDevice()
Opens an input capture reader.
- Parameters
-
| name | The capture device name. |
| specs | The desired specification. |
| buffersize | The capture buffer size in samples. |
◆ openDefaultDevice()
| void DeviceManager::openDefaultDevice |
( |
| ) |
|
|
static |
Opens the default device which will then be handled by the manager.
The device to open is selected based on the priority of the registered factories. If a device is currently being handled it will be released.
◆ openDevice()
| void DeviceManager::openDevice |
( |
const std::string & | name | ) |
|
|
static |
Opens a device which will then be handled by the manager.
If a device is currently being handled it will be released.
- Parameters
-
| name | The representative name of the device. |
◆ registerCaptureDevice()
| void DeviceManager::registerCaptureDevice |
( |
const std::string & | name, |
|
|
std::shared_ptr< ICaptureDeviceFactory > | factory ) |
|
static |
Registers a capture device factory.
- Parameters
-
| name | A representative name for the capture device. |
| factory | The factory that creates the capture reader. |
◆ registerDevice()
| void DeviceManager::registerDevice |
( |
const std::string & | name, |
|
|
std::shared_ptr< IDeviceFactory > | factory ) |
|
static |
Registers a device factory.
This method is mostly used by plugin developers to add their device implementation for general use by the library end users.
- Parameters
-
| name | A representative name for the device. |
| factory | The factory that creates the device. |
◆ setDevice()
| void DeviceManager::setDevice |
( |
std::shared_ptr< IDevice > | device | ) |
|
|
static |
Sets a device that should be handled by the manager.
If a device is currently being handled it will be released.
- Parameters
-
| device | The device the manager should take care of. |
The documentation for this class was generated from the following file: