00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef DEVICECOLLECTOR_H_
00025 #define DEVICECOLLECTOR_H_
00026
00027 #include <list>
00028 #include <string>
00029
00030 #include "singleton.h"
00031
00032 #if !defined(_MSC_VER) && !defined(USE_PREBUILD_LIBS)
00033 # include "avcap-config.h"
00034 #endif
00035
00036 #include "avcap-export.h"
00037
00038 namespace avcap
00039 {
00040 class DeviceDescriptor;
00041 class CaptureDevice;
00042
00044
00069 class AVCAP_Export DeviceCollector
00070 {
00071 public:
00073 typedef std::list<DeviceDescriptor*> DeviceList;
00074
00075 private:
00076 DeviceList mDeviceList;
00077
00078 public:
00080 DeviceCollector();
00081
00083 virtual ~DeviceCollector();
00084
00086
00087 inline const DeviceList& getDeviceList() const
00088 { return (const DeviceList&) mDeviceList; }
00089
00091
00095 bool testDevice(const std::string& name);
00096
00097 private:
00098
00099 #ifdef AVCAP_LINUX
00100 void query_V4L1_Devices();
00101
00102 void query_V4L2_Devices();
00103
00104 void query_ieee1394_Devices();
00105
00106 int test_V4L1_Device(const std::string& name);
00107
00108 int test_V4L2_Device(const std::string& name);
00109 #endif
00110
00111 #ifdef AVCAP_OSX
00112 void query_QT_Devices();
00113 #endif
00114
00115 #ifdef AVCAP_WINDOWS
00116 void query_DS_Devices();
00117
00118 int test_DS_Device(const std::string& name);
00119
00120 bool getInstalledDeviceIDs(std::list<std::string> &UniqueDeviceIDList);
00121
00122 #endif
00123 };
00124
00126 typedef Singleton<DeviceCollector> DEVICE_COLLECTOR;
00127 }
00128
00129
00130
00131 #endif // DEVICECOLLECTOR_H_