2V4L Philips LX
INDI Driver
3INDI Interface
for V4L devices (Philips)
6 This library is free software;
7you can redistribute it and / or
8modify it under the terms of the GNU Lesser General Public
9License as published by the Free Software Foundation;
11version 2.1 of the License, or (at your option) any later version.
13This library is distributed in the hope that it will be useful,
14 but WITHOUT
ANY WARRANTY;
15without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17Lesser General Public License
for more details.
19You should have received a copy of the GNU Lesser General Public
20License along with
this library;
21if not, write to the Free Software
22Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
30 std::unique_ptr<V4L2_Driver> MainCam;
33 std::map<std::string, std::string> driverMap =
35 {
"NexImage 5",
"NexImage 5"},
36 {
"UVC Camera (046d:0809)",
"Logitech Webcam Pro 9000"},
37 {
"SVBONY SV105: SVBONY SV105",
"SVBONY SV105"},
38 {
"SVBONY SV205: SVBONY SV205",
"SVBONY SV205"},
39 {
"NexImage 10",
"NexImage 10"},
40 {
"NexImage Burst Color",
"NexImage Burst Color"},
41 {
"NexImage Burst Mono",
"NexImage Burst Mono"},
42 {
"Skyris 132C",
"Skyris 132C"},
43 {
"Skyris 132M",
"Skyris 132M"},
44 {
"Skyris 236C",
"Skyris 236C"},
45 {
"Skyris 236M",
"Skyris 236M"},
46 {
"iOptron iPolar: iOptron iPolar",
"iOptron iPolar"},
47 {
"iOptron iPolar",
"iOptron iPolar"},
48 {
"iOptron iPolar 1.1: iOptron iPo",
"iOptron iPolar"},
49 {
"iOptron iGuider: iOptron iGuide",
"iOptron iGuider"},
50 {
"iOptron iGuider 1",
"iOptron iGuider"},
51 {
"iOptron iGuider External: iOptr",
"iOptron iGuider"},
52 {
"mmal service 16.1",
"Raspberry Pi High Quality Camera"},
53 {
"UVC Camera (046d:0825)",
"Logitech HD C270"},
54 {
"USB 2.0 Camera: USB Camera",
"IMX290 Camera"},
55 {
"0c45:6366 Microdia",
"IMX290 H264 Camera"},
56 {
"Microsoft® LifeCam Cinema(TM):",
"Microsoft LifeCam Cinema"}
69 const char *envDevice = getenv(
"INDIDEV");
70 auto isDefaultCamera = envDevice ==
nullptr || !strcmp(envDevice,
"V4L2 CCD");
72 auto targetDriver = std::make_pair(std::string(
"V4L2 CCD"), std::string(
"/dev/video0"));
78 for (
const auto &oneDriver : driverMap)
81 if (envDevice == oneDriver.second)
85 auto match = devices.find(oneDriver.first);
86 if (match != devices.end())
89 targetDriver = std::make_pair(oneDriver.second, (*match).second);
96 if (targetDriver.first ==
"V42L CCD")
99 MainCam.reset(
new V4L2_Driver(targetDriver.first.c_str(), targetDriver.second.c_str()));
101 MainCam->initCamBase();
static std::map< std::string, std::string > enumerate()
Namespace to encapsulate INDI client, drivers, and mediator classes.