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