Browse code

mingw32: properly check if vfw capture is supported by the system headers

Remove check for an specific w32api version, checking instead if vfw.h
supports vfw capture. The defines in w32api 3.12 were wrong, so this must be
accounted for in the check.

Originally committed as revision 24203 to svn://svn.ffmpeg.org/ffmpeg/trunk

Ramiro Polla authored on 2010/07/12 07:17:17
Showing 1 changed files
... ...
@@ -1362,7 +1362,7 @@ oss_indev_deps_any="soundcard_h sys_soundcard_h"
1362 1362
 oss_outdev_deps_any="soundcard_h sys_soundcard_h"
1363 1363
 v4l_indev_deps="linux_videodev_h"
1364 1364
 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
1365
-vfwcap_indev_deps="capCreateCaptureWindow"
1365
+vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
1366 1366
 vfwcap_indev_extralibs="-lavicap32"
1367 1367
 x11_grab_device_indev_deps="x11grab XShmCreateImage"
1368 1368
 x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
... ...
@@ -2274,9 +2274,6 @@ case $target_os in
2274 2274
         if ! check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR)"; then
2275 2275
             check_cpp_condition _mingw.h "(__MINGW32_MAJOR_VERSION > 3) || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
2276 2276
                 die "ERROR: MinGW runtime version must be >= 3.15."
2277
-            enabled_any vfwcap_indev &&
2278
-                { check_cpp_condition w32api.h "(__W32API_MAJOR_VERSION > 3) || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION >= 13)" ||
2279
-                  die "ERROR: vfwcap_indev requires w32api version 3.13 or later."; }
2280 2277
         fi
2281 2278
         ;;
2282 2279
     cygwin*)
... ...
@@ -2721,6 +2718,9 @@ check_header linux/videodev2.h
2721 2721
 check_header sys/videoio.h
2722 2722
 
2723 2723
 check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
2724
+# check that WM_CAP_DRIVER_CONNECT is defined to the proper value
2725
+# w32api 3.12 had it defined wrong
2726
+check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
2724 2727
 
2725 2728
 # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
2726 2729
 { check_header dev/bktr/ioctl_meteor.h &&