#include <avcap/DeviceCollector.h>
This class tests during instantiation (i.e. the first call to it's instance()-method), which capture devices are available on the system and provides an STL-list of DeviceDescriptor objects describing these devices.
The following strategy to find capture devices in the system is applied:
Linux:
Access the singleton instance via DEVICE_COLLECTOR::instance().
Public Types | |
typedef std::list< DeviceDescriptor * > | DeviceList |
List type of the DeviceDescriptor object list. | |
Public Member Functions | |
DeviceCollector () | |
Constructor. | |
virtual | ~DeviceCollector () |
Destructor. | |
const DeviceList & | getDeviceList () const |
Returns the STL-list of DeviceDescriptor objects describing available capture devices. | |
bool | testDevice (const std::string &name) |
Linux only! Test, if the device with the given name can be opened and is a V4L1 or V4L2 capture device or not. |
typedef std::list<DeviceDescriptor*> avcap::DeviceCollector::DeviceList |
List type of the DeviceDescriptor object list.
DeviceCollector::DeviceCollector | ( | ) |
Constructor.
DeviceCollector::~DeviceCollector | ( | ) | [virtual] |
Destructor.
const DeviceList& avcap::DeviceCollector::getDeviceList | ( | ) | const [inline] |
Returns the STL-list of DeviceDescriptor objects describing available capture devices.
bool DeviceCollector::testDevice | ( | const std::string & | name | ) |
Linux only! Test, if the device with the given name can be opened and is a V4L1 or V4L2 capture device or not.
If it is, a new DeviceDescriptor-object is created and stored in the device list, managed by the collector.
name | : the name of a device node (e.g. /dev/video0) |