1diff -crB pygame-1.9.1release/Setup.in pygame-1.9.1release-v4lpatch//Setup.in
2*** pygame-1.9.1release/Setup.in Thu Jul 2 06:41:56 2009
3--- pygame-1.9.1release-v4lpatch//Setup.in Thu Mar 24 17:31:22 2011
4***************
5*** 34,40 ****
6 _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
7 movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
8 scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
9! _camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG)
10 pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)
11
12 GFX = src/SDL_gfx/SDL_gfxPrimitives.c
13--- 34,40 ----
14 _numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
15 movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
16 scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
17! _camera src/_camera.c src/camera_v4l2.c $(SDL) $(DEBUG)
18 pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)
19
20 GFX = src/SDL_gfx/SDL_gfxPrimitives.c
21diff -crB pygame-1.9.1release/src/_camera.c pygame-1.9.1release-v4lpatch//src/_camera.c
22*** pygame-1.9.1release/src/_camera.c Sun Mar 15 20:30:41 2009
23--- pygame-1.9.1release-v4lpatch//src/_camera.c Thu Mar 24 16:58:18 2011
24***************
25*** 160,179 ****
26 {
27 #if defined(__unix__)
28 if (v4l2_open_device(self) == 0) {
29! if (v4l_open_device(self) == 0) {
30! v4l2_close_device(self);
31! return NULL;
32! } else {
33! self->camera_type = CAM_V4L;
34! if (v4l_init_device(self) == 0) {
35! v4l2_close_device(self);
36! return NULL;
37! }
38! if (v4l_start_capturing(self) == 0) {
39! v4l2_close_device(self);
40! return NULL;
41! }
42! }
43 } else {
44 self->camera_type = CAM_V4L2;
45 if (v4l2_init_device(self) == 0) {
46--- 160,167 ----
47 {
48 #if defined(__unix__)
49 if (v4l2_open_device(self) == 0) {
50! v4l2_close_device(self);
51! return NULL;
52 } else {
53 self->camera_type = CAM_V4L2;
54 if (v4l2_init_device(self) == 0) {
55diff -crB pygame-1.9.1release/src/camera.h pygame-1.9.1release-v4lpatch//src/camera.h
56*** pygame-1.9.1release/src/camera.h Fri Oct 10 04:37:10 2008
57--- pygame-1.9.1release-v4lpatch//src/camera.h Thu Mar 24 16:44:32 2011
58***************
59*** 39,45 ****
60
61 #include <asm/types.h> /* for videodev2.h */
62
63- #include <linux/videodev.h>
64 #include <linux/videodev2.h>
65 #endif
66
67--- 39,44 ----
68***************
69*** 51,57 ****
70 #define RGB_OUT 1
71 #define YUV_OUT 2
72 #define HSV_OUT 4
73- #define CAM_V4L 1
74 #define CAM_V4L2 2
75
76 struct buffer
77--- 50,55 ----
78***************
79*** 111,118 ****
80 int v4l2_close_device (PyCameraObject* self);
81 int v4l2_open_device (PyCameraObject* self);
82
83- /* internal functions specific to v4l */
84- int v4l_open_device (PyCameraObject* self);
85- int v4l_init_device(PyCameraObject* self);
86- int v4l_start_capturing(PyCameraObject* self);
87 #endif
88--- 109,112 ----