]> git.sesse.net Git - ffmpeg/commitdiff
configure: rework dxva in avconv handling
authorAnton Khirnov <anton@khirnov.net>
Mon, 28 Apr 2014 21:00:38 +0000 (23:00 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Apr 2014 21:02:56 +0000 (23:02 +0200)
Move the dxva check after the dependencies have been detected, make sure
the ole32 library exists.

Fixes build on non-Windows.

Makefile
avconv_opt.c
configure

index 2d9dcd73e75958fdeae3af7b87f9eb323aab7fa5..c34320b243867952f3bf9bd81e80352d36653b82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o))
 
 OBJS-avconv                   += avconv_opt.o avconv_filter.o
 OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
-OBJS-avconv-$(CONFIG_DXVA2)   += avconv_dxva2.o
+OBJS-avconv-$(HAVE_DXVA2_LIB) += avconv_dxva2.o
 
 TESTTOOLS   = audiogen videogen rotozoom tiny_psnr base64
 HOSTPROGS  := $(TESTTOOLS:%=tests/%) doc/print_options
index 6015183a3feaa72efc50ba2ac3d82624ae140679..ae6c48b39d76e5af07875b98b99f4fc4d660873f 100644 (file)
@@ -57,7 +57,7 @@ const HWAccel hwaccels[] = {
 #if HAVE_VDPAU_X11
     { "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
 #endif
-#if CONFIG_DXVA2
+#if HAVE_DXVA2_LIB
     { "dxva2", dxva2_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD },
 #endif
     { 0 },
index 7d6f272d17add58d956a430375d7c10693d1003f..30f90eb2600e2f031145d7a2681da058de0e3798 100755 (executable)
--- a/configure
+++ b/configure
@@ -1414,6 +1414,7 @@ SYSTEM_FUNCS="
     aligned_malloc
     closesocket
     CommandLineToArgvW
+    CoTaskMemFree
     CryptGenRandom
     dlopen
     fcntl
@@ -1502,6 +1503,7 @@ HAVE_LIST="
     $TYPES_LIST
     atomics_native
     dos_paths
+    dxva2_lib
     libc_msvcrt
     libdc1394_1
     libdc1394_2
@@ -3945,6 +3947,7 @@ check_func  usleep
 check_func_headers io.h setmode
 check_func_headers stdlib.h getenv
 
+check_func_headers windows.h CoTaskMemFree -lole32
 check_func_headers windows.h GetProcessAffinityMask
 check_func_headers windows.h GetProcessTimes
 check_func_headers windows.h GetSystemTimeAsFileTime
@@ -4146,9 +4149,6 @@ enabled vdpau && enabled xlib &&
     prepend avconv_libs $($ldflags_filter "-lvdpau") &&
     enable vdpau_x11
 
-enabled dxva2 &&
-    prepend avconv_libs $($ldflags_filter "-lole32")
-
 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
 
 # add some useful compiler flags if supported
@@ -4352,6 +4352,10 @@ check_deps $CONFIG_LIST       \
            $HAVE_LIST         \
            $ALL_COMPONENTS    \
 
+enabled_all dxva2 CoTaskMemFree &&
+    prepend avconv_libs $($ldflags_filter "-lole32") &&
+    enable dxva2_lib
+
 ! enabled_any memalign posix_memalign aligned_malloc &&
     enabled_any $need_memalign && enable memalign_hack