diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-12-10 02:42:18 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-12-10 02:42:18 +0000 |
commit | 9539d5682495af533b7c98c1739fd4d835f0af8b (patch) | |
tree | fcc643533aae7f0ea4d44d2b4182a0b105d325ba /audio/webrtc-audio-processing | |
parent | 1466d9d7c67f343a0b5b9a45f144b32f0d46f018 (diff) | |
download | ports-9539d5682495af533b7c98c1739fd4d835f0af8b.tar.gz ports-9539d5682495af533b7c98c1739fd4d835f0af8b.zip |
audio/webrtc-audio-processing: update to 1.0
Changes: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/compare/v0.3.1...v1.0
Reported by: Repology
Notes
Notes:
svn path=/head/; revision=557409
Diffstat (limited to 'audio/webrtc-audio-processing')
9 files changed, 46 insertions, 303 deletions
diff --git a/audio/webrtc-audio-processing/Makefile b/audio/webrtc-audio-processing/Makefile index bcb652681cbf..bbde55f43dde 100644 --- a/audio/webrtc-audio-processing/Makefile +++ b/audio/webrtc-audio-processing/Makefile @@ -1,19 +1,27 @@ # $FreeBSD$ PORTNAME= webrtc-audio-processing -PORTVERSION= 0.3.1 -PORTREVISION= 2 +DISTVERSION= 1.0 CATEGORIES= audio MASTER_SITES= https://freedesktop.org/software/pulseaudio/${PORTNAME}/ +PATCH_SITES= https://gitlab.freedesktop.org/pulseaudio/${PORTNAME}/-/commit/ +PATCHFILES+= 2083c9a5dd34.diff:-p1 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/6 + MAINTAINER= jbeich@FreeBSD.org COMMENT= AudioProcessing module from WebRTC project LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING -USES= autoreconf compiler:c++11-lib libtool pkgconfig tar:xz +LIB_DEPENDS= libabsl_strings.so:devel/abseil + +USES= compiler:c++14-lang localbase:ldflags meson USE_LDCONFIG= yes -GNU_CONFIGURE= yes +CFLAGS_i386= -msse # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 + +post-patch: +# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/4 + @${REINPLACE_CMD} '/absl/s/registry/reflection/' ${WRKSRC}/meson.build .include <bsd.port.mk> diff --git a/audio/webrtc-audio-processing/distinfo b/audio/webrtc-audio-processing/distinfo index f0b4010ef1ef..0d1441cafdb6 100644 --- a/audio/webrtc-audio-processing/distinfo +++ b/audio/webrtc-audio-processing/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1532354746 -SHA256 (webrtc-audio-processing-0.3.1.tar.xz) = a0fdd938fd85272d67e81572c5a4d9e200a0c104753cb3c209ded175ce3c5dbf -SIZE (webrtc-audio-processing-0.3.1.tar.xz) = 695920 +TIMESTAMP = 1606505453 +SHA256 (webrtc-audio-processing-1.0.tar.gz) = 441a30d2717b2eb4145c6eb96c2d5a270fe0b4bc71aebf76716750c47be1936f +SIZE (webrtc-audio-processing-1.0.tar.gz) = 856721 +SHA256 (2083c9a5dd34.diff) = e61660be88366621317924a3bbd6a852e07ee0912e96cbcbe332bf76a57761b9 +SIZE (2083c9a5dd34.diff) = 2243 diff --git a/audio/webrtc-audio-processing/files/patch-big-endian b/audio/webrtc-audio-processing/files/patch-big-endian deleted file mode 100644 index 57daadce1870..000000000000 --- a/audio/webrtc-audio-processing/files/patch-big-endian +++ /dev/null @@ -1,113 +0,0 @@ -https://bugs.freedesktop.org/show_bug.cgi?id=95738 - ---- webrtc/common_audio/wav_file.cc.orig 2018-07-23 14:02:57 UTC -+++ webrtc/common_audio/wav_file.cc -@@ -64,9 +64,6 @@ WavReader::~WavReader() { - } - - size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) { --#ifndef WEBRTC_ARCH_LITTLE_ENDIAN --#error "Need to convert samples to big-endian when reading from WAV file" --#endif - // There could be metadata after the audio; ensure we don't read it. - num_samples = std::min(rtc::checked_cast<uint32_t>(num_samples), - num_samples_remaining_); -@@ -76,6 +73,12 @@ size_t WavReader::ReadSamples(size_t num_samples, int1 - RTC_CHECK(read == num_samples || feof(file_handle_)); - RTC_CHECK_LE(read, num_samples_remaining_); - num_samples_remaining_ -= rtc::checked_cast<uint32_t>(read); -+#ifndef WEBRTC_ARCH_LITTLE_ENDIAN -+ //convert to big-endian -+ for(size_t idx = 0; idx < num_samples; idx++) { -+ samples[idx] = (samples[idx]<<8) | (samples[idx]>>8); -+ } -+#endif - return read; - } - -@@ -120,10 +123,17 @@ WavWriter::~WavWriter() { - - void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { - #ifndef WEBRTC_ARCH_LITTLE_ENDIAN --#error "Need to convert samples to little-endian when writing to WAV file" --#endif -+ int16_t * le_samples = new int16_t[num_samples]; -+ for(size_t idx = 0; idx < num_samples; idx++) { -+ le_samples[idx] = (samples[idx]<<8) | (samples[idx]>>8); -+ } - const size_t written = -+ fwrite(le_samples, sizeof(*le_samples), num_samples, file_handle_); -+ delete []le_samples; -+#else -+ const size_t written = - fwrite(samples, sizeof(*samples), num_samples, file_handle_); -+#endif - RTC_CHECK_EQ(num_samples, written); - num_samples_ += static_cast<uint32_t>(written); - RTC_CHECK(written <= std::numeric_limits<uint32_t>::max() || ---- webrtc/common_audio/wav_header.cc.orig 2018-07-23 14:02:57 UTC -+++ webrtc/common_audio/wav_header.cc -@@ -129,7 +129,39 @@ static inline std::string ReadFourCC(uint32_t x) { - return std::string(reinterpret_cast<char*>(&x), 4); - } - #else --#error "Write be-to-le conversion functions" -+static inline void WriteLE16(uint16_t* f, uint16_t x) { -+ *f = ((x << 8) & 0xff00) | ( ( x >> 8) & 0x00ff); -+} -+ -+static inline void WriteLE32(uint32_t* f, uint32_t x) { -+ *f = ( (x & 0x000000ff) << 24 ) -+ | ((x & 0x0000ff00) << 8) -+ | ((x & 0x00ff0000) >> 8) -+ | ((x & 0xff000000) >> 24 ); -+} -+ -+static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) { -+ *f = (static_cast<uint32_t>(a) << 24 ) -+ | (static_cast<uint32_t>(b) << 16) -+ | (static_cast<uint32_t>(c) << 8) -+ | (static_cast<uint32_t>(d) ); -+} -+ -+static inline uint16_t ReadLE16(uint16_t x) { -+ return (( x & 0x00ff) << 8 )| ((x & 0xff00)>>8); -+} -+ -+static inline uint32_t ReadLE32(uint32_t x) { -+ return ( (x & 0x000000ff) << 24 ) -+ | ( (x & 0x0000ff00) << 8 ) -+ | ( (x & 0x00ff0000) >> 8) -+ | ( (x & 0xff000000) >> 24 ); -+} -+ -+static inline std::string ReadFourCC(uint32_t x) { -+ x = ReadLE32(x); -+ return std::string(reinterpret_cast<char*>(&x), 4); -+} - #endif - - static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) { ---- webrtc/typedefs.h.orig 2018-07-23 14:02:57 UTC -+++ webrtc/typedefs.h -@@ -48,7 +48,19 @@ - #define WEBRTC_ARCH_32_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN - #else --#error Please add support for your architecture in typedefs.h -+/* instead of failing, use typical unix defines... */ -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define WEBRTC_ARCH_BIG_ENDIAN -+#else -+#error __BYTE_ORDER__ is not defined -+#endif -+#if defined(__LP64__) -+#define WEBRTC_ARCH_64_BITS -+#else -+#define WEBRTC_ARCH_32_BITS -+#endif - #endif - - #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) diff --git a/audio/webrtc-audio-processing/files/patch-configure.ac b/audio/webrtc-audio-processing/files/patch-configure.ac deleted file mode 100644 index b41e30d1a20a..000000000000 --- a/audio/webrtc-audio-processing/files/patch-configure.ac +++ /dev/null @@ -1,18 +0,0 @@ -- Add WEBRTC_BSD as it's closer to WEBRTC_LINUX than WEBRTC_MAC - ---- configure.ac.orig 2018-07-23 14:02:57 UTC -+++ configure.ac -@@ -63,6 +63,13 @@ AS_CASE(["${host}"], - OS_LDFLAGS="-lrt -lpthread" - HAVE_POSIX=1 - ], -+ [*-*dragonfly*|*-*bsd*], -+ [ -+ OS_CFLAGS="-DWEBRTC_BSD -DWEBRTC_THREAD_RR" -+ PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ OS_LDFLAGS="-lpthread" -+ HAVE_POSIX=1 -+ ], - [*-*darwin*], - [ - OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME" diff --git a/audio/webrtc-audio-processing/files/patch-webrtc_base_checks.cc b/audio/webrtc-audio-processing/files/patch-webrtc_base_checks.cc deleted file mode 100644 index 82ffcf49c7ec..000000000000 --- a/audio/webrtc-audio-processing/files/patch-webrtc_base_checks.cc +++ /dev/null @@ -1,70 +0,0 @@ -- Drop unnecessary dependency on libexecinfo for GCC build - https://chromium.googlesource.com/external/webrtc/+/7c4dedade158%5E!/ - ---- webrtc/base/checks.cc.orig 2018-07-23 14:02:57 UTC -+++ webrtc/base/checks.cc -@@ -11,16 +11,10 @@ - // Most of this was borrowed (with minor modifications) from V8's and Chromium's - // src/base/logging.cc. - --// Use the C++ version to provide __GLIBCXX__. - #include <cstdarg> - #include <cstdio> - #include <cstdlib> - --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) --#include <cxxabi.h> --#include <execinfo.h> --#endif -- - #if defined(WEBRTC_ANDROID) - #define LOG_TAG "rtc" - #include <android/log.h> // NOLINT -@@ -51,39 +45,6 @@ void PrintError(const char* format, ...) { - va_end(args); - } - --// TODO(ajm): This works on Mac (although the parsing fails) but I don't seem --// to get usable symbols on Linux. This is copied from V8. Chromium has a more --// advanced stace trace system; also more difficult to copy. --void DumpBacktrace() { --#if defined(__GLIBCXX__) && !defined(__UCLIBC__) -- void* trace[100]; -- int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); -- char** symbols = backtrace_symbols(trace, size); -- PrintError("\n==== C stack trace ===============================\n\n"); -- if (size == 0) { -- PrintError("(empty)\n"); -- } else if (symbols == NULL) { -- PrintError("(no symbols)\n"); -- } else { -- for (int i = 1; i < size; ++i) { -- char mangled[201]; -- if (sscanf(symbols[i], "%*[^(]%*[(]%200[^)+]", mangled) == 1) { // NOLINT -- PrintError("%2d: ", i); -- int status; -- size_t length; -- char* demangled = abi::__cxa_demangle(mangled, NULL, &length, &status); -- PrintError("%s\n", demangled != NULL ? demangled : mangled); -- free(demangled); -- } else { -- // If parsing failed, at least print the unparsed symbol. -- PrintError("%s\n", symbols[i]); -- } -- } -- } -- free(symbols); --#endif --} -- - FatalMessage::FatalMessage(const char* file, int line) { - Init(file, line); - } -@@ -99,7 +60,6 @@ NO_RETURN FatalMessage::~FatalMessage() { - fflush(stderr); - stream_ << std::endl << "#" << std::endl; - PrintError(stream_.str().c_str()); -- DumpBacktrace(); - fflush(stderr); - abort(); - } diff --git a/audio/webrtc-audio-processing/files/patch-webrtc_base_platform__thread.cc b/audio/webrtc-audio-processing/files/patch-webrtc_base_platform__thread.cc deleted file mode 100644 index 23840052102e..000000000000 --- a/audio/webrtc-audio-processing/files/patch-webrtc_base_platform__thread.cc +++ /dev/null @@ -1,42 +0,0 @@ -- Implement CurrentThreadId() using global thread ID -- Implement SetCurrentThreadName() - ---- webrtc/base/platform_thread.cc.orig 2018-07-23 14:02:57 UTC -+++ webrtc/base/platform_thread.cc -@@ -19,6 +19,12 @@ - #include <sys/syscall.h> - #endif - -+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) // WEBRTC_BSD -+#include <pthread_np.h> -+#elif defined(__NetBSD__) // WEBRTC_BSD -+#include <lwp.h> -+#endif -+ - namespace rtc { - - PlatformThreadId CurrentThreadId() { -@@ -32,6 +38,12 @@ PlatformThreadId CurrentThreadId() { - ret = syscall(__NR_gettid); - #elif defined(WEBRTC_ANDROID) - ret = gettid(); -+#elif defined(__DragonFly__) || defined(__FreeBSD__) // WEBRTC_BSD -+ ret = pthread_getthreadid_np(); -+#elif defined(__NetBSD__) // WEBRTC_BSD -+ ret = _lwp_self(); -+#elif defined(__OpenBSD__) // WEBRTC_BSD -+ ret = getthrid(); - #else - // Default implementation for nacl and solaris. - ret = reinterpret_cast<pid_t>(pthread_self()); -@@ -76,6 +88,10 @@ void SetCurrentThreadName(const char* name) { - prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); - #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - pthread_setname_np(name); -+#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) // WEBRTC_BSD -+ pthread_set_name_np(pthread_self(), name); -+#elif defined(__NetBSD__) // WEBRTC_BSD -+ pthread_setname_np(pthread_self(), "%s", (void*)name); - #endif - } - diff --git a/audio/webrtc-audio-processing/files/patch-webrtc_base_stringutils.h b/audio/webrtc-audio-processing/files/patch-webrtc_base_stringutils.h deleted file mode 100644 index c01ec8a2c14b..000000000000 --- a/audio/webrtc-audio-processing/files/patch-webrtc_base_stringutils.h +++ /dev/null @@ -1,13 +0,0 @@ -- BSD macro (in sys/param.h) is an archaic of the (University of California) past - ---- webrtc/base/stringutils.h.orig 2018-07-23 14:02:57 UTC -+++ webrtc/base/stringutils.h -@@ -23,7 +23,7 @@ - #endif // WEBRTC_WIN - - #if defined(WEBRTC_POSIX) --#ifdef BSD -+#ifdef WEBRTC_BSD - #include <stdlib.h> - #else // BSD - #include <alloca.h> diff --git a/audio/webrtc-audio-processing/files/patch-webrtc_system__wrappers_source_condition__variable.cc b/audio/webrtc-audio-processing/files/patch-webrtc_system__wrappers_source_condition__variable.cc deleted file mode 100644 index b1c7dd0e2d06..000000000000 --- a/audio/webrtc-audio-processing/files/patch-webrtc_system__wrappers_source_condition__variable.cc +++ /dev/null @@ -1,22 +0,0 @@ -- Match conditional in webrtc/system_wrappers/Makefile.am - ---- webrtc/system_wrappers/source/condition_variable.cc.orig 2018-07-23 14:02:57 UTC -+++ webrtc/system_wrappers/source/condition_variable.cc -@@ -14,7 +14,7 @@ - #include <windows.h> - #include "webrtc/system_wrappers/source/condition_variable_event_win.h" - #include "webrtc/system_wrappers/source/condition_variable_native_win.h" --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_POSIX) - #include <pthread.h> - #include "webrtc/system_wrappers/source/condition_variable_posix.h" - #endif -@@ -31,7 +31,7 @@ ConditionVariableWrapper* ConditionVariableWrapper::Cr - ret_val = new ConditionVariableEventWin(); - } - return ret_val; --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+#elif defined(WEBRTC_POSIX) - return ConditionVariablePosix::Create(); - #else - return NULL; diff --git a/audio/webrtc-audio-processing/pkg-plist b/audio/webrtc-audio-processing/pkg-plist index 0cb8228850fb..f03f4397d672 100644 --- a/audio/webrtc-audio-processing/pkg-plist +++ b/audio/webrtc-audio-processing/pkg-plist @@ -1,18 +1,29 @@ -include/webrtc_audio_processing/webrtc/base/arraysize.h -include/webrtc_audio_processing/webrtc/base/basictypes.h -include/webrtc_audio_processing/webrtc/base/checks.h -include/webrtc_audio_processing/webrtc/base/constructormagic.h -include/webrtc_audio_processing/webrtc/base/maybe.h -include/webrtc_audio_processing/webrtc/base/platform_file.h -include/webrtc_audio_processing/webrtc/common.h -include/webrtc_audio_processing/webrtc/common_types.h -include/webrtc_audio_processing/webrtc/modules/audio_processing/beamformer/array_util.h -include/webrtc_audio_processing/webrtc/modules/audio_processing/include/audio_processing.h -include/webrtc_audio_processing/webrtc/modules/interface/module_common_types.h -include/webrtc_audio_processing/webrtc/system_wrappers/include/trace.h -include/webrtc_audio_processing/webrtc/typedefs.h -lib/libwebrtc_audio_processing.a -lib/libwebrtc_audio_processing.so -lib/libwebrtc_audio_processing.so.1 -lib/libwebrtc_audio_processing.so.1.0.0 -libdata/pkgconfig/webrtc-audio-processing.pc +include/webrtc-audio-processing-1/api/array_view.h +include/webrtc-audio-processing-1/api/audio/echo_canceller3_config.h +include/webrtc-audio-processing-1/api/audio/echo_control.h +include/webrtc-audio-processing-1/api/scoped_refptr.h +include/webrtc-audio-processing-1/modules/audio_coding/codecs/isac/bandwidth_info.h +include/webrtc-audio-processing-1/modules/audio_coding/codecs/isac/main/include/isac.h +include/webrtc-audio-processing-1/modules/audio_coding/codecs/isac/main/source/settings.h +include/webrtc-audio-processing-1/modules/audio_processing/include/audio_processing.h +include/webrtc-audio-processing-1/modules/audio_processing/include/audio_processing_statistics.h +include/webrtc-audio-processing-1/modules/audio_processing/include/config.h +include/webrtc-audio-processing-1/rtc_base/arraysize.h +include/webrtc-audio-processing-1/rtc_base/checks.h +include/webrtc-audio-processing-1/rtc_base/constructor_magic.h +include/webrtc-audio-processing-1/rtc_base/deprecation.h +include/webrtc-audio-processing-1/rtc_base/numerics/safe_compare.h +include/webrtc-audio-processing-1/rtc_base/ref_count.h +include/webrtc-audio-processing-1/rtc_base/system/file_wrapper.h +include/webrtc-audio-processing-1/rtc_base/system/inline.h +include/webrtc-audio-processing-1/rtc_base/system/rtc_export.h +include/webrtc-audio-processing-1/rtc_base/type_traits.h +include/webrtc-audio-processing-1/system_wrappers/include/cpu_features_wrapper.h +include/webrtc-audio-processing-1/system_wrappers/include/metrics.h +include/webrtc-audio-processing-1/system_wrappers/include/sleep.h +lib/libwebrtc-audio-coding-1.so +lib/libwebrtc-audio-coding-1.so.0 +lib/libwebrtc-audio-processing-1.so +lib/libwebrtc-audio-processing-1.so.0 +libdata/pkgconfig/webrtc-audio-coding-1.pc +libdata/pkgconfig/webrtc-audio-processing-1.pc |