Web lists-archives.com

[MPlayer-dev-eng] [PATCH 3/3] configure: Detect SChannel and enable FFmpeg https




Allow playback of https:// URLs via FFmpeg's SChannel TLS implementation.

Signed-off-by: Alexander Strasser <eclipse7@xxxxxxx>
---
 configure | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/configure b/configure
index 6326134..ed03786 100755
--- a/configure
+++ b/configure
@@ -385,6 +385,7 @@ Optional features:
   --disable-ass          disable SSA/ASS subtitle support [autodetect]
   --enable-rpath         enable runtime linker path for extra libs [disabled]
   --disable-gnutls       disable GnuTLS [autodetect]
+  --disable-schannel     disable SChannel [autodetect]
 
 Codecs:
   --enable-gif              enable GIF support [autodetect]
@@ -848,6 +849,7 @@ _inet6=auto
 _sctp=auto
 _gethostbyname2=auto
 _gnutls=auto
+_schannel=auto
 _ftp=auto
 _musepack=no
 _vstream=auto
@@ -1345,6 +1347,8 @@ for ac_option do
   --disable-rpath)      _rpath=no       ;;
   --enable-gnutls)       _gnutls=yes    ;;
   --disable-gnutls)      _gnutls=no     ;;
+  --enable-schannel)     _schannel=yes  ;;
+  --disable-schannel)    _schannel=no   ;;
 
   --enable-fribidi)     _fribidi=yes    ;;
   --disable-fribidi)    _fribidi=no     ;;
@@ -4399,6 +4403,21 @@ else
 fi
 echores "$_gnutls"
 
+echocheck "SChannel"
+if test "$_schannel" = auto ; then
+  _schannel=no
+  statement_check_broken windows.h Security.h '((int)InitializeSecurityContext)' -DSECURITY_WIN32 -lSecur32 &&
+    _schannel=yes
+fi
+if test "$_schannel" = yes && test "$_gnutls" = no; then
+  def_schannel='#define CONFIG_SCHANNEL 1'
+  libavprotocols="$libavprotocols HTTPS_PROTOCOL TLS_PROTOCOL TLS_SCHANNEL_PROTOCOL"
+  extra_ldflags="$extra_ldflags -lSecur32"
+else
+  def_schannel='#define CONFIG_SCHANNEL 0'
+fi
+echores "$_schannel"
+
 echocheck "Samba support (libsmbclient)"
 if test "$_smb" = yes; then
   extra_ldflags="$extra_ldflags -lsmbclient"
@@ -8690,6 +8709,7 @@ CONFIG_MPEGAUDIO=yes
 CONFIG_MUXERS   = yes
 CONFIG_NETWORK  = $networking
 CONFIG_RTPDEC   = $networking
+CONFIG_SCHANNEL = $_schannel
 CONFIG_VF_LAVFI = $_vf_lavfi
 CONFIG_VDA      = $_vda
 CONFIG_VDPAU    = $_vdpau
@@ -9234,6 +9254,7 @@ $def_gnutls
 #define CONFIG_POWERPC_PERF 0
 /* For now prefer speed over avoiding potential invalid reads */
 #define CONFIG_SAFE_BITSTREAM_READER 0
+$def_schannel
 #define CONFIG_SHARED 0
 #define CONFIG_SMALL 0
 #define CONFIG_SWSCALE_ALPHA 1
-- 
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng