Also fix the missing dependency of dxva2 on user32.
---
This should be the correct solution, also happens to fix linking
of dxva2 with vfwcap disabled.
configure | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index fb82fc4..aa4396e 100755
--- a/configure
+++ b/configure
@@ -2128,6 +2128,7 @@ zmbv_encoder_deps="zlib"
# hardware accelerators
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
+dxva2_extralibs='$user32_extralibs'
dxva2_lib_deps="dxva2"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration
-framework QuartzCore"
@@ -2387,7 +2388,6 @@ sndio_indev_deps="sndio"
sndio_outdev_deps="sndio"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
-vfwcap_indev_extralibs="-lavicap32"
xcbgrab_indev_deps="libxcb"
# protocols
@@ -3046,7 +3046,6 @@ msvc_common_flags(){
-mthumb) ;;
-march=*) ;;
-lz) echo zlib.lib ;;
- -lavicap32) echo vfw32.lib user32.lib ;;
-lx264) echo libx264.lib ;;
-l*) echo ${flag#-l}.lib ;;
-L*) echo -libpath:${flag#-L} ;;
@@ -4560,6 +4559,12 @@ check_lib "windows.h shellapi.h" CommandLineToArgvW
-lshell32
check_lib "windows.h wincrypt.h" CryptGenRandom -ladvapi32
check_lib "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
+if check_func_headers "windows.h winuser.h" GetShellWindow; then
+ user32_extralibs=
+elif check_func_headers "windows.h winuser.h" GetShellWindow -luser32; then
+ user32_extralibs=$($ldflags_filter -luser32)
+fi
+
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_type "windows.h dxva.h" "DXVA_PicParams_HEVC"
-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
@@ -4728,7 +4733,7 @@ check_header AVFoundation/AVFoundation.h
check_header sys/videoio.h
-check_func_headers "windows.h vfw.h" capCreateCaptureWindow
"$vfwcap_indev_extralibs"
+check_lib "windows.h vfw.h" capCreateCaptureWindow -lvfw32 $user32_extralibs
# check that WM_CAP_DRIVER_CONNECT is defined to the proper value
# w32api 3.12 had it defined wrong
check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable
vfwcap_defines
--
2.1.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel