avformat/tls_schannel: add check for Windows 10 only types and defines

Old Mingw-w64 releases provided by some distros seemingly don't have them, so
check for them and disable the dtls protocol if unavailable.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-07-13 16:56:20 -03:00
parent 053a113ad8
commit 307983b292
2 changed files with 35 additions and 2 deletions
Vendored
+4
View File
@@ -2498,6 +2498,7 @@ TYPES_LIST="
kCVImageBufferTransferFunction_ITU_R_2020
kCVImageBufferTransferFunction_SMPTE_ST_428_1
kVTQPModulationLevel_Default
SecPkgContext_KeyingMaterialInfo
socklen_t
struct_addrinfo
struct_group_source_req
@@ -6822,6 +6823,7 @@ check_type "windows.h d3d12video.h" "ID3D12VideoEncoder"
test_code cc "windows.h d3d12video.h" "D3D12_FEATURE_VIDEO feature = D3D12_FEATURE_VIDEO_ENCODER_CODEC" && \
test_code cc "windows.h d3d12video.h" "D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS req" && enable d3d12_encoder_feature
check_type "windows.h" "DPI_AWARENESS_CONTEXT" -D_WIN32_WINNT=0x0A00
check_type "windows.h security.h schnlsp.h" SecPkgContext_KeyingMaterialInfo -DSECURITY_WIN32
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat
@@ -7271,6 +7273,8 @@ enabled schannel &&
schannel_extralibs="-lsecur32 -lncrypt -lcrypt32" ||
disable schannel
enabled schannel && check_cc dtls_protocol "windows.h security.h schnlsp.h" "int i = SP_PROT_DTLS1_X_CLIENT;" -DSECURITY_WIN32
makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
enabled makeinfo \
&& [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \