2 V4L Philips LX
INDI Driver
3 INDI Interface
for V4L devices (Philips)
4 Copyright (C) 2003 - 2005 Jasem Mutlaq (mutlaqja@ikarustech.com)
6 This library is free software;
7 you can redistribute it and / or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation;
11 version 2.1 of the License, or (at your option) any later version.
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT
ANY WARRANTY;
15 without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License
for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with
this library;
21 if not, write to the Free Software
22 Foundation, 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 iGuider: iOptron iGuide",
"iOptron iGuider"},
49 {
"iOptron iGuider 1",
"iOptron iGuider"},
50 {
"mmal service 16.1",
"Raspberry Pi High Quality Camera"},
51 {
"UVC Camera (046d:0825)",
"Logitech HD C270"},
52 {
"USB 2.0 Camera: USB Camera",
"IMX290 Camera"},
53 {
"0c45:6366 Microdia",
"IMX290 H264 Camera"},
54 {
"Microsoft® LifeCam Cinema(TM):",
"Microsoft LifeCam Cinema"}
67 const char *envDevice = getenv(
"INDIDEV");
68 auto isDefaultCamera = envDevice ==
nullptr || !strcmp(envDevice,
"V4L2 CCD");
70 auto targetDriver = std::make_pair(std::string(
"V4L2 CCD"), std::string(
"/dev/video0"));
76 for (
const auto &oneDriver : driverMap)
79 if (envDevice == oneDriver.second)
83 auto match = devices.find(oneDriver.first);
84 if (match != devices.end())
87 targetDriver = std::make_pair(oneDriver.second, (*match).second);
94 if (targetDriver.first ==
"V42L CCD")
97 MainCam.reset(
new V4L2_Driver(targetDriver.first.c_str(), targetDriver.second.c_str()));
99 MainCam->initCamBase();
static std::map< std::string, std::string > enumerate()
Namespace to encapsulate INDI client, drivers, and mediator classes.