From: Jakub Bogusz Date: Sun, 15 Mar 2020 17:17:22 +0000 (+0100) Subject: - updated to 0.8.0 (note: new soname) X-Git-Tag: auto/th/gpac-0.8.0-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=663e8377d3adbea609365ecec1b46661738a9ca2;p=packages%2Fgpac.git - updated to 0.8.0 (note: new soname) - updaed install patch - removed obsolete ffmpeg4,openssl patches - added cxx patch (fix configure docxx checks) - enable avcap and freenect modules - fix system openjpeg (1.5.x) detection --- diff --git a/ffmpeg4.patch b/ffmpeg4.patch deleted file mode 100644 index 1e3d775..0000000 --- a/ffmpeg4.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- gpac/applications/dashcast/video_encoder.c~ 2018-04-29 18:32:41.000000000 +0200 -+++ gpac/applications/dashcast/video_encoder.c 2018-04-29 18:35:58.454087341 +0200 -@@ -141,7 +141,7 @@ - } - - //the global header gives access to the extradata (SPS/PPS) -- video_output_file->codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ video_output_file->codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; - - video_output_file->vstream_idx = 0;//video_stream->index; - ---- gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c~ 2017-04-26 13:33:17.000000000 +0200 -+++ gpac-0.7.1/modules/ffmpeg_in/ffmpeg_decode.c 2018-09-17 13:53:01.462470101 +0200 -@@ -49,7 +49,7 @@ - static uint8_t * ffmpeg_realloc_buffer(uint8_t * oldBuffer, u32 size) { - uint8_t * buffer; - /* Size of buffer must be larger, see avcodec_decode_video2 documentation */ -- u32 allocatedSz = sizeof( char ) * (FF_INPUT_BUFFER_PADDING_SIZE + size); -+ u32 allocatedSz = sizeof( char ) * (AV_INPUT_BUFFER_PADDING_SIZE + size); - if (oldBuffer) - gf_free(oldBuffer); - buffer = (uint8_t*)gf_malloc( allocatedSz ); -@@ -577,7 +577,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B - capability->cap.valueInt = 1; - return GF_OK; - case GF_CODEC_PADDING_BYTES: -- capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE; -+ capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE; - return GF_OK; - case GF_CODEC_REORDER: - capability->cap.valueInt = 1; -@@ -669,7 +669,7 @@ static GF_Err FFDEC_GetCapabilities(GF_B - break; - - case GF_CODEC_PADDING_BYTES: -- capability->cap.valueInt = FF_INPUT_BUFFER_PADDING_SIZE; -+ capability->cap.valueInt = AV_INPUT_BUFFER_PADDING_SIZE; - break; - default: - capability->cap.valueInt = 0; diff --git a/gpac-cxx.patch b/gpac-cxx.patch new file mode 100644 index 0000000..e5dab21 --- /dev/null +++ b/gpac-cxx.patch @@ -0,0 +1,47 @@ +--- gpac-0.8.0/configure.orig 2020-03-14 20:22:30.223421888 +0100 ++++ gpac-0.8.0/configure 2020-03-15 14:04:05.355022427 +0100 +@@ -698,7 +698,7 @@ + + + docxx() { +- $cc -o $TMPO $TMPC $@ 0>/dev/null 2>$TMPL ++ $cxx -o $TMPO $TMPC $@ 0>/dev/null 2>$TMPL + dolog $@ + } + +@@ -1024,7 +1024,7 @@ + #include + int main( void ) { return 0; } + EOF +-if docxx -o $TMPO $TMPC -I$local_inc/platinum $LDFLAGS -L$local_lib -lPlatinum -lPltMediaServer -lPltMediaConnect -lPltMediaRenderer -lNeptune -lZlib -lpthread ; then ++if docxx -I$local_inc/platinum $LDFLAGS -L$local_lib -lPlatinum -lPltMediaServer -lPltMediaConnect -lPltMediaRenderer -lNeptune -lZlib -lpthread ; then + has_platinum="yes" + fi + +@@ -1046,7 +1046,7 @@ + return 0; + } + EOF +-if docxx -o $TMPO $TMPC $LDFLAGS $avcap_cflags $avcap_ldflags ; then ++if docxx $LDFLAGS $avcap_cflags $avcap_ldflags ; then + has_avcap="yes" + else + if test "$darwin" = "yes" ; then +@@ -1056,7 +1056,7 @@ + avcap_cflags="-I$local_inc -I$local_inc/avcap/linux" + avcap_ldflags="-lavcap -lpthread" + fi +- if docxx -o $TMPO $TMPC $avcap_cflags $LDFLAGS -L$local_lib $avcap_ldflags ; then ++ if docxx $avcap_cflags $LDFLAGS -L$local_lib $avcap_ldflags ; then + has_avcap="yes" + avcap_ldflags="-L$local_lib $avcap_ldflags" + fi +@@ -2325,7 +2325,7 @@ + if test "$pkg_config" != "no"; then + if test "$has_xul" = "no" ; then + if $pkg_config --exists libxul 2>>$logs ; then +- if docxx -o $TMPO $TMPCXX `$pkg_config --cflags libxul` `$pkg_config --libs libxul` ; then ++ if docxx `$pkg_config --cflags libxul` `$pkg_config --libs libxul` ; then + has_xul="system" + xul_flags="`$pkg_config --cflags libxul` `$pkg_config --libs libxul`" + fi diff --git a/gpac-ffmpeg-0.8.patch b/gpac-ffmpeg-0.8.patch deleted file mode 100644 index 85b0334..0000000 --- a/gpac-ffmpeg-0.8.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- gpac/modules/ffmpeg_in/ffmpeg_decode.c.orig 2011-06-27 18:51:07.878588020 +0200 -+++ gpac/modules/ffmpeg_in/ffmpeg_decode.c 2011-06-27 20:18:43.345430660 +0200 -@@ -24,6 +24,7 @@ - - #include "ffmpeg_in.h" - #include -+#include - - static AVCodec *ffmpeg_get_codec(u32 codec_4cc) - { -@@ -111,7 +112,7 @@ - bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ); - codec_id = gf_bs_read_u32(bs); - if (ffd->st==GF_STREAM_AUDIO) { -- ffd->ctx->codec_type = CODEC_TYPE_AUDIO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO; - ffd->ctx->sample_rate = gf_bs_read_u32(bs); - ffd->ctx->channels = gf_bs_read_u16(bs); - ffd->ctx->frame_size = gf_bs_read_u16(bs); -@@ -121,7 +122,7 @@ - /*ffmpeg specific*/ - ffd->ctx->block_align = gf_bs_read_u16(bs); - } else if (ffd->st==GF_STREAM_VISUAL) { -- ffd->ctx->codec_type = CODEC_TYPE_VIDEO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO; - ffd->ctx->width = gf_bs_read_u16(bs); - ffd->ctx->height = gf_bs_read_u16(bs); - } -@@ -138,7 +139,7 @@ - bs = gf_bs_new(esd->decoderConfig->decoderSpecificInfo->data, esd->decoderConfig->decoderSpecificInfo->dataLength, GF_BITSTREAM_READ); - codec_id = gf_bs_read_u32(bs); - if (ffd->st==GF_STREAM_AUDIO) { -- ffd->ctx->codec_type = CODEC_TYPE_AUDIO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO; - ffd->ctx->sample_rate = gf_bs_read_u32(bs); - ffd->ctx->channels = gf_bs_read_u16(bs); - ffd->ctx->frame_size = gf_bs_read_u16(bs); -@@ -151,7 +152,7 @@ - ffd->ctx->frame_size = 160; - } - } else if (ffd->st==GF_STREAM_VISUAL) { -- ffd->ctx->codec_type = CODEC_TYPE_VIDEO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO; - ffd->ctx->width = gf_bs_read_u16(bs); - ffd->ctx->height = gf_bs_read_u16(bs); - } -@@ -163,7 +164,7 @@ - else { - u32 codec_id = 0; - if (ffd->st==GF_STREAM_VISUAL) { -- ffd->ctx->codec_type = CODEC_TYPE_VIDEO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_VIDEO; - switch (ffd->oti) { - case 0x20: - codec_id = CODEC_ID_MPEG4; -@@ -190,7 +191,7 @@ - break; - } - } else if (ffd->st==GF_STREAM_AUDIO) { -- ffd->ctx->codec_type = CODEC_TYPE_AUDIO; -+ ffd->ctx->codec_type = AVMEDIA_TYPE_AUDIO; - switch (ffd->oti) { - case 0x69: - case 0x6B: -@@ -412,20 +413,20 @@ - - /*WARNING: this breaks H264 (and maybe others) decoding, disabled for now*/ - #if 1 -- if (!ffd->ctx->hurry_up) { -+ if (ffd->ctx->skip_frame < AVDISCARD_NONREF) { - switch (mmlevel) { - case GF_CODEC_LEVEL_SEEK: - case GF_CODEC_LEVEL_DROP: - /*skip as much as possible*/ -- ffd->ctx->hurry_up = 5; -+ ffd->ctx->skip_frame = AVDISCARD_NONKEY; - break; - case GF_CODEC_LEVEL_VERY_LATE: - case GF_CODEC_LEVEL_LATE: - /*skip B-frames*/ -- ffd->ctx->hurry_up = 1; -+ ffd->ctx->skip_frame = AVDISCARD_NONREF; - break; - default: -- ffd->ctx->hurry_up = 0; -+ ffd->ctx->skip_frame = AVDISCARD_DEFAULT; - break; - } - } -@@ -451,7 +452,7 @@ - if (len<0) { ffd->frame_start = 0; return GF_NON_COMPLIANT_BITSTREAM; } - if (gotpic<0) { ffd->frame_start = 0; return GF_OK; } - -- ffd->ctx->hurry_up = 0; -+ ffd->ctx->skip_frame = AVDISCARD_DEFAULT; - - if (ffd->ctx->frame_size < gotpic) ffd->ctx->frame_size = gotpic; - -@@ -552,7 +553,7 @@ - } - } - } -- ffd->ctx->hurry_up = 0; -+ ffd->ctx->skip_frame = AVDISCARD_DEFAULT; - /*recompute outsize in case on-the-fly change*/ - if ((w != ffd->ctx->width) || (h != ffd->ctx->height)) { - outsize = ffd->ctx->width * ffd->ctx->height * 3; ---- gpac/modules/ffmpeg_in/ffmpeg_demux.c.orig 2008-11-28 18:21:48.000000000 +0100 -+++ gpac/modules/ffmpeg_in/ffmpeg_demux.c 2011-06-27 21:20:51.252222149 +0200 -@@ -31,6 +31,7 @@ - #if !defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) - #include - #endif -+#include - - static u32 FFDemux_Run(void *par) - { -@@ -233,10 +234,10 @@ - for(i = 0; i < ctx->nb_streams; i++) { - AVCodecContext *enc = ctx->streams[i]->codec; - switch(enc->codec_type) { -- case CODEC_TYPE_AUDIO: -+ case AVMEDIA_TYPE_AUDIO: - if (!has_audio) has_audio = 1; - break; -- case CODEC_TYPE_VIDEO: -+ case AVMEDIA_TYPE_VIDEO: - if (!has_video) has_video= 1; - break; - default: -@@ -531,10 +532,10 @@ - - switch (i) { - case 0: e = GF_OK; break; -- case AVERROR_IO: e = GF_URL_ERROR; goto err_exit; -+ case AVERROR(EIO): e = GF_URL_ERROR; goto err_exit; - case AVERROR_INVALIDDATA: e = GF_NON_COMPLIANT_BITSTREAM; goto err_exit; -- case AVERROR_NOMEM: e = GF_OUT_OF_MEM; goto err_exit; -- case AVERROR_NOFMT: e = GF_NOT_SUPPORTED; goto err_exit; -+ case AVERROR(ENOMEM): e = GF_OUT_OF_MEM; goto err_exit; -+ case AVERROR(EILSEQ): e = GF_NOT_SUPPORTED; goto err_exit; - default: e = GF_SERVICE_ERROR; goto err_exit; - } - -@@ -552,13 +553,13 @@ - for (i = 0; i < ffd->ctx->nb_streams; i++) { - AVCodecContext *enc = ffd->ctx->streams[i]->codec; - switch(enc->codec_type) { -- case CODEC_TYPE_AUDIO: -+ case AVMEDIA_TYPE_AUDIO: - if ((ffd->audio_st<0) && (ffd->service_type!=1)) { - ffd->audio_st = i; - ffd->audio_tscale = ffd->ctx->streams[i]->time_base; - } - break; -- case CODEC_TYPE_VIDEO: -+ case AVMEDIA_TYPE_VIDEO: - if ((ffd->video_st<0) && (ffd->service_type!=2)) { - ffd->video_st = i; - ffd->video_tscale = ffd->ctx->streams[i]->time_base; diff --git a/gpac-install.patch b/gpac-install.patch index 084813f..1b846b9 100644 --- a/gpac-install.patch +++ b/gpac-install.patch @@ -31,14 +31,3 @@ uninstall: ifeq ($(MOZILLA_DIR), local) ---- gpac-0.7.1/Makefile~ 2017-04-26 13:33:17.000000000 +0200 -+++ gpac-0.7.1/Makefile 2018-09-17 14:27:00.872110746 +0200 -@@ -112,7 +112,7 @@ ifneq ($(CONFIG_WIN32), yes) - ifneq ($(CONFIG_FFMPEG), no) - ifneq ($(DISABLE_CORE_TOOLS), yes) - ifneq ($(DISABLE_AV_PARSERS), yes) -- if [ -f bin/gcc/DashCast$(EXE_SUFFIX)g ] ; then \ -+ if [ -f bin/gcc/DashCast$(EXE_SUFFIX) ] ; then \ - $(INSTALL) $(INSTFLAGS) -m 755 bin/gcc/DashCast$(EXE_SUFFIX) "$(DESTDIR)$(prefix)/bin" ; \ - fi - endif diff --git a/gpac.spec b/gpac.spec index 10e5bdc..2edbc89 100644 --- a/gpac.spec +++ b/gpac.spec @@ -1,37 +1,40 @@ # TODO: -# - Platinum UPnP: http://www.plutinosoft.com/platinum -# - AVCap: http://libavcap.sourceforge.net/ -# - OpenSVCDecoder: http://opensvcdecoder.sourceforge.net/ -# - libfreenect: http://openkinect.org/wiki/Main_Page +# - Platinum UPnP: http://www.plutinosoft.com/platinum (for platinum module) +# - OpenSVCDecoder: http://opensvcdecoder.sourceforge.net/ (for opensvc_dec module) +# - libopenhevc: https://github.com/OpenHEVC/openHEVC (for openhevc_dec module, replaces ffmpeg_in module) # # Conditional build: %bcond_with amr # AMR-NB and AMR-WB (floating-point) support +%bcond_without avcap # AVCap module %bcond_without directfb # DirectFB support %bcond_without faad # AAC decoding support %bcond_without ffmpeg # ffmpeg support +%bcond_without freenect # freenect (MS Kinect driver) module %bcond_without freetype # freetype support %bcond_without jpeg # JPEG support -%bcond_with js # JavaScript support +%bcond_with js # JavaScript support in Osmo4 and modules %bcond_without mad # MP3 support %bcond_without png # PNG support %bcond_without xvid # xvid support %bcond_without wx # wxWidgets support -%bcond_with plugin # don't build xulrunner/firefox/iceweasel plugin +%bcond_with mozilla # Mozilla (xulrunner/firefox/iceweasel, NPAPI+XPCOM based) plugin # %ifarch x32 -%undefine with_plugin +%undefine with_mozilla %endif # Summary: GPAC - an implementation of the MPEG-4 Systems standard (ISO/IEC 14496-1) Summary(pl.UTF-8): GPAC - implementacja standardu MPEG-4 Systems (ISO/IEC 14496-1) Name: gpac -Version: 0.7.1 -Release: 2 +Version: 0.8.0 +Release: 1 License: LGPL v2+ Group: Applications/Multimedia -Source0: https://github.com/gpac/gpac/archive/v%{version}.tar.gz -# Source0-md5: 3b78b7b5bc022bbdeca193cc80281960 +#Source0Download: https://github.com/gpac/gpac/releases +Source0: https://github.com/gpac/gpac/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 06ecb86b4da83e2d38e108f513c2ed8a Patch0: %{name}-install.patch +Patch1: %{name}-cxx.patch Patch3: %{name}-install-is-not-clean.patch Patch4: %{name}-flags.patch @@ -39,14 +42,13 @@ Patch5: wxWidgets3.patch Patch7: %{name}-apps.patch Patch8: ffmpeg3.patch -Patch9: ffmpeg4.patch -Patch10: openssl.patch Patch11: dont-err-build-on-uknown-system.patch -URL: http://www.gpac.io +URL: http://www.gpac.io/ %{?with_directfb:BuildRequires: DirectFB-devel} BuildRequires: OpenGL-GLU-devel BuildRequires: SDL-devel BuildRequires: a52dec-libs-devel +%{?with_avcap:BuildRequires: avcap-devel} BuildRequires: alsa-lib-devel >= 0.9 %{?with_amr:BuildRequires: amrnb-devel} %{?with_amr:BuildRequires: amrwb-devel} @@ -56,6 +58,7 @@ BuildRequires: alsa-lib-devel >= 0.9 %{?with_wx:BuildRequires: gtk+2-devel >= 2:2.20.1} BuildRequires: jack-audio-connection-kit-devel %{?with_js:BuildRequires: js-devel < 2:1.8.5} +%{?with_freenect:BuildRequires: libfreenect-devel} %{?with_jpeg:BuildRequires: libjpeg-devel} %{?with_mad:BuildRequires: libmad-devel} BuildRequires: libogg-devel @@ -63,7 +66,7 @@ BuildRequires: libogg-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel BuildRequires: libxml2-devel -BuildRequires: openjpeg-devel +BuildRequires: openjpeg-devel >= 1.5 BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: pulseaudio-devel @@ -74,8 +77,9 @@ BuildRequires: unzip BuildRequires: xmlrpc-c-server-devel BuildRequires: xorg-lib-libXext-devel BuildRequires: xorg-lib-libXv-devel -%{?with_plugin:BuildRequires: xulrunner-devel >= 2:9.0.0} +%{?with_mozilla:BuildRequires: xulrunner-devel >= 2:9.0.0} %{?with_xvid:BuildRequires: xvid-devel} +BuildRequires: xz-devel BuildRequires: zlib-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -162,6 +166,7 @@ Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape. %prep %setup -q %patch0 -p1 +%patch1 -p1 %patch3 -p1 %patch4 -p1 @@ -169,11 +174,12 @@ Wtyczka GPAC dla przeglądarek WWW zgodnych z Netscape. %patch7 -p1 %patch8 -p1 -%patch9 -p1 -%patch10 -p1 %patch11 -p1 -sed -i -e 's/wx-config/wx-gtk2-unicode-config/' configure +%{__sed} -i -e 's/wx-config/wx-gtk2-unicode-config/' configure +%if %{without avcap} +%{__sed} -i -e 's,has_avcap="yes",has_avcap="no",' configure +%endif chmod a+x configure %build @@ -185,17 +191,18 @@ chmod a+x configure --mandir=%{_mandir} \ --X11-path=/usr \ --cc="%{__cc}" \ - --cpp="%{__cxx}" \ + --cxx="%{__cxx}" \ --disable-opt \ %{!?with_wx:--disable-wx} \ %{?with_amr:--enable-amr} \ --enable-pic \ - --extra-cflags="%{rpmcflags}" \ + --extra-cflags="%{rpmcflags} -I/usr/include/openjpeg-1.5" \ --extra-ldflags="%{rpmldflags}" \ - %{?with_plugin:--mozdir=%{_browserpluginsdir}} \ - %{?with_plugin:--xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr"} \ + %{?with_mozilla:--mozdir=%{_browserpluginsdir}} \ + %{?with_mozilla:--xulsdk-path="/usr/include/xulrunner -I/usr/include/nspr"} \ %{!?with_faad:--use-faad=no} \ %{!?with_ffmpeg:--use-ffmpeg=no} \ + %{!?with_freenect:--use-freenect=no} \ %{!?with_freetype:--use-ft=no} \ %{!?with_jpeg:--use-jpeg=no} \ %{!?with_js:--use-js=no} \ @@ -219,6 +226,9 @@ install -d $RPM_BUILD_ROOT%{_pkgconfigdir} DESTDIR=$RPM_BUILD_ROOT \ MOZILLA_DIR=$RPM_BUILD_ROOT%{_browserpluginsdir} +# needless +%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/{win32,wince} + %clean rm -rf $RPM_BUILD_ROOT @@ -240,7 +250,7 @@ fi %attr(755,root,root) %{_bindir}/MP4Box %attr(755,root,root) %{_bindir}/MP4Client %attr(755,root,root) %{_libdir}/libgpac.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libgpac.so.7 +%attr(755,root,root) %ghost %{_libdir}/libgpac.so.8 %dir %{_libdir}/gpac %attr(755,root,root) %{_libdir}/gpac/gm_*.so %{_datadir}/gpac @@ -265,7 +275,7 @@ fi %attr(755,root,root) %{_bindir}/Osmo4 %endif -%if %{with plugin} +%if %{with mozilla} %files -n browser-plugin-%{name} %defattr(644,root,root,755) %attr(755,root,root) %{_browserpluginsdir}/nposmozilla.so diff --git a/openssl.patch b/openssl.patch deleted file mode 100644 index 1f91a1e..0000000 --- a/openssl.patch +++ /dev/null @@ -1,84 +0,0 @@ -From e64a7d229fdcb5c190064b7860ade50124dcc735 Mon Sep 17 00:00:00 2001 -From: Aurelien David -Date: Fri, 6 Oct 2017 16:46:18 +0200 -Subject: [PATCH] compatibility with OpenSSL 1.1.x (#616) - ---- - src/utils/downloader.c | 40 +++++++++++++++++++++++++++++----------- - 1 file changed, 29 insertions(+), 11 deletions(-) - -diff --git a/src/utils/downloader.c b/src/utils/downloader.c -index b8c923b88..3b7d37b41 100644 ---- a/src/utils/downloader.c -+++ b/src/utils/downloader.c -@@ -204,7 +204,7 @@ struct __gf_download_manager - u32 limit_data_rate, read_buf_size; - u64 max_cache_size; - Bool allow_broken_certificate; -- -+ - GF_List *skip_proxy_servers; - GF_List *credentials; - GF_List *cache_entries; -@@ -392,10 +392,18 @@ static Bool init_ssl_lib() { - GF_LOG(GF_LOG_ERROR, GF_LOG_NETWORK, ("[HTTPS] Error while initializing Random Number generator, failed to init SSL !\n")); - return GF_TRUE; - } -+ -+ /* per https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html -+ ** As of version 1.1.0 OpenSSL will automatically allocate all resources that it needs so no explicit initialisation is required. -+ ** Similarly it will also automatically deinitialise as required. -+ */ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init(); - SSL_load_error_strings(); - SSLeay_add_all_algorithms(); - SSLeay_add_ssl_algorithms(); -+#endif -+ - _ssl_is_initialized = GF_TRUE; - GF_LOG(GF_LOG_DEBUG, GF_LOG_NETWORK, ("[HTTPS] Initalization of SSL library complete.\n")); - return GF_FALSE; -@@ -422,6 +430,7 @@ static int ssl_init(GF_DownloadManager *dm, u32 mode) - } - - switch (mode) { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - case 0: - meth = SSLv23_client_method(); - break; -@@ -436,6 +445,11 @@ static int ssl_init(GF_DownloadManager *dm, u32 mode) - case 3: - meth = TLSv1_client_method(); - break; -+#else /* for openssl 1.1+ this is the prefered method */ -+ case 0: -+ meth = TLS_client_method(); -+ break; -+#endif - default: - goto error; - } -@@ -1225,7 +1239,7 @@ static GF_Err gf_dm_read_data(GF_DownloadSession *sess, char *data, u32 data_siz - gf_mx_v(sess->mx); - return GF_IP_CONNECTION_CLOSED; - } -- -+ - #ifdef GPAC_HAS_SSL - if (sess->ssl) { - s32 size; -@@ -1451,7 +1465,11 @@ static void gf_dm_connect(GF_DownloadSession *sess) - const GENERAL_NAME *altname = sk_GENERAL_NAME_value(altnames, i); - if (altname->type == GEN_DNS) - { -- unsigned char *altname_str = ASN1_STRING_data(altname->d.ia5); -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ unsigned char *altname_str = ASN1_STRING_data(altname->d.ia5); -+ #else -+ unsigned char *altname_str = (unsigned char *)ASN1_STRING_get0_data(altname->d.ia5); -+ #endif - gf_list_add(valid_names, altname_str); - } - } -