]>
Commit | Line | Data |
---|---|---|
4ba4d2ab JB |
1 | --- avcap-0.1.9/include/avcap/linux/V4L2_Connector.h.orig 2009-11-30 14:07:14.000000000 +0100 |
2 | +++ avcap-0.1.9/include/avcap/linux/V4L2_Connector.h 2013-08-29 18:20:52.665242649 +0200 | |
3 | @@ -26,7 +26,7 @@ | |
4 | #define V4L2_CONNECTOR_H_ | |
5 | ||
6 | #include <linux/types.h> | |
7 | -#include <linux/videodev.h> | |
8 | +#include <linux/videodev2.h> | |
9 | ||
10 | #include <string> | |
11 | #include <list> | |
12 | --- avcap-0.1.9/include/avcap/linux/V4L2_ControlBase.h.orig 2009-11-30 14:07:14.000000000 +0100 | |
13 | +++ avcap-0.1.9/include/avcap/linux/V4L2_ControlBase.h 2013-08-29 18:22:21.265238931 +0200 | |
14 | @@ -26,7 +26,7 @@ | |
15 | ||
16 | #include <string> | |
17 | #include <list> | |
18 | -#include <linux/videodev.h> | |
19 | +#include <linux/videodev2.h> | |
20 | ||
21 | namespace avcap | |
22 | { | |
23 | --- avcap-0.1.9/include/avcap/Connector.h.orig 2009-11-30 14:07:14.000000000 +0100 | |
24 | +++ avcap-0.1.9/include/avcap/Connector.h 2013-08-29 18:20:24.445243835 +0200 | |
25 | @@ -31,7 +31,7 @@ | |
26 | ||
27 | #ifdef AVCAP_LINUX | |
28 | # include <linux/types.h> | |
29 | -# include <linux/videodev.h> | |
30 | +# include <linux/videodev2.h> | |
31 | #endif | |
32 | ||
33 | #include <string> | |
34 | --- avcap-0.1.9/include/avcap/FormatManager.h.orig 2009-11-30 14:07:14.000000000 +0100 | |
35 | +++ avcap-0.1.9/include/avcap/FormatManager.h 2013-08-29 18:21:19.895241507 +0200 | |
36 | @@ -37,7 +37,7 @@ | |
37 | ||
38 | #ifdef AVCAP_LINUX | |
39 | # include <linux/types.h> | |
40 | -# include <linux/videodev.h> | |
41 | +# include <linux/videodev2.h> | |
42 | #endif // AVCAP_LINUX | |
43 | ||
44 | #ifdef _WIN32 | |
45 | --- avcap-0.1.9/avcap/linux/V4L2_ConnectorManager.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
46 | +++ avcap-0.1.9/avcap/linux/V4L2_ConnectorManager.cpp 2013-08-29 18:19:48.648578669 +0200 | |
47 | @@ -26,7 +26,7 @@ | |
48 | #include <iostream> | |
49 | #include <assert.h> | |
50 | #include <string.h> | |
51 | -#include <linux/videodev.h> | |
52 | +#include <linux/videodev2.h> | |
53 | ||
54 | #include "V4L2_ConnectorManager.h" | |
55 | #include "V4L2_DeviceDescriptor.h" | |
56 | --- avcap-0.1.9/avcap/linux/V4L2_ControlBase.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
57 | +++ avcap-0.1.9/avcap/linux/V4L2_ControlBase.cpp 2013-08-29 18:21:56.158573318 +0200 | |
58 | @@ -26,7 +26,7 @@ | |
59 | #include <sys/types.h> | |
60 | #include <linux/types.h> | |
61 | #include <sys/ioctl.h> | |
62 | -#include <linux/videodev.h> | |
63 | +#include <linux/videodev2.h> | |
64 | #include <errno.h> | |
65 | ||
66 | #include "V4L2_ControlBase.h" | |
67 | --- avcap-0.1.9/avcap/linux/AVC_DeviceDescriptor.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
68 | +++ avcap-0.1.9/avcap/linux/AVC_DeviceDescriptor.cpp 2013-08-29 18:22:59.278570669 +0200 | |
69 | @@ -23,6 +23,7 @@ | |
70 | ||
71 | #ifdef HAS_AVC_SUPPORT | |
72 | ||
73 | +#include <cstdio> | |
74 | #include <sstream> | |
75 | ||
76 | #include "AVC_DeviceDescriptor.h" | |
77 | --- avcap-0.1.9/avcap/linux/Makefile.am.orig 2009-11-30 14:07:14.000000000 +0100 | |
78 | +++ avcap-0.1.9/avcap/linux/Makefile.am 2013-08-29 18:45:22.635180961 +0200 | |
79 | @@ -4,11 +4,22 @@ | |
80 | liblinuxavcap_la_SOURCES = \ | |
81 | raw1394util.cpp V4L2_ConnectorManager.cpp\ | |
82 | AVC_Device.cpp V4L2_ControlBase.cpp\ | |
83 | - AVC_DeviceDescriptor.cpp V4L1_ConnectorManager.cpp V4L2_ControlManager.cpp\ | |
84 | - AVC_FormatManager.cpp V4L1_Control.cpp V4L2_Device.cpp\ | |
85 | - AVC_Reader.cpp V4L1_ControlManager.cpp V4L2_DeviceDescriptor.cpp\ | |
86 | - AVC_VidCapManager.cpp V4L1_Device.cpp\ | |
87 | - error.cpp V4L1_DeviceDescriptor.cpp V4L2_FormatManager.cpp\ | |
88 | - frame.cpp V4L1_FormatManager.cpp V4L2_MenuControl.cpp\ | |
89 | - ieee1394io.cpp V4L1_VidCapManager.cpp V4L2_Tuner.cpp\ | |
90 | - V4L2_Connector.cpp V4L2_VidCapManager.cpp | |
91 | \ No newline at end of file | |
92 | + AVC_DeviceDescriptor.cpp V4L2_ControlManager.cpp\ | |
93 | + AVC_FormatManager.cpp V4L2_Device.cpp\ | |
94 | + AVC_Reader.cpp V4L2_DeviceDescriptor.cpp\ | |
95 | + AVC_VidCapManager.cpp \ | |
96 | + error.cpp V4L2_FormatManager.cpp\ | |
97 | + frame.cpp V4L2_MenuControl.cpp\ | |
98 | + ieee1394io.cpp V4L2_Tuner.cpp\ | |
99 | + V4L2_Connector.cpp V4L2_VidCapManager.cpp | |
100 | + | |
101 | +if WITH_V4L1 | |
102 | +liblinuxavcap_la_SOURCES += \ | |
103 | + V4L1_ConnectorManager.cpp \ | |
104 | + V4L1_Control.cpp \ | |
105 | + V4L1_ControlManager.cpp \ | |
106 | + V4L1_Device.cpp \ | |
107 | + V4L1_DeviceDescriptor.cpp \ | |
108 | + V4L1_FormatManager.cpp \ | |
109 | + V4L1_VidCapManager.cpp | |
110 | +endif | |
111 | --- avcap-0.1.9/configure.in.orig 2009-11-30 14:07:16.000000000 +0100 | |
112 | +++ avcap-0.1.9/configure.in 2013-08-29 18:25:57.135229872 +0200 | |
113 | @@ -70,6 +70,8 @@ | |
114 | PLATFORM_SUBDIR=linux | |
115 | PLATFORM_LIB=linux/liblinuxavcap.la | |
116 | AC_CHECK_HEADER(linux/videodev.h) | |
117 | + AC_CHECK_HEADER(linux/videodev2.h) | |
118 | + AM_CONDITIONAL([WITH_V4L1], [test x$ac_cv_header_linux_videodev_h = xyes]) | |
119 | AC_DEFINE([LINUX], [1], [Compile avcap for Linux]) | |
120 | fi | |
121 | ||
122 | --- avcap-0.1.9/avcap/linux/V4L2_ControlManager.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
123 | +++ avcap-0.1.9/avcap/linux/V4L2_ControlManager.cpp 2013-08-29 18:50:24.601834955 +0200 | |
124 | @@ -28,7 +28,7 @@ | |
125 | #include <iostream> | |
126 | #include <sys/ioctl.h> | |
127 | #include <linux/types.h> | |
128 | -#include <linux/videodev.h> | |
129 | +#include <linux/videodev2.h> | |
130 | ||
131 | #include "Control_avcap.h" | |
132 | #include "V4L2_ControlManager.h" | |
133 | --- avcap-0.1.9/avcap/linux/V4L2_DeviceDescriptor.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
134 | +++ avcap-0.1.9/avcap/linux/V4L2_DeviceDescriptor.cpp 2013-08-29 18:57:21.248484137 +0200 | |
135 | @@ -29,7 +29,7 @@ | |
136 | #include <sys/stat.h> | |
137 | #include <sys/types.h> | |
138 | #include <linux/types.h> | |
139 | -#include <linux/videodev.h> | |
140 | +#include <linux/videodev2.h> | |
141 | #include <errno.h> | |
142 | ||
143 | #include "V4L2_DeviceDescriptor.h" | |
144 | --- avcap-0.1.9/avcap/linux/V4L2_FormatManager.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
145 | +++ avcap-0.1.9/avcap/linux/V4L2_FormatManager.cpp 2013-08-29 20:08:53.041637362 +0200 | |
146 | @@ -25,7 +25,7 @@ | |
147 | #include <string.h> | |
148 | #include <errno.h> | |
149 | #include <sys/ioctl.h> | |
150 | -#include <linux/videodev.h> | |
151 | +#include <linux/videodev2.h> | |
152 | ||
153 | #include "V4L2_FormatManager.h" | |
154 | #include "DeviceDescriptor.h" | |
155 | @@ -453,6 +453,7 @@ | |
156 | ||
157 | int V4L2_FormatManager::setFramerate(int fps) | |
158 | { | |
159 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
160 | // there is a special way to set the framerate for the pwc driver | |
161 | if(mDeviceDescriptor->getDriver() == "pwc") { | |
162 | struct video_window vwin; | |
163 | @@ -465,6 +466,7 @@ | |
164 | ||
165 | return ioctl(mDeviceDescriptor->getHandle(), VIDIOCSWIN, &vwin); | |
166 | } | |
167 | +#endif | |
168 | ||
169 | struct v4l2_streamparm setfps; | |
170 | memset(&setfps, 0, sizeof(struct v4l2_streamparm)); | |
171 | @@ -478,6 +480,7 @@ | |
172 | ||
173 | int V4L2_FormatManager::getFramerate() | |
174 | { | |
175 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
176 | // there is a special way to get the framerate for the pwc driver | |
177 | if(mDeviceDescriptor->getDriver() == "pwc") { | |
178 | struct video_window vwin; | |
179 | @@ -488,6 +491,7 @@ | |
180 | else | |
181 | return 0; | |
182 | } | |
183 | +#endif | |
184 | ||
185 | struct v4l2_streamparm setfps; | |
186 | memset(&setfps, 0, sizeof(struct v4l2_streamparm)); | |
187 | --- avcap-0.1.9/avcap/linux/V4L2_MenuControl.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
188 | +++ avcap-0.1.9/avcap/linux/V4L2_MenuControl.cpp 2013-08-29 20:09:25.334969339 +0200 | |
189 | @@ -24,7 +24,7 @@ | |
190 | #include <string.h> | |
191 | #include <sys/ioctl.h> | |
192 | #include <linux/types.h> | |
193 | -#include <linux/videodev.h> | |
194 | +#include <linux/videodev2.h> | |
195 | ||
196 | #include "V4L2_MenuControl.h" | |
197 | #include "V4L2_ControlBase.h" | |
198 | --- avcap-0.1.9/avcap/linux/V4L2_Tuner.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
199 | +++ avcap-0.1.9/avcap/linux/V4L2_Tuner.cpp 2013-08-29 20:09:56.138301380 +0200 | |
200 | @@ -25,7 +25,7 @@ | |
201 | #include <string.h> | |
202 | #include <iostream> | |
203 | #include <sys/ioctl.h> | |
204 | -#include <linux/videodev.h> | |
205 | +#include <linux/videodev2.h> | |
206 | ||
207 | #include "V4L2_Tuner.h" | |
208 | #include "V4L2_DeviceDescriptor.h" | |
209 | --- avcap-0.1.9/include/avcap/linux/V4L2_Tuner.h.orig 2009-11-30 14:07:14.000000000 +0100 | |
210 | +++ avcap-0.1.9/include/avcap/linux/V4L2_Tuner.h 2013-08-29 20:10:30.114966621 +0200 | |
211 | @@ -26,7 +26,7 @@ | |
212 | #define V4L2_TUNER_H_ | |
213 | ||
214 | #include <linux/types.h> | |
215 | -#include <linux/videodev.h> | |
216 | +#include <linux/videodev2.h> | |
217 | #include <sys/types.h> | |
218 | #include <string> | |
219 | ||
220 | --- avcap-0.1.9/avcap/linux/V4L2_Connector.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
221 | +++ avcap-0.1.9/avcap/linux/V4L2_Connector.cpp 2013-08-29 20:10:55.278298897 +0200 | |
222 | @@ -25,7 +25,7 @@ | |
223 | #include <string> | |
224 | #include <iostream> | |
225 | #include <sys/ioctl.h> | |
226 | -#include <linux/videodev.h> | |
227 | +#include <linux/videodev2.h> | |
228 | ||
229 | #include "V4L2_Connector.h" | |
230 | #include "V4L2_DeviceDescriptor.h" | |
231 | --- avcap-0.1.9/avcap/linux/V4L2_VidCapManager.cpp.orig 2009-11-30 14:07:14.000000000 +0100 | |
232 | +++ avcap-0.1.9/avcap/linux/V4L2_VidCapManager.cpp 2013-08-29 20:34:46.371572175 +0200 | |
233 | @@ -31,7 +31,7 @@ | |
234 | #include <sys/select.h> | |
235 | #include <sys/time.h> | |
236 | #include <linux/types.h> | |
237 | -#include <linux/videodev.h> | |
238 | +#include <linux/videodev2.h> | |
239 | ||
240 | #include "V4L2_VidCapManager.h" | |
241 | #include "V4L2_DeviceDescriptor.h" | |
242 | --- avcap-0.1.9/avcap/DeviceCollector.cpp.orig 2013-08-29 20:35:51.968236087 +0200 | |
243 | +++ avcap-0.1.9/avcap/DeviceCollector.cpp 2013-08-29 20:41:15.358222517 +0200 | |
244 | @@ -36,9 +36,13 @@ | |
245 | #include "log.h" | |
246 | ||
247 | #ifdef AVCAP_LINUX | |
248 | +# ifdef HAVE_LINUX_VIDEODEV_H | |
249 | # include "V4L1_Device.h" | |
250 | +# endif | |
251 | # include "V4L2_Device.h" | |
252 | +# ifdef HAVE_LINUX_VIDEODEV_H | |
253 | # include "V4L1_DeviceDescriptor.h" | |
254 | +# endif | |
255 | # include "V4L2_DeviceDescriptor.h" | |
256 | # ifdef HAS_AVC_SUPPORT | |
257 | # include "AVC_DeviceDescriptor.h" | |
258 | @@ -70,7 +74,9 @@ | |
259 | #ifdef AVCAP_LINUX | |
260 | // prefer V4L2-driver over V4L1-driver, if both are available | |
261 | query_V4L2_Devices(); | |
262 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
263 | query_V4L1_Devices(); | |
264 | +#endif | |
265 | query_ieee1394_Devices(); | |
266 | #endif | |
267 | ||
268 | @@ -117,6 +123,7 @@ | |
269 | } | |
270 | } | |
271 | ||
272 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
273 | void DeviceCollector::query_V4L1_Devices() | |
274 | { | |
275 | // test all /dev/video* nodes, whether they are a valid V4L1 device. | |
276 | @@ -126,6 +133,7 @@ | |
277 | test_V4L1_Device(ostr.str()); | |
278 | } | |
279 | } | |
280 | +#endif | |
281 | ||
282 | int DeviceCollector::test_V4L2_Device(const std::string& name) | |
283 | { | |
284 | @@ -173,6 +181,7 @@ | |
285 | return -1; | |
286 | } | |
287 | ||
288 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
289 | int DeviceCollector::test_V4L1_Device(const std::string& name) | |
290 | { | |
291 | // first check, if there already exists a descriptor for this dev-file | |
292 | @@ -217,6 +226,7 @@ | |
293 | ||
294 | return -1; | |
295 | } | |
296 | +#endif | |
297 | ||
298 | void DeviceCollector::query_ieee1394_Devices() | |
299 | { | |
300 | @@ -272,9 +282,11 @@ | |
301 | if(test_V4L2_Device(name) == 0) | |
302 | return true; | |
303 | ||
304 | +#ifdef HAVE_LINUX_VIDEODEV_H | |
305 | if(test_V4L1_Device(name) == 0) | |
306 | return true; | |
307 | #endif | |
308 | +#endif | |
309 | ||
310 | return false; | |
311 | } |