From e981e26100d2ddc03cd8a8e430db9976c1c05c47 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 4 Sep 2024 10:02:22 +0200 Subject: [PATCH] Update libsrt wrap to target v1.5.3 --- subprojects/libsrt.wrap | 2 +- subprojects/packagefiles/libsrt/meson.build | 20 ++++++++++++++----- .../packagefiles/libsrt/srt/meson.build | 19 +++++++++--------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/subprojects/libsrt.wrap b/subprojects/libsrt.wrap index 194571c5..f997ef46 100644 --- a/subprojects/libsrt.wrap +++ b/subprojects/libsrt.wrap @@ -1,7 +1,7 @@ [wrap-git] directory = srt url = https://github.com/Haivision/srt.git -revision = v1.5.1 +revision = v1.5.3 patch_directory = libsrt [provide] diff --git a/subprojects/packagefiles/libsrt/meson.build b/subprojects/packagefiles/libsrt/meson.build index 120cbd33..615461d7 100644 --- a/subprojects/packagefiles/libsrt/meson.build +++ b/subprojects/packagefiles/libsrt/meson.build @@ -1,9 +1,9 @@ -project('SRT', 'cpp', 'c', version: '1.5.1') +project('SRT', 'cpp', 'c', version: '1.5.3') if host_machine.system() == 'cygwin' - add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DCYGWIN=1', '-DCYGWIN_USE_POSIX', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.1"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c']) + add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DCYGWIN=1', '-DCYGWIN_USE_POSIX', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.3"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c']) else - add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DLINUX=1', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_BINDTODEVICE', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.1"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c']) + add_project_arguments(['-DENABLE_LOGGING=1', '-O3', '-DNDEBUG', '-DENABLE_MONOTONIC_CLOCK=1', '-DENABLE_NEW_RCVBUFFER=1', '-DENABLE_SOCK_CLOEXEC=1', '-DHAI_ENABLE_SRT=1', '-DHAI_PATCH=1', '-DHAVE_INET_PTON=1', '-DHAVE_PTHREAD_GETNAME_NP=1', '-DHAVE_PTHREAD_SETNAME_NP=1', '-DLINUX=1', '-DNDEBUG', '-DSRT_DYNAMIC', '-DSRT_ENABLE_APP_READER', '-DSRT_ENABLE_BINDTODEVICE', '-DSRT_ENABLE_CLOSE_SYNCH', '-DSRT_ENABLE_ENCRYPTION', '-DSRT_EXPORTS', '-DSRT_VERSION="1.5.3"', '-DUSE_MBEDTLS=1', '-D_GNU_SOURCE'], language: ['cpp','c']) endif @@ -24,7 +24,8 @@ subdir('srt') srt_src = files( 'srtcore/api.cpp', - 'srtcore/buffer.cpp', + 'srtcore/buffer_snd.cpp', + 'srtcore/buffer_tools.cpp', 'srtcore/buffer_rcv.cpp', 'srtcore/cache.cpp', 'srtcore/channel.cpp', @@ -71,7 +72,8 @@ libsrt = library( 'srt', sources: [srt_src, versionfile], dependencies: [mbedtls_lib, mbedx509_lib, mbedcrypto_lib, thread_dep], - include_directories: ['srt', 'haicrypt', 'srtcore'] + include_directories: ['srt', 'haicrypt', 'srtcore'], + install: true ) srt_dep = declare_dependency( @@ -81,3 +83,11 @@ srt_dep = declare_dependency( include_directories: include_directories('.'), ) +pkg = import('pkgconfig') +pkg.generate(libraries : libsrt, + subdirs : ['.', 'srt'], + version : '1.5.3', + name : 'srt', + filebase : 'srt', + description : 'Haivision SRT library') + diff --git a/subprojects/packagefiles/libsrt/srt/meson.build b/subprojects/packagefiles/libsrt/srt/meson.build index dacabeca..5adb4c06 100644 --- a/subprojects/packagefiles/libsrt/srt/meson.build +++ b/subprojects/packagefiles/libsrt/srt/meson.build @@ -1,15 +1,14 @@ - versionfile = configure_file(format: 'cmake@', output: 'version.h', input: files('../srtcore/version.h.in'), configuration: { 'SRT_VERSION_MAJOR': 1, 'SRT_VERSION_MINOR' : 5, - 'SRT_VERSION_PATCH': 1, - 'CI_BUILD_NUMBER_STRING': '"1.5.1"', - 'SRT_VERSION': '1.5.1', -}) + 'SRT_VERSION_PATCH': 3, + 'CI_BUILD_NUMBER_STRING': '"1.5.3"', + 'SRT_VERSION': '1.5.3', +}, install_dir: 'include/srt') -header_tgts += configure_file(copy:true, input: files('../srtcore/srt.h'), output: 'srt.h') -header_tgts += configure_file(copy:true, input: files('../srtcore/logging_api.h'), output: 'logging_api.h') -header_tgts += configure_file(copy:true, input: files('../srtcore/access_control.h'), output: 'access_control.h') -header_tgts += configure_file(copy:true, input: files('../srtcore/platform_sys.h'), output: 'platform_sys.h') -header_tgts += configure_file(copy:true, input: files('../srtcore/udt.h'), output: 'udt.h') +header_tgts += configure_file(copy:true, install_dir: 'include/srt', input: files('../srtcore/srt.h'), output: 'srt.h') +header_tgts += configure_file(copy:true, install_dir: 'include/srt', input: files('../srtcore/logging_api.h'), output: 'logging_api.h') +header_tgts += configure_file(copy:true, install_dir: 'include/srt', input: files('../srtcore/access_control.h'), output: 'access_control.h') +header_tgts += configure_file(copy:true, install_dir: 'include/srt', input: files('../srtcore/platform_sys.h'), output: 'platform_sys.h') +header_tgts += configure_file(copy:true, install_dir: 'include/srt', input: files('../srtcore/udt.h'), output: 'udt.h')