avcap::DeviceCollector Class Reference

#include <avcap/DeviceCollector.h>


Detailed Description

This singleton queries the capture devices available on the system and provides a factory-method to create CaptureDevice-objects.

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:

Win32: Darwin:

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 DeviceListgetDeviceList () 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.


Member Typedef Documentation

typedef std::list<DeviceDescriptor*> avcap::DeviceCollector::DeviceList

List type of the DeviceDescriptor object list.


Constructor & Destructor Documentation

DeviceCollector::DeviceCollector (  ) 

Constructor.

DeviceCollector::~DeviceCollector (  )  [virtual]

Destructor.


Member Function Documentation

const DeviceList& avcap::DeviceCollector::getDeviceList (  )  const [inline]

Returns the STL-list of DeviceDescriptor objects describing available capture devices.

Returns:
The descriptor list.

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.

Parameters:
name : the name of a device node (e.g. /dev/video0)
Returns:
true, if it is a V4L1-device, false else


The documentation for this class was generated from the following files:
Generated on Mon Nov 30 11:10:32 2009 for avcap-0.1 by  doxygen 1.5.1