summaryrefslogtreecommitdiff
path: root/community/avifile/videodev.patch
blob: 0729c8ab96aa5d506cf6a58831f79ce26dac0bc3 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
diff -wbBur avifile-0.7-0.7.45/acinclude.m4 avifile-0.7-0.7.45.my/acinclude.m4
--- avifile-0.7-0.7.45/acinclude.m4	2006-03-06 12:11:19.000000000 +0300
+++ avifile-0.7-0.7.45.my/acinclude.m4	2011-11-17 13:20:52.000000000 +0400
@@ -1158,7 +1158,7 @@
     AC_ARG_ENABLE(v4l, [  --enable-v4l            support v4l video interface. (autodetect)],
 		  [], enable_v4l=yes)
     if test x$enable_v4l = xyes; then
-	AC_CHECK_HEADER([linux/videodev.h], [], [ enable_v4l=no; ])
+	AC_CHECK_HEADER([libv4l1-videodev.h], [], [ enable_v4l=no; ])
     fi
 
     if test x$enable_v4l = xyes; then
diff -wbBur avifile-0.7-0.7.45/configure avifile-0.7-0.7.45.my/configure
--- avifile-0.7-0.7.45/configure	2006-03-06 12:11:32.000000000 +0300
+++ avifile-0.7-0.7.45.my/configure	2011-11-17 13:20:47.000000000 +0400
@@ -27667,8 +27667,8 @@
 fi;
     if test x$enable_v4l = xyes; then
 	if test "${ac_cv_header_linux_videodev_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for linux/videodev.h" >&5
-echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6
+  echo "$as_me:$LINENO: checking for libv4l1-videodev.h" >&5
+echo $ECHO_N "checking for libv4l1-videodev.h... $ECHO_C" >&6
 if test "${ac_cv_header_linux_videodev_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
@@ -27676,8 +27676,8 @@
 echo "${ECHO_T}$ac_cv_header_linux_videodev_h" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/videodev.h usability" >&5
-echo $ECHO_N "checking linux/videodev.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking libv4l1-videodev.h usability" >&5
+echo $ECHO_N "checking libv4l1-videodev.h usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27685,7 +27685,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -27720,15 +27720,15 @@
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking linux/videodev.h presence" >&5
-echo $ECHO_N "checking linux/videodev.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking libv4l1-videodev.h presence" >&5
+echo $ECHO_N "checking libv4l1-videodev.h presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -27762,25 +27762,25 @@
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/videodev.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/videodev.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/videodev.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/videodev.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/videodev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/videodev.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/videodev.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libv4l1-videodev.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libv4l1-videodev.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
 ## ------------------------------------------ ##
@@ -27791,8 +27791,8 @@
       sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for linux/videodev.h" >&5
-echo $ECHO_N "checking for linux/videodev.h... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for libv4l1-videodev.h" >&5
+echo $ECHO_N "checking for libv4l1-videodev.h... $ECHO_C" >&6
 if test "${ac_cv_header_linux_videodev_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
diff -wbBur avifile-0.7-0.7.45/ffmpeg/libavformat/grab.c avifile-0.7-0.7.45.my/ffmpeg/libavformat/grab.c
--- avifile-0.7-0.7.45/ffmpeg/libavformat/grab.c	2006-02-04 11:57:34.000000000 +0300
+++ avifile-0.7-0.7.45.my/ffmpeg/libavformat/grab.c	2011-11-17 13:21:12.000000000 +0400
@@ -23,7 +23,7 @@
 #include <sys/mman.h>
 #include <sys/time.h>
 #define _LINUX_TIME_H 1
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
 #include <time.h>
 
 typedef struct {
diff -wbBur avifile-0.7-0.7.45/ffmpeg/libavformat/v4l2.c avifile-0.7-0.7.45.my/ffmpeg/libavformat/v4l2.c
--- avifile-0.7-0.7.45/ffmpeg/libavformat/v4l2.c	2006-03-02 00:36:52.000000000 +0300
+++ avifile-0.7-0.7.45.my/ffmpeg/libavformat/v4l2.c	2011-11-17 13:29:40.000000000 +0400
@@ -31,7 +31,8 @@
 #include <sys/mman.h>
 #include <sys/time.h>
 #define _LINUX_TIME_H 1
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
+#include <linux/videodev2.h>
 #include <time.h>
 
 static const int desired_video_buffers = 256;
diff -wbBur avifile-0.7-0.7.45/m4/v4l.m4 avifile-0.7-0.7.45.my/m4/v4l.m4
--- avifile-0.7-0.7.45/m4/v4l.m4	2004-02-18 23:53:58.000000000 +0300
+++ avifile-0.7-0.7.45.my/m4/v4l.m4	2011-11-17 13:20:56.000000000 +0400
@@ -10,7 +10,7 @@
     AC_ARG_ENABLE(v4l, [  --enable-v4l            support v4l video interface. (autodetect)],
 		  [], enable_v4l=yes)
     if test x$enable_v4l = xyes; then
-	AC_CHECK_HEADER([linux/videodev.h], [], [ enable_v4l=no; ])
+	AC_CHECK_HEADER([libv4l1-videodev.h], [], [ enable_v4l=no; ])
     fi
 
     if test x$enable_v4l = xyes; then
diff -wbBur avifile-0.7-0.7.45/samples/qtvidcap/kv4lsetup.cpp avifile-0.7-0.7.45.my/samples/qtvidcap/kv4lsetup.cpp
--- avifile-0.7-0.7.45/samples/qtvidcap/kv4lsetup.cpp	2005-03-23 18:18:21.000000000 +0300
+++ avifile-0.7-0.7.45.my/samples/qtvidcap/kv4lsetup.cpp	2011-11-17 13:29:34.000000000 +0400
@@ -39,7 +39,7 @@
 
 /* Necessary to prevent collisions between <linux/time.h> and <sys/time.h> when V4L2 is installed. */
 #define _LINUX_TIME_H
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
 
 #ifndef X_DISPLAY_MISSING
 #include <X11/Xlib.h>
diff -wbBur avifile-0.7-0.7.45/samples/qtvidcap/v4lxif.h avifile-0.7-0.7.45.my/samples/qtvidcap/v4lxif.h
--- avifile-0.7-0.7.45/samples/qtvidcap/v4lxif.h	2003-11-14 19:42:04.000000000 +0300
+++ avifile-0.7-0.7.45.my/samples/qtvidcap/v4lxif.h	2011-11-17 13:35:57.000000000 +0400
@@ -32,7 +32,8 @@
 
 /* Necessary to prevent collisions between <linux/time.h> and <sys/time.h> when V4L2 is installed. */
 #define _LINUX_TIME_H
-#include <linux/videodev.h>
+#include <libv4l1-videodev.h>
+#define BASE_VIDIOCPRIVATE      192             /* 192-255 are private */
 
 #define V4L_DEVICE "/dev/video"
 #define V4L_VBI_DEVICE "/dev/vbi"