From d714e0c7eea828a27cc3be69de7dce9dfd5f55c1 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:38:42 +0000 Subject: [PATCH] import UBI webrtc-audio-processing-1.3-5.el10 --- .gitignore | 4 +- .webrtc-audio-processing.metadata | 1 - 65f002e.patch | 313 +++++++++ ...Add-missing-windows-specific-headers.patch | 123 ---- ...d-cerbero-gnustl-support-for-Android.patch | 60 -- ...-build-Don-t-blindly-link-to-pthread.patch | 30 - ...uild-Add-required-define-for-Windows.patch | 33 - ...rly-select-the-right-system-wrappers.patch | 80 --- ...MSVC-_WIN32-so-we-can-build-on-mingw.patch | 26 - ...-missing-windows-conditions-variable.patch | 616 ------------------ ...rotect-against-unsupported-CPU-types.patch | 37 -- ...x-type-OS_FLAGS-instead-of-OS_CFLAGS.patch | 27 - ...-Sync-defines-and-libs-with-build.gn.patch | 75 --- ...efined-to-support-both-clang-and-gcc.patch | 25 - ...uild-Re-add-pthread-linking-on-linux.patch | 25 - .../0013-build-Add-ARM-64bit-support.patch | 28 - ...014-build-fix-architecture-detection.patch | 94 --- ...-reference-to-pulseaudio-mailing-lis.patch | 26 - ...ld-Fix-configure-option-with-ns-mode.patch | 30 - ...brtc-audio-processing-0.2-big-endian.patch | 90 --- .../webrtc-fix-typedefs-on-other-arches.patch | 24 - arches.patch | 86 +++ build-abseil-cpp-from-local-tarbal.patch | 17 + sources | 3 + ...ssing.spec => webrtc-audio-processing.spec | 142 ++-- 25 files changed, 509 insertions(+), 1506 deletions(-) delete mode 100644 .webrtc-audio-processing.metadata create mode 100644 65f002e.patch delete mode 100644 SOURCES/0001-Add-missing-windows-specific-headers.patch delete mode 100644 SOURCES/0002-build-Add-cerbero-gnustl-support-for-Android.patch delete mode 100644 SOURCES/0003-build-Don-t-blindly-link-to-pthread.patch delete mode 100644 SOURCES/0004-build-Add-required-define-for-Windows.patch delete mode 100644 SOURCES/0005-build-Properly-select-the-right-system-wrappers.patch delete mode 100644 SOURCES/0006-build-Define-MSVC-_WIN32-so-we-can-build-on-mingw.patch delete mode 100644 SOURCES/0007-Add-missing-windows-conditions-variable.patch delete mode 100644 SOURCES/0008-build-Protect-against-unsupported-CPU-types.patch delete mode 100644 SOURCES/0009-osx-Fix-type-OS_FLAGS-instead-of-OS_CFLAGS.patch delete mode 100644 SOURCES/0010-build-Sync-defines-and-libs-with-build.gn.patch delete mode 100644 SOURCES/0011-build-Use-no-undefined-to-support-both-clang-and-gcc.patch delete mode 100644 SOURCES/0012-build-Re-add-pthread-linking-on-linux.patch delete mode 100644 SOURCES/0013-build-Add-ARM-64bit-support.patch delete mode 100644 SOURCES/0014-build-fix-architecture-detection.patch delete mode 100644 SOURCES/0015-doc-file-invalid-reference-to-pulseaudio-mailing-lis.patch delete mode 100644 SOURCES/0016-build-Fix-configure-option-with-ns-mode.patch delete mode 100644 SOURCES/webrtc-audio-processing-0.2-big-endian.patch delete mode 100644 SOURCES/webrtc-fix-typedefs-on-other-arches.patch create mode 100644 arches.patch create mode 100644 build-abseil-cpp-from-local-tarbal.patch create mode 100644 sources rename SPECS/webrtc-audio-processing.spec => webrtc-audio-processing.spec (55%) diff --git a/.gitignore b/.gitignore index 37bac44..78e0e20 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -SOURCES/webrtc-audio-processing-0.3.tar.xz +abseil-cpp-20230125.1.tar.gz +abseil-cpp_20230125.1-4_patch.zip +webrtc-audio-processing-1.3.tar.xz diff --git a/.webrtc-audio-processing.metadata b/.webrtc-audio-processing.metadata deleted file mode 100644 index 8569362..0000000 --- a/.webrtc-audio-processing.metadata +++ /dev/null @@ -1 +0,0 @@ -65ed41129bcded398c37860ccb38a8cd7ae4dfe3 SOURCES/webrtc-audio-processing-0.3.tar.xz diff --git a/65f002e.patch b/65f002e.patch new file mode 100644 index 0000000..f9098ab --- /dev/null +++ b/65f002e.patch @@ -0,0 +1,313 @@ +--- a/webrtc/common_audio/wav_file.cc ++++ b/webrtc/common_audio/wav_file.cc +@@ -10,6 +10,7 @@ + + #include "common_audio/wav_file.h" + ++#include + #include + + #include +@@ -34,6 +35,38 @@ bool FormatSupported(WavFormat format) { + format == WavFormat::kWavFormatIeeeFloat; + } + ++template ++void TranslateEndianness(T* destination, const T* source, size_t length) { ++ static_assert(sizeof(T) == 2 || sizeof(T) == 4 || sizeof(T) == 8, ++ "no converter, use integral types"); ++ if (sizeof(T) == 2) { ++ const uint16_t* src = reinterpret_cast(source); ++ uint16_t* dst = reinterpret_cast(destination); ++ for (size_t index = 0; index < length; index++) { ++ dst[index] = bswap_16(src[index]); ++ } ++ } ++ if (sizeof(T) == 4) { ++ const uint32_t* src = reinterpret_cast(source); ++ uint32_t* dst = reinterpret_cast(destination); ++ for (size_t index = 0; index < length; index++) { ++ dst[index] = bswap_32(src[index]); ++ } ++ } ++ if (sizeof(T) == 8) { ++ const uint64_t* src = reinterpret_cast(source); ++ uint64_t* dst = reinterpret_cast(destination); ++ for (size_t index = 0; index < length; index++) { ++ dst[index] = bswap_64(src[index]); ++ } ++ } ++} ++ ++template ++void TranslateEndianness(T* buffer, size_t length) { ++ TranslateEndianness(buffer, buffer, length); ++} ++ + // Doesn't take ownership of the file handle and won't close it. + class WavHeaderFileReader : public WavHeaderReader { + public: +@@ -89,10 +122,6 @@ void WavReader::Reset() { + + size_t WavReader::ReadSamples(const size_t num_samples, + int16_t* const samples) { +-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN +-#error "Need to convert samples to big-endian when reading from WAV file" +-#endif +- + size_t num_samples_left_to_read = num_samples; + size_t next_chunk_start = 0; + while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) { +@@ -105,6 +134,9 @@ size_t WavReader::ReadSamples(const size_t num_samples, + num_bytes_read = file_.Read(samples_to_convert.data(), + chunk_size * sizeof(samples_to_convert[0])); + num_samples_read = num_bytes_read / sizeof(samples_to_convert[0]); ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(samples_to_convert.data(), num_samples_read); ++#endif + + for (size_t j = 0; j < num_samples_read; ++j) { + samples[next_chunk_start + j] = FloatToS16(samples_to_convert[j]); +@@ -114,6 +146,10 @@ size_t WavReader::ReadSamples(const size_t num_samples, + num_bytes_read = file_.Read(&samples[next_chunk_start], + chunk_size * sizeof(samples[0])); + num_samples_read = num_bytes_read / sizeof(samples[0]); ++ ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(&samples[next_chunk_start], num_samples_read); ++#endif + } + RTC_CHECK(num_samples_read == 0 || (num_bytes_read % num_samples_read) == 0) + << "Corrupt file: file ended in the middle of a sample."; +@@ -129,10 +165,6 @@ size_t WavReader::ReadSamples(const size_t num_samples, + } + + size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) { +-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN +-#error "Need to convert samples to big-endian when reading from WAV file" +-#endif +- + size_t num_samples_left_to_read = num_samples; + size_t next_chunk_start = 0; + while (num_samples_left_to_read > 0 && num_unread_samples_ > 0) { +@@ -145,6 +177,9 @@ size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) { + num_bytes_read = file_.Read(samples_to_convert.data(), + chunk_size * sizeof(samples_to_convert[0])); + num_samples_read = num_bytes_read / sizeof(samples_to_convert[0]); ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(samples_to_convert.data(), num_samples_read); ++#endif + + for (size_t j = 0; j < num_samples_read; ++j) { + samples[next_chunk_start + j] = +@@ -155,6 +190,9 @@ size_t WavReader::ReadSamples(const size_t num_samples, float* const samples) { + num_bytes_read = file_.Read(&samples[next_chunk_start], + chunk_size * sizeof(samples[0])); + num_samples_read = num_bytes_read / sizeof(samples[0]); ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(&samples[next_chunk_start], num_samples_read); ++#endif + + for (size_t j = 0; j < num_samples_read; ++j) { + samples[next_chunk_start + j] = +@@ -213,24 +251,32 @@ WavWriter::WavWriter(FileWrapper file, + } + + 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 +- + for (size_t i = 0; i < num_samples; i += kMaxChunksize) { + const size_t num_remaining_samples = num_samples - i; + const size_t num_samples_to_write = + std::min(kMaxChunksize, num_remaining_samples); + + if (format_ == WavFormat::kWavFormatPcm) { ++#ifndef WEBRTC_ARCH_BIG_ENDIAN + RTC_CHECK( + file_.Write(&samples[i], num_samples_to_write * sizeof(samples[0]))); ++#else ++ std::array converted_samples; ++ TranslateEndianness(converted_samples.data(), &samples[i], ++ num_samples_to_write); ++ RTC_CHECK( ++ file_.Write(converted_samples.data(), ++ num_samples_to_write * sizeof(converted_samples[0]))); ++#endif + } else { + RTC_CHECK_EQ(format_, WavFormat::kWavFormatIeeeFloat); + std::array converted_samples; + for (size_t j = 0; j < num_samples_to_write; ++j) { + converted_samples[j] = S16ToFloat(samples[i + j]); + } ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(converted_samples.data(), num_samples_to_write); ++#endif + RTC_CHECK( + file_.Write(converted_samples.data(), + num_samples_to_write * sizeof(converted_samples[0]))); +@@ -243,10 +289,6 @@ void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { + } + + void WavWriter::WriteSamples(const float* samples, size_t num_samples) { +-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN +-#error "Need to convert samples to little-endian when writing to WAV file" +-#endif +- + for (size_t i = 0; i < num_samples; i += kMaxChunksize) { + const size_t num_remaining_samples = num_samples - i; + const size_t num_samples_to_write = +@@ -257,6 +299,9 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) { + for (size_t j = 0; j < num_samples_to_write; ++j) { + converted_samples[j] = FloatS16ToS16(samples[i + j]); + } ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(converted_samples.data(), num_samples_to_write); ++#endif + RTC_CHECK( + file_.Write(converted_samples.data(), + num_samples_to_write * sizeof(converted_samples[0]))); +@@ -266,6 +311,9 @@ void WavWriter::WriteSamples(const float* samples, size_t num_samples) { + for (size_t j = 0; j < num_samples_to_write; ++j) { + converted_samples[j] = FloatS16ToFloat(samples[i + j]); + } ++#ifdef WEBRTC_ARCH_BIG_ENDIAN ++ TranslateEndianness(converted_samples.data(), num_samples_to_write); ++#endif + RTC_CHECK( + file_.Write(converted_samples.data(), + num_samples_to_write * sizeof(converted_samples[0]))); +--- a/webrtc/common_audio/wav_header.cc ++++ b/webrtc/common_audio/wav_header.cc +@@ -14,6 +14,8 @@ + + #include "common_audio/wav_header.h" + ++#include ++ + #include + #include + #include +@@ -26,10 +28,6 @@ + namespace webrtc { + namespace { + +-#ifndef WEBRTC_ARCH_LITTLE_ENDIAN +-#error "Code not working properly for big endian platforms." +-#endif +- + #pragma pack(2) + struct ChunkHeader { + uint32_t ID; +@@ -174,6 +172,8 @@ bool FindWaveChunk(ChunkHeader* chunk_header, + if (readable->Read(chunk_header, sizeof(*chunk_header)) != + sizeof(*chunk_header)) + return false; // EOF. ++ chunk_header->Size = le32toh(chunk_header->Size); ++ + if (ReadFourCC(chunk_header->ID) == sought_chunk_id) + return true; // Sought chunk found. + // Ignore current chunk by skipping its payload. +@@ -187,6 +187,13 @@ bool ReadFmtChunkData(FmtPcmSubchunk* fmt_subchunk, WavHeaderReader* readable) { + if (readable->Read(&(fmt_subchunk->AudioFormat), kFmtPcmSubchunkSize) != + kFmtPcmSubchunkSize) + return false; ++ fmt_subchunk->AudioFormat = le16toh(fmt_subchunk->AudioFormat); ++ fmt_subchunk->NumChannels = le16toh(fmt_subchunk->NumChannels); ++ fmt_subchunk->SampleRate = le32toh(fmt_subchunk->SampleRate); ++ fmt_subchunk->ByteRate = le32toh(fmt_subchunk->ByteRate); ++ fmt_subchunk->BlockAlign = le16toh(fmt_subchunk->BlockAlign); ++ fmt_subchunk->BitsPerSample = le16toh(fmt_subchunk->BitsPerSample); ++ + const uint32_t fmt_size = fmt_subchunk->header.Size; + if (fmt_size != kFmtPcmSubchunkSize) { + // There is an optional two-byte extension field permitted to be present +@@ -214,19 +221,22 @@ void WritePcmWavHeader(size_t num_channels, + auto header = rtc::MsanUninitialized({}); + const size_t bytes_in_payload = bytes_per_sample * num_samples; + +- header.riff.header.ID = PackFourCC('R', 'I', 'F', 'F'); +- header.riff.header.Size = RiffChunkSize(bytes_in_payload, *header_size); +- header.riff.Format = PackFourCC('W', 'A', 'V', 'E'); +- header.fmt.header.ID = PackFourCC('f', 'm', 't', ' '); +- header.fmt.header.Size = kFmtPcmSubchunkSize; +- header.fmt.AudioFormat = MapWavFormatToHeaderField(WavFormat::kWavFormatPcm); +- header.fmt.NumChannels = static_cast(num_channels); +- header.fmt.SampleRate = sample_rate; +- header.fmt.ByteRate = ByteRate(num_channels, sample_rate, bytes_per_sample); +- header.fmt.BlockAlign = BlockAlign(num_channels, bytes_per_sample); +- header.fmt.BitsPerSample = static_cast(8 * bytes_per_sample); +- header.data.header.ID = PackFourCC('d', 'a', 't', 'a'); +- header.data.header.Size = static_cast(bytes_in_payload); ++ header.riff.header.ID = htole32(PackFourCC('R', 'I', 'F', 'F')); ++ header.riff.header.Size = ++ htole32(RiffChunkSize(bytes_in_payload, *header_size)); ++ header.riff.Format = htole32(PackFourCC('W', 'A', 'V', 'E')); ++ header.fmt.header.ID = htole32(PackFourCC('f', 'm', 't', ' ')); ++ header.fmt.header.Size = htole32(kFmtPcmSubchunkSize); ++ header.fmt.AudioFormat = ++ htole16(MapWavFormatToHeaderField(WavFormat::kWavFormatPcm)); ++ header.fmt.NumChannels = htole16(num_channels); ++ header.fmt.SampleRate = htole32(sample_rate); ++ header.fmt.ByteRate = ++ htole32(ByteRate(num_channels, sample_rate, bytes_per_sample)); ++ header.fmt.BlockAlign = htole16(BlockAlign(num_channels, bytes_per_sample)); ++ header.fmt.BitsPerSample = htole16(8 * bytes_per_sample); ++ header.data.header.ID = htole32(PackFourCC('d', 'a', 't', 'a')); ++ header.data.header.Size = htole32(bytes_in_payload); + + // Do an extra copy rather than writing everything to buf directly, since buf + // might not be correctly aligned. +@@ -245,24 +255,26 @@ void WriteIeeeFloatWavHeader(size_t num_channels, + auto header = rtc::MsanUninitialized({}); + const size_t bytes_in_payload = bytes_per_sample * num_samples; + +- header.riff.header.ID = PackFourCC('R', 'I', 'F', 'F'); +- header.riff.header.Size = RiffChunkSize(bytes_in_payload, *header_size); +- header.riff.Format = PackFourCC('W', 'A', 'V', 'E'); +- header.fmt.header.ID = PackFourCC('f', 'm', 't', ' '); +- header.fmt.header.Size = kFmtIeeeFloatSubchunkSize; ++ header.riff.header.ID = htole32(PackFourCC('R', 'I', 'F', 'F')); ++ header.riff.header.Size = ++ htole32(RiffChunkSize(bytes_in_payload, *header_size)); ++ header.riff.Format = htole32(PackFourCC('W', 'A', 'V', 'E')); ++ header.fmt.header.ID = htole32(PackFourCC('f', 'm', 't', ' ')); ++ header.fmt.header.Size = htole32(kFmtIeeeFloatSubchunkSize); + header.fmt.AudioFormat = +- MapWavFormatToHeaderField(WavFormat::kWavFormatIeeeFloat); +- header.fmt.NumChannels = static_cast(num_channels); +- header.fmt.SampleRate = sample_rate; +- header.fmt.ByteRate = ByteRate(num_channels, sample_rate, bytes_per_sample); +- header.fmt.BlockAlign = BlockAlign(num_channels, bytes_per_sample); +- header.fmt.BitsPerSample = static_cast(8 * bytes_per_sample); +- header.fmt.ExtensionSize = 0; +- header.fact.header.ID = PackFourCC('f', 'a', 'c', 't'); +- header.fact.header.Size = 4; +- header.fact.SampleLength = static_cast(num_channels * num_samples); +- header.data.header.ID = PackFourCC('d', 'a', 't', 'a'); +- header.data.header.Size = static_cast(bytes_in_payload); ++ htole16(MapWavFormatToHeaderField(WavFormat::kWavFormatIeeeFloat)); ++ header.fmt.NumChannels = htole16(num_channels); ++ header.fmt.SampleRate = htole32(sample_rate); ++ header.fmt.ByteRate = ++ htole32(ByteRate(num_channels, sample_rate, bytes_per_sample)); ++ header.fmt.BlockAlign = htole16(BlockAlign(num_channels, bytes_per_sample)); ++ header.fmt.BitsPerSample = htole16(8 * bytes_per_sample); ++ header.fmt.ExtensionSize = htole16(0); ++ header.fact.header.ID = htole32(PackFourCC('f', 'a', 'c', 't')); ++ header.fact.header.Size = htole32(4); ++ header.fact.SampleLength = htole32(num_channels * num_samples); ++ header.data.header.ID = htole32(PackFourCC('d', 'a', 't', 'a')); ++ header.data.header.Size = htole32(bytes_in_payload); + + // Do an extra copy rather than writing everything to buf directly, since buf + // might not be correctly aligned. +@@ -391,6 +403,7 @@ bool ReadWavHeader(WavHeaderReader* readable, + return false; + if (ReadFourCC(header.riff.Format) != "WAVE") + return false; ++ header.riff.header.Size = le32toh(header.riff.header.Size); + + // Find "fmt " and "data" chunks. While the official Wave file specification + // does not put requirements on the chunks order, it is uncommon to find the diff --git a/SOURCES/0001-Add-missing-windows-specific-headers.patch b/SOURCES/0001-Add-missing-windows-specific-headers.patch deleted file mode 100644 index 7d8a812..0000000 --- a/SOURCES/0001-Add-missing-windows-specific-headers.patch +++ /dev/null @@ -1,123 +0,0 @@ -From bf25c45e540d7e961704c245e7be439b580c93c2 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Thu, 30 Jun 2016 15:08:17 -0400 -Subject: [PATCH 01/16] Add missing windows specific headers - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - webrtc/base/win32.h | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 103 insertions(+) - create mode 100644 webrtc/base/win32.h - -diff --git a/webrtc/base/win32.h b/webrtc/base/win32.h -new file mode 100644 -index 0000000..6969c10 ---- /dev/null -+++ b/webrtc/base/win32.h -@@ -0,0 +1,103 @@ -+/* -+ * Copyright 2004 The WebRTC Project Authors. All rights reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+#ifndef WEBRTC_BASE_WIN32_H_ -+#define WEBRTC_BASE_WIN32_H_ -+#if defined(WEBRTC_WIN) -+#ifndef WIN32_LEAN_AND_MEAN -+#define WIN32_LEAN_AND_MEAN -+#endif -+// Make sure we don't get min/max macros -+#ifndef NOMINMAX -+#define NOMINMAX -+#endif -+#include -+#include -+#ifndef SECURITY_MANDATORY_LABEL_AUTHORITY -+// Add defines that we use if we are compiling against older sdks -+#define SECURITY_MANDATORY_MEDIUM_RID (0x00002000L) -+#define TokenIntegrityLevel static_cast(0x19) -+typedef struct _TOKEN_MANDATORY_LABEL { -+ SID_AND_ATTRIBUTES Label; -+} TOKEN_MANDATORY_LABEL, *PTOKEN_MANDATORY_LABEL; -+#endif // SECURITY_MANDATORY_LABEL_AUTHORITY -+#undef SetPort -+#include -+#include "webrtc/base/stringutils.h" -+#include "webrtc/base/basictypes.h" -+namespace rtc { -+const char* win32_inet_ntop(int af, const void *src, char* dst, socklen_t size); -+int win32_inet_pton(int af, const char* src, void *dst); -+inline std::wstring ToUtf16(const char* utf8, size_t len) { -+ int len16 = ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), -+ NULL, 0); -+ wchar_t* ws = STACK_ARRAY(wchar_t, len16); -+ ::MultiByteToWideChar(CP_UTF8, 0, utf8, static_cast(len), ws, len16); -+ return std::wstring(ws, len16); -+} -+inline std::wstring ToUtf16(const std::string& str) { -+ return ToUtf16(str.data(), str.length()); -+} -+inline std::string ToUtf8(const wchar_t* wide, size_t len) { -+ int len8 = ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), -+ NULL, 0, NULL, NULL); -+ char* ns = STACK_ARRAY(char, len8); -+ ::WideCharToMultiByte(CP_UTF8, 0, wide, static_cast(len), ns, len8, -+ NULL, NULL); -+ return std::string(ns, len8); -+} -+inline std::string ToUtf8(const wchar_t* wide) { -+ return ToUtf8(wide, wcslen(wide)); -+} -+inline std::string ToUtf8(const std::wstring& wstr) { -+ return ToUtf8(wstr.data(), wstr.length()); -+} -+// Convert FILETIME to time_t -+void FileTimeToUnixTime(const FILETIME& ft, time_t* ut); -+// Convert time_t to FILETIME -+void UnixTimeToFileTime(const time_t& ut, FILETIME * ft); -+// Convert a Utf8 path representation to a non-length-limited Unicode pathname. -+bool Utf8ToWindowsFilename(const std::string& utf8, std::wstring* filename); -+// Convert a FILETIME to a UInt64 -+inline uint64_t ToUInt64(const FILETIME& ft) { -+ ULARGE_INTEGER r = {{ft.dwLowDateTime, ft.dwHighDateTime}}; -+ return r.QuadPart; -+} -+enum WindowsMajorVersions { -+ kWindows2000 = 5, -+ kWindowsVista = 6, -+}; -+bool GetOsVersion(int* major, int* minor, int* build); -+inline bool IsWindowsVistaOrLater() { -+ int major; -+ return (GetOsVersion(&major, NULL, NULL) && major >= kWindowsVista); -+} -+inline bool IsWindowsXpOrLater() { -+ int major, minor; -+ return (GetOsVersion(&major, &minor, NULL) && -+ (major >= kWindowsVista || -+ (major == kWindows2000 && minor >= 1))); -+} -+inline bool IsWindows8OrLater() { -+ int major, minor; -+ return (GetOsVersion(&major, &minor, NULL) && -+ (major > kWindowsVista || -+ (major == kWindowsVista && minor >= 2))); -+} -+// Determine the current integrity level of the process. -+bool GetCurrentProcessIntegrityLevel(int* level); -+inline bool IsCurrentProcessLowIntegrity() { -+ int level; -+ return (GetCurrentProcessIntegrityLevel(&level) && -+ level < SECURITY_MANDATORY_MEDIUM_RID); -+} -+bool AdjustCurrentProcessPrivilege(const TCHAR* privilege, bool to_enable); -+} // namespace rtc -+#endif // WEBRTC_WIN -+#endif // WEBRTC_BASE_WIN32_H_ --- -2.14.3 - diff --git a/SOURCES/0002-build-Add-cerbero-gnustl-support-for-Android.patch b/SOURCES/0002-build-Add-cerbero-gnustl-support-for-Android.patch deleted file mode 100644 index 04c63a7..0000000 --- a/SOURCES/0002-build-Add-cerbero-gnustl-support-for-Android.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 560f300a3d84bbd2b48173aaee5166584d917c44 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Thu, 30 Jun 2016 16:19:49 -0400 -Subject: [PATCH 02/16] build: Add cerbero gnustl support for Android - ---- - configure.ac | 17 ++++++++++++++++- - webrtc/modules/audio_processing/Makefile.am | 1 + - 2 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 6f9553b..f34be72 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -26,6 +26,21 @@ AS_CASE(["x${with_ns_mode}"], - [NS_FIXED=0]) - AM_CONDITIONAL(NS_FIXED, [test "x${NS_FIXED}" = "x1"]) - -+AC_ARG_WITH( -+ gnustl, -+ AC_HELP_STRING( -+ [--with-gnustl], -+ [use gnustl @<:@default=no@:>@]), -+ [AS_CASE( -+ [$withval], [no], [], [yes], [], -+ [AC_MSG_ERROR([bad value "$withval" for --with-gnustl])])], -+ [with_gnustl=no]) -+if test "x$with_gnustl" != "xno"; then -+ PKG_CHECK_MODULES(GNUSTL, gnustl) -+fi -+AC_SUBST(GNUSTL_LIBS) -+AC_SUBST(GNUSTL_CFLAGS) -+ - - # Borrowed from gst-plugins-bad - AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) -@@ -104,7 +119,7 @@ AS_IF([test "x$enable_neon" != "xno"], - AM_CONDITIONAL([HAVE_NEON], [test "x$HAVE_NEON" = "x1"]) - - COMMON_CFLAGS="-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)" --COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)" -+COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} ${GNUSTL_CFLAGS} -DNDEBUG -I\$(top_srcdir)" - AC_SUBST([COMMON_CFLAGS]) - AC_SUBST([COMMON_CXXFLAGS]) - -diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am -index 30ca898..eb9bfc0 100644 ---- a/webrtc/modules/audio_processing/Makefile.am -+++ b/webrtc/modules/audio_processing/Makefile.am -@@ -173,6 +173,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \ - $(top_builddir)/webrtc/common_audio/libcommon_audio.la \ - $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \ - $(LIBWEBRTC_PRIVATEARCH) \ -+ $(GNUSTL_LIBS) \ - -lpthread - libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \ - -Wl,--no-undefined \ --- -2.14.3 - diff --git a/SOURCES/0003-build-Don-t-blindly-link-to-pthread.patch b/SOURCES/0003-build-Don-t-blindly-link-to-pthread.patch deleted file mode 100644 index eb345fe..0000000 --- a/SOURCES/0003-build-Don-t-blindly-link-to-pthread.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 44cf7726cac66c88afa0a752aff461e0c2918ebd Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Thu, 30 Jun 2016 16:49:16 -0400 -Subject: [PATCH 03/16] build: Don't blindly link to pthread - -This otherwise breaks the build on Android and Windows. The flag is -required on some Linux builds, and is readded in a subsequent commit. - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - webrtc/modules/audio_processing/Makefile.am | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am -index eb9bfc0..8e45e3d 100644 ---- a/webrtc/modules/audio_processing/Makefile.am -+++ b/webrtc/modules/audio_processing/Makefile.am -@@ -173,8 +173,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \ - $(top_builddir)/webrtc/common_audio/libcommon_audio.la \ - $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \ - $(LIBWEBRTC_PRIVATEARCH) \ -- $(GNUSTL_LIBS) \ -- -lpthread -+ $(GNUSTL_LIBS) - libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \ - -Wl,--no-undefined \ - -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO) --- -2.14.3 - diff --git a/SOURCES/0004-build-Add-required-define-for-Windows.patch b/SOURCES/0004-build-Add-required-define-for-Windows.patch deleted file mode 100644 index f0ebf4b..0000000 --- a/SOURCES/0004-build-Add-required-define-for-Windows.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 12ac8441f75bab2a256278926fe32450a311af1b Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Mon, 4 Jul 2016 15:07:48 -0400 -Subject: [PATCH 04/16] build: Add required define for Windows - -This will also add it to the .pc file as WEBRTC_WIN leaks into the -public interface and undefined __STRICT_ANSI__ so M_PI is available. - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - configure.ac | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index f34be72..ccaa758 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -65,8 +65,11 @@ AS_CASE(["${host}"], - [OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], - [OS_FLAGS="-DWEBRTC_MAC"]) - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ ], -+ [*-mingw32*], -+ [ -+ PLATFORM_CFLAGS="-DWEBRTC_WIN -U__STRICT_ANSI__" - ] -- # FIXME: Add Windows support - ) - AC_SUBST(PLATFORM_CFLAGS) - --- -2.14.3 - diff --git a/SOURCES/0005-build-Properly-select-the-right-system-wrappers.patch b/SOURCES/0005-build-Properly-select-the-right-system-wrappers.patch deleted file mode 100644 index ad7ebfb..0000000 --- a/SOURCES/0005-build-Properly-select-the-right-system-wrappers.patch +++ /dev/null @@ -1,80 +0,0 @@ -From bf6b9de143edfe45ec6f40845510bdb655f866aa Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Mon, 4 Jul 2016 16:02:29 -0400 -Subject: [PATCH 05/16] build: Properly select the right system wrappers - -This is needed for windows build to be usable. - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - configure.ac | 6 ++++++ - webrtc/system_wrappers/Makefile.am | 12 ++++++++++-- - 2 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ccaa758..92706e7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -53,11 +53,13 @@ AS_CASE(["${host}"], - [ - OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX" - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ HAVE_POSIX=1 - ], - [*-*linux*], - [ - OS_CFLAGS="-DWEBRTC_LINUX" - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ HAVE_POSIX=1 - ], - [*-*darwin*], - [ -@@ -65,13 +67,17 @@ AS_CASE(["${host}"], - [OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], - [OS_FLAGS="-DWEBRTC_MAC"]) - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ HAVE_POSIX=1 - ], - [*-mingw32*], - [ - PLATFORM_CFLAGS="-DWEBRTC_WIN -U__STRICT_ANSI__" -+ HAVE_WIN=1 - ] - ) - AC_SUBST(PLATFORM_CFLAGS) -+AM_CONDITIONAL(HAVE_POSIX, [test "x${HAVE_POSIX}" = "x1"]) -+AM_CONDITIONAL(HAVE_WIN, [test "x${HAVE_WIN}" = "x1"]) - - AS_CASE(["${host_cpu}"], - [i?86|x86_64], -diff --git a/webrtc/system_wrappers/Makefile.am b/webrtc/system_wrappers/Makefile.am -index 6c9f4ee..8215013 100644 ---- a/webrtc/system_wrappers/Makefile.am -+++ b/webrtc/system_wrappers/Makefile.am -@@ -42,13 +42,21 @@ libsystem_wrappers_la_SOURCES = include/aligned_malloc.h \ - source/trace_impl.h \ - source/trace_posix.h \ - source/trace_win.h --# This assumes that we want the POSIX implementation -- should eventually be --# converted to a conditional to include Windows support -+if HAVE_POSIX - libsystem_wrappers_la_SOURCES += source/critical_section_posix.cc \ - source/event_timer_posix.cc \ - source/rw_lock_posix.cc \ - source/thread_posix.cc \ - source/trace_posix.cc -+endif -+if HAVE_WIN -+libsystem_wrappers_la_SOURCES += source/critical_section_win.cc \ -+ source/event_timer_win.cc \ -+ source/rw_lock_win.cc \ -+ source/rw_lock_generic.cc \ -+ source/thread_win.cc \ -+ source/trace_win.cc -+endif - libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) - - EXTRA_DIST = BUILD.gn \ --- -2.14.3 - diff --git a/SOURCES/0006-build-Define-MSVC-_WIN32-so-we-can-build-on-mingw.patch b/SOURCES/0006-build-Define-MSVC-_WIN32-so-we-can-build-on-mingw.patch deleted file mode 100644 index 4873119..0000000 --- a/SOURCES/0006-build-Define-MSVC-_WIN32-so-we-can-build-on-mingw.patch +++ /dev/null @@ -1,26 +0,0 @@ -From db2f422578140ba6aaf7a2a1d54caacf832fbee2 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Mon, 4 Jul 2016 17:54:45 -0400 -Subject: [PATCH 06/16] build: Define MSVC _WIN32 so we can build on mingw - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 92706e7..5ec8517 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -71,7 +71,7 @@ AS_CASE(["${host}"], - ], - [*-mingw32*], - [ -- PLATFORM_CFLAGS="-DWEBRTC_WIN -U__STRICT_ANSI__" -+ PLATFORM_CFLAGS="-DWEBRTC_WIN -D_WIN32 -U__STRICT_ANSI__" - HAVE_WIN=1 - ] - ) --- -2.14.3 - diff --git a/SOURCES/0007-Add-missing-windows-conditions-variable.patch b/SOURCES/0007-Add-missing-windows-conditions-variable.patch deleted file mode 100644 index cf042f1..0000000 --- a/SOURCES/0007-Add-missing-windows-conditions-variable.patch +++ /dev/null @@ -1,616 +0,0 @@ -From 6ad2f51e9e94daf6b5925590c4cc08459a2e0833 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Mon, 4 Jul 2016 22:12:20 -0400 -Subject: [PATCH 07/16] Add missing windows conditions variable - -Those are used by generic RW lock implementation. - -https://bugs.freedesktop.org/show_bug.cgi?id=96754 ---- - webrtc/system_wrappers/Makefile.am | 41 ++++- - .../include/condition_variable_wrapper.h | 42 +++++ - .../system_wrappers/source/condition_variable.cc | 41 +++++ - .../source/condition_variable_event_win.cc | 195 +++++++++++++++++++++ - .../source/condition_variable_event_win.h | 46 +++++ - .../source/condition_variable_native_win.cc | 104 +++++++++++ - .../source/condition_variable_native_win.h | 54 ++++++ - 7 files changed, 514 insertions(+), 9 deletions(-) - create mode 100644 webrtc/system_wrappers/include/condition_variable_wrapper.h - create mode 100644 webrtc/system_wrappers/source/condition_variable.cc - create mode 100644 webrtc/system_wrappers/source/condition_variable_event_win.cc - create mode 100644 webrtc/system_wrappers/source/condition_variable_event_win.h - create mode 100644 webrtc/system_wrappers/source/condition_variable_native_win.cc - create mode 100644 webrtc/system_wrappers/source/condition_variable_native_win.h - -diff --git a/webrtc/system_wrappers/Makefile.am b/webrtc/system_wrappers/Makefile.am -index 8215013..09973a7 100644 ---- a/webrtc/system_wrappers/Makefile.am -+++ b/webrtc/system_wrappers/Makefile.am -@@ -2,6 +2,7 @@ noinst_LTLIBRARIES = libsystem_wrappers.la - - noinst_HEADERS = include/aligned_array.h \ - include/asm_defines.h \ -+ include/condition_variable_wrapper.h \ - include/compile_assert_c.h \ - include/event_wrapper.h \ - include/scoped_vector.h \ -@@ -42,27 +43,49 @@ libsystem_wrappers_la_SOURCES = include/aligned_malloc.h \ - source/trace_impl.h \ - source/trace_posix.h \ - source/trace_win.h -+ -+EXTRA_DIST = BUILD.gn -+ - if HAVE_POSIX - libsystem_wrappers_la_SOURCES += source/critical_section_posix.cc \ - source/event_timer_posix.cc \ - source/rw_lock_posix.cc \ - source/thread_posix.cc \ - source/trace_posix.cc -+else -+EXTRA_DIST += source/critical_section_posix.cc \ -+ source/event_timer_posix.cc \ -+ source/rw_lock_posix.cc \ -+ source/thread_posix.cc \ -+ source/trace_posix.cc - endif -+ - if HAVE_WIN --libsystem_wrappers_la_SOURCES += source/critical_section_win.cc \ -+libsystem_wrappers_la_SOURCES += include/fix_interlocked_exchange_pointer_win.h \ -+ source/critical_section_win.cc \ -+ source/condition_variable.cc \ -+ source/condition_variable_event_win.cc \ -+ source/condition_variable_event_win.h \ -+ source/condition_variable_native_win.cc \ -+ source/condition_variable_native_win.h \ - source/event_timer_win.cc \ - source/rw_lock_win.cc \ - source/rw_lock_generic.cc \ - source/thread_win.cc \ - source/trace_win.cc -+else -+EXTRA_DIST += include/fix_interlocked_exchange_pointer_win.h \ -+ source/critical_section_win.cc \ -+ source/condition_variable.cc \ -+ source/condition_variable_event_win.cc \ -+ source/condition_variable_event_win.h \ -+ source/condition_variable_native_win.cc \ -+ source/condition_variable_native_win.h \ -+ source/event_timer_win.cc \ -+ source/rw_lock_generic.cc \ -+ source/rw_lock_win.cc \ -+ source/thread_win.cc \ -+ source/trace_win.cc - endif --libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) - --EXTRA_DIST = BUILD.gn \ -- source/critical_section_win.cc \ -- source/event_timer_win.cc \ -- source/rw_lock_generic.cc \ -- source/rw_lock_win.cc \ -- source/thread_win.cc \ -- source/trace_win.cc -+libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) -diff --git a/webrtc/system_wrappers/include/condition_variable_wrapper.h b/webrtc/system_wrappers/include/condition_variable_wrapper.h -new file mode 100644 -index 0000000..37ca30f ---- /dev/null -+++ b/webrtc/system_wrappers/include/condition_variable_wrapper.h -@@ -0,0 +1,42 @@ -+/* -+ * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_ -+#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_ -+ -+namespace webrtc { -+ -+class CriticalSectionWrapper; -+ -+class ConditionVariableWrapper { -+ public: -+ // Factory method, constructor disabled. -+ static ConditionVariableWrapper* CreateConditionVariable(); -+ -+ virtual ~ConditionVariableWrapper() {} -+ -+ // Calling thread will atomically release crit_sect and wait until next -+ // some other thread calls Wake() or WakeAll(). -+ virtual void SleepCS(CriticalSectionWrapper& crit_sect) = 0; -+ -+ // Same as above but with a timeout. -+ virtual bool SleepCS(CriticalSectionWrapper& crit_sect, -+ unsigned long max_time_in_ms) = 0; -+ -+ // Wakes one thread calling SleepCS(). -+ virtual void Wake() = 0; -+ -+ // Wakes all threads calling SleepCS(). -+ virtual void WakeAll() = 0; -+}; -+ -+} // namespace webrtc -+ -+#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_ -diff --git a/webrtc/system_wrappers/source/condition_variable.cc b/webrtc/system_wrappers/source/condition_variable.cc -new file mode 100644 -index 0000000..f5ae93a ---- /dev/null -+++ b/webrtc/system_wrappers/source/condition_variable.cc -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h" -+ -+#if defined(_WIN32) -+#include -+#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) -+#include -+#include "webrtc/system_wrappers/source/condition_variable_posix.h" -+#endif -+ -+namespace webrtc { -+ -+ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() { -+#if defined(_WIN32) -+ // Try to create native condition variable implementation. -+ ConditionVariableWrapper* ret_val = ConditionVariableNativeWin::Create(); -+ if (!ret_val) { -+ // Native condition variable implementation does not exist. Create generic -+ // condition variable based on events. -+ ret_val = new ConditionVariableEventWin(); -+ } -+ return ret_val; -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -+ return ConditionVariablePosix::Create(); -+#else -+ return NULL; -+#endif -+} -+ -+} // namespace webrtc -diff --git a/webrtc/system_wrappers/source/condition_variable_event_win.cc b/webrtc/system_wrappers/source/condition_variable_event_win.cc -new file mode 100644 -index 0000000..41b019d ---- /dev/null -+++ b/webrtc/system_wrappers/source/condition_variable_event_win.cc -@@ -0,0 +1,195 @@ -+/* -+Source: -+http://www1.cse.wustl.edu/~schmidt/ACE-copying.html -+ -+License: -+Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), -+and CoSMIC(TM) -+ -+ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to -+as "DOC software") are copyrighted by Douglas C. Schmidt and his research -+group at Washington University, University of California, Irvine, and -+Vanderbilt University, Copyright (c) 1993-2009, all rights reserved. Since DOC -+software is open-source, freely available software, you are free to use, -+modify, copy, and distribute--perpetually and irrevocably--the DOC software -+source code and object code produced from the source, as well as copy and -+distribute modified versions of this software. You must, however, include this -+copyright statement along with any code built using DOC software that you -+release. No copyright statement needs to be provided if you just ship binary -+executables of your software products. -+You can use DOC software in commercial and/or binary software releases and are -+under no obligation to redistribute any of your source code that is built -+using DOC software. Note, however, that you may not misappropriate the DOC -+software code, such as copyrighting it yourself or claiming authorship of the -+DOC software code, in a way that will prevent DOC software from being -+distributed freely using an open-source development model. You needn't inform -+anyone that you're using DOC software in your software, though we encourage -+you to let us know so we can promote your project in the DOC software success -+stories. -+ -+The ACE, TAO, CIAO, DAnCE, and CoSMIC web sites are maintained by the DOC -+Group at the Institute for Software Integrated Systems (ISIS) and the Center -+for Distributed Object Computing of Washington University, St. Louis for the -+development of open-source software as part of the open-source software -+community. Submissions are provided by the submitter ``as is'' with no -+warranties whatsoever, including any warranty of merchantability, -+noninfringement of third party intellectual property, or fitness for any -+particular purpose. In no event shall the submitter be liable for any direct, -+indirect, special, exemplary, punitive, or consequential damages, including -+without limitation, lost profits, even if advised of the possibility of such -+damages. Likewise, DOC software is provided as is with no warranties of any -+kind, including the warranties of design, merchantability, and fitness for a -+particular purpose, noninfringement, or arising from a course of dealing, -+usage or trade practice. Washington University, UC Irvine, Vanderbilt -+University, their employees, and students shall have no liability with respect -+to the infringement of copyrights, trade secrets or any patents by DOC -+software or any part thereof. Moreover, in no event will Washington -+University, UC Irvine, or Vanderbilt University, their employees, or students -+be liable for any lost revenue or profits or other special, indirect and -+consequential damages. -+ -+DOC software is provided with no support and without any obligation on the -+part of Washington University, UC Irvine, Vanderbilt University, their -+employees, or students to assist in its use, correction, modification, or -+enhancement. A number of companies around the world provide commercial support -+for DOC software, however. DOC software is Y2K-compliant, as long as the -+underlying OS platform is Y2K-compliant. Likewise, DOC software is compliant -+with the new US daylight savings rule passed by Congress as "The Energy Policy -+Act of 2005," which established new daylight savings times (DST) rules for the -+United States that expand DST as of March 2007. Since DOC software obtains -+time/date and calendaring information from operating systems users will not be -+affected by the new DST rules as long as they upgrade their operating systems -+accordingly. -+ -+The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), Washington -+University, UC Irvine, and Vanderbilt University, may not be used to endorse -+or promote products or services derived from this source without express -+written permission from Washington University, UC Irvine, or Vanderbilt -+University. This license grants no permission to call products or services -+derived from this source ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM), -+nor does it grant permission for the name Washington University, UC Irvine, or -+Vanderbilt University to appear in their names. -+*/ -+ -+/* -+ * This source code contain modifications to the original source code -+ * which can be found here: -+ * http://www.cs.wustl.edu/~schmidt/win32-cv-1.html (section 3.2). -+ * Modifications: -+ * 1) Dynamic detection of native support for condition variables. -+ * 2) Use of WebRTC defined types and classes. Renaming of some functions. -+ * 3) Introduction of a second event for wake all functionality. This prevents -+ * a thread from spinning on the same condition variable, preventing other -+ * threads from waking up. -+ */ -+ -+#include "webrtc/system_wrappers/source/condition_variable_event_win.h" -+#include "webrtc/system_wrappers/source/critical_section_win.h" -+ -+namespace webrtc { -+ -+ConditionVariableEventWin::ConditionVariableEventWin() : eventID_(WAKEALL_0) { -+ memset(&num_waiters_[0], 0, sizeof(num_waiters_)); -+ -+ InitializeCriticalSection(&num_waiters_crit_sect_); -+ -+ events_[WAKEALL_0] = CreateEvent(NULL, // no security attributes -+ TRUE, // manual-reset, sticky event -+ FALSE, // initial state non-signaled -+ NULL); // no name for event -+ -+ events_[WAKEALL_1] = CreateEvent(NULL, // no security attributes -+ TRUE, // manual-reset, sticky event -+ FALSE, // initial state non-signaled -+ NULL); // no name for event -+ -+ events_[WAKE] = CreateEvent(NULL, // no security attributes -+ FALSE, // auto-reset, sticky event -+ FALSE, // initial state non-signaled -+ NULL); // no name for event -+} -+ -+ConditionVariableEventWin::~ConditionVariableEventWin() { -+ CloseHandle(events_[WAKE]); -+ CloseHandle(events_[WAKEALL_1]); -+ CloseHandle(events_[WAKEALL_0]); -+ -+ DeleteCriticalSection(&num_waiters_crit_sect_); -+} -+ -+void ConditionVariableEventWin::SleepCS(CriticalSectionWrapper& crit_sect) { -+ SleepCS(crit_sect, INFINITE); -+} -+ -+bool ConditionVariableEventWin::SleepCS(CriticalSectionWrapper& crit_sect, -+ unsigned long max_time_in_ms) { -+ EnterCriticalSection(&num_waiters_crit_sect_); -+ -+ // Get the eventID for the event that will be triggered by next -+ // WakeAll() call and start waiting for it. -+ const EventWakeUpType eventID = -+ (WAKEALL_0 == eventID_) ? WAKEALL_1 : WAKEALL_0; -+ -+ ++(num_waiters_[eventID]); -+ LeaveCriticalSection(&num_waiters_crit_sect_); -+ -+ CriticalSectionWindows* cs = -+ static_cast(&crit_sect); -+ LeaveCriticalSection(&cs->crit); -+ HANDLE events[2]; -+ events[0] = events_[WAKE]; -+ events[1] = events_[eventID]; -+ const DWORD result = WaitForMultipleObjects(2, // Wait on 2 events. -+ events, -+ FALSE, // Wait for either. -+ max_time_in_ms); -+ -+ const bool ret_val = (result != WAIT_TIMEOUT); -+ -+ EnterCriticalSection(&num_waiters_crit_sect_); -+ --(num_waiters_[eventID]); -+ -+ // Last waiter should only be true for WakeAll(). WakeAll() correspond -+ // to position 1 in events[] -> (result == WAIT_OBJECT_0 + 1) -+ const bool last_waiter = (result == WAIT_OBJECT_0 + 1) && -+ (num_waiters_[eventID] == 0); -+ LeaveCriticalSection(&num_waiters_crit_sect_); -+ -+ if (last_waiter) { -+ // Reset/unset the WakeAll() event since all threads have been -+ // released. -+ ResetEvent(events_[eventID]); -+ } -+ -+ EnterCriticalSection(&cs->crit); -+ return ret_val; -+} -+ -+void ConditionVariableEventWin::Wake() { -+ EnterCriticalSection(&num_waiters_crit_sect_); -+ const bool have_waiters = (num_waiters_[WAKEALL_0] > 0) || -+ (num_waiters_[WAKEALL_1] > 0); -+ LeaveCriticalSection(&num_waiters_crit_sect_); -+ -+ if (have_waiters) { -+ SetEvent(events_[WAKE]); -+ } -+} -+ -+void ConditionVariableEventWin::WakeAll() { -+ EnterCriticalSection(&num_waiters_crit_sect_); -+ -+ // Update current WakeAll() event -+ eventID_ = (WAKEALL_0 == eventID_) ? WAKEALL_1 : WAKEALL_0; -+ -+ // Trigger current event -+ const EventWakeUpType eventID = eventID_; -+ const bool have_waiters = num_waiters_[eventID] > 0; -+ LeaveCriticalSection(&num_waiters_crit_sect_); -+ -+ if (have_waiters) { -+ SetEvent(events_[eventID]); -+ } -+} -+ -+} // namespace webrtc -diff --git a/webrtc/system_wrappers/source/condition_variable_event_win.h b/webrtc/system_wrappers/source/condition_variable_event_win.h -new file mode 100644 -index 0000000..cdcef7d ---- /dev/null -+++ b/webrtc/system_wrappers/source/condition_variable_event_win.h -@@ -0,0 +1,46 @@ -+/* -+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ -+#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ -+ -+#include -+ -+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h" -+ -+namespace webrtc { -+ -+class ConditionVariableEventWin : public ConditionVariableWrapper { -+ public: -+ ConditionVariableEventWin(); -+ virtual ~ConditionVariableEventWin(); -+ -+ void SleepCS(CriticalSectionWrapper& crit_sect); -+ bool SleepCS(CriticalSectionWrapper& crit_sect, unsigned long max_time_inMS); -+ void Wake(); -+ void WakeAll(); -+ -+ private: -+ enum EventWakeUpType { -+ WAKEALL_0 = 0, -+ WAKEALL_1 = 1, -+ WAKE = 2, -+ EVENT_COUNT = 3 -+ }; -+ -+ unsigned int num_waiters_[2]; -+ EventWakeUpType eventID_; -+ CRITICAL_SECTION num_waiters_crit_sect_; -+ HANDLE events_[EVENT_COUNT]; -+}; -+ -+} // namespace webrtc -+ -+#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_ -diff --git a/webrtc/system_wrappers/source/condition_variable_native_win.cc b/webrtc/system_wrappers/source/condition_variable_native_win.cc -new file mode 100644 -index 0000000..45225f2 ---- /dev/null -+++ b/webrtc/system_wrappers/source/condition_variable_native_win.cc -@@ -0,0 +1,104 @@ -+/* -+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#include "webrtc/system_wrappers/include/trace.h" -+#include "webrtc/system_wrappers/source/condition_variable_native_win.h" -+#include "webrtc/system_wrappers/source/critical_section_win.h" -+ -+namespace webrtc { -+ -+static HMODULE library = NULL; -+static bool win_support_condition_variables_primitive = false; -+ -+PInitializeConditionVariable PInitializeConditionVariable_; -+PSleepConditionVariableCS PSleepConditionVariableCS_; -+PWakeConditionVariable PWakeConditionVariable_; -+PWakeAllConditionVariable PWakeAllConditionVariable_; -+ -+typedef void (WINAPI *PInitializeConditionVariable)(PCONDITION_VARIABLE); -+typedef BOOL (WINAPI *PSleepConditionVariableCS)(PCONDITION_VARIABLE, -+ PCRITICAL_SECTION, DWORD); -+typedef void (WINAPI *PWakeConditionVariable)(PCONDITION_VARIABLE); -+typedef void (WINAPI *PWakeAllConditionVariable)(PCONDITION_VARIABLE); -+ -+ConditionVariableNativeWin::ConditionVariableNativeWin() { -+} -+ -+ConditionVariableNativeWin::~ConditionVariableNativeWin() { -+} -+ -+ConditionVariableWrapper* ConditionVariableNativeWin::Create() { -+ ConditionVariableNativeWin* ret_val = new ConditionVariableNativeWin(); -+ if (!ret_val->Init()) { -+ delete ret_val; -+ return NULL; -+ } -+ return ret_val; -+} -+ -+bool ConditionVariableNativeWin::Init() { -+ if (!library) { -+ // Native implementation is supported on Vista+. -+ library = LoadLibrary(TEXT("Kernel32.dll")); -+ // TODO(henrike): this code results in an attempt to load the above dll -+ // every time the previous attempt failed. Only try to load once. -+ if (library) { -+ // TODO(henrike): not thread safe as reading and writing to library is not -+ // serialized. Fix. -+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, "Loaded Kernel.dll"); -+ -+ PInitializeConditionVariable_ = -+ (PInitializeConditionVariable) GetProcAddress( -+ library, "InitializeConditionVariable"); -+ PSleepConditionVariableCS_ = (PSleepConditionVariableCS) GetProcAddress( -+ library, "SleepConditionVariableCS"); -+ PWakeConditionVariable_ = (PWakeConditionVariable) GetProcAddress( -+ library, "WakeConditionVariable"); -+ PWakeAllConditionVariable_ = (PWakeAllConditionVariable) GetProcAddress( -+ library, "WakeAllConditionVariable"); -+ -+ if (PInitializeConditionVariable_ && PSleepConditionVariableCS_ -+ && PWakeConditionVariable_ && PWakeAllConditionVariable_) { -+ WEBRTC_TRACE( -+ kTraceStateInfo, kTraceUtility, -1, -+ "Loaded native condition variables"); -+ win_support_condition_variables_primitive = true; -+ } -+ } -+ } -+ if (!win_support_condition_variables_primitive) { -+ return false; -+ } -+ PInitializeConditionVariable_(&condition_variable_); -+ return true; -+} -+ -+void ConditionVariableNativeWin::SleepCS(CriticalSectionWrapper& crit_sect) { -+ SleepCS(crit_sect, INFINITE); -+} -+ -+bool ConditionVariableNativeWin::SleepCS(CriticalSectionWrapper& crit_sect, -+ unsigned long max_time_in_ms) { -+ CriticalSectionWindows* cs = -+ static_cast(&crit_sect); -+ BOOL ret_val = PSleepConditionVariableCS_(&condition_variable_, -+ &(cs->crit), max_time_in_ms); -+ return ret_val != 0; -+} -+ -+void ConditionVariableNativeWin::Wake() { -+ PWakeConditionVariable_(&condition_variable_); -+} -+ -+void ConditionVariableNativeWin::WakeAll() { -+ PWakeAllConditionVariable_(&condition_variable_); -+} -+ -+} // namespace webrtc -diff --git a/webrtc/system_wrappers/source/condition_variable_native_win.h b/webrtc/system_wrappers/source/condition_variable_native_win.h -new file mode 100644 -index 0000000..c22787f ---- /dev/null -+++ b/webrtc/system_wrappers/source/condition_variable_native_win.h -@@ -0,0 +1,54 @@ -+/* -+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. -+ * -+ * Use of this source code is governed by a BSD-style license -+ * that can be found in the LICENSE file in the root of the source -+ * tree. An additional intellectual property rights grant can be found -+ * in the file PATENTS. All contributing project authors may -+ * be found in the AUTHORS file in the root of the source tree. -+ */ -+ -+#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_ -+#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_ -+ -+#include -+ -+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h" -+ -+namespace webrtc { -+ -+#if !defined CONDITION_VARIABLE_INIT -+typedef struct RTL_CONDITION_VARIABLE_ { -+ void* Ptr; -+} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE; -+ -+typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE; -+#endif -+ -+typedef void (WINAPI* PInitializeConditionVariable)(PCONDITION_VARIABLE); -+typedef BOOL (WINAPI* PSleepConditionVariableCS)(PCONDITION_VARIABLE, -+ PCRITICAL_SECTION, DWORD); -+typedef void (WINAPI* PWakeConditionVariable)(PCONDITION_VARIABLE); -+typedef void (WINAPI* PWakeAllConditionVariable)(PCONDITION_VARIABLE); -+ -+class ConditionVariableNativeWin : public ConditionVariableWrapper { -+ public: -+ static ConditionVariableWrapper* Create(); -+ virtual ~ConditionVariableNativeWin(); -+ -+ void SleepCS(CriticalSectionWrapper& crit_sect); -+ bool SleepCS(CriticalSectionWrapper& crit_sect, unsigned long max_time_inMS); -+ void Wake(); -+ void WakeAll(); -+ -+ private: -+ ConditionVariableNativeWin(); -+ -+ bool Init(); -+ -+ CONDITION_VARIABLE condition_variable_; -+}; -+ -+} // namespace webrtc -+ -+#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_ --- -2.14.3 - diff --git a/SOURCES/0008-build-Protect-against-unsupported-CPU-types.patch b/SOURCES/0008-build-Protect-against-unsupported-CPU-types.patch deleted file mode 100644 index d596d7b..0000000 --- a/SOURCES/0008-build-Protect-against-unsupported-CPU-types.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 75ef0de24167daa84c11774f4bc9d1b4a9eaacfa Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Tue, 5 Jul 2016 18:07:45 -0400 -Subject: [PATCH 08/16] build: Protect against unsupported CPU types - ---- - configure.ac | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5ec8517..1fcbd53 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -73,7 +73,8 @@ AS_CASE(["${host}"], - [ - PLATFORM_CFLAGS="-DWEBRTC_WIN -D_WIN32 -U__STRICT_ANSI__" - HAVE_WIN=1 -- ] -+ ], -+ [AC_MSG_ERROR([Unsupported host $host])] - ) - AC_SUBST(PLATFORM_CFLAGS) - AM_CONDITIONAL(HAVE_POSIX, [test "x${HAVE_POSIX}" = "x1"]) -@@ -94,8 +95,9 @@ AS_CASE(["${host_cpu}"], - [ - HAVE_ARM=1 - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" -- ] -+ ], - # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines -+ [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] - ) - AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) - AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) --- -2.14.3 - diff --git a/SOURCES/0009-osx-Fix-type-OS_FLAGS-instead-of-OS_CFLAGS.patch b/SOURCES/0009-osx-Fix-type-OS_FLAGS-instead-of-OS_CFLAGS.patch deleted file mode 100644 index f9bd7e2..0000000 --- a/SOURCES/0009-osx-Fix-type-OS_FLAGS-instead-of-OS_CFLAGS.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1378babdf0f56938408d8137595023efe1bd7c2d Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Tue, 5 Jul 2016 18:44:19 -0400 -Subject: [PATCH 09/16] osx: Fix type OS_FLAGS instead of OS_CFLAGS - ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1fcbd53..41d521c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -64,8 +64,8 @@ AS_CASE(["${host}"], - [*-*darwin*], - [ - AS_IF([test "$HAVE_IOS" = "yes"], -- [OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], -- [OS_FLAGS="-DWEBRTC_MAC"]) -+ [OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], -+ [OS_CFLAGS="-DWEBRTC_MAC"]) - PLATFORM_CFLAGS="-DWEBRTC_POSIX" - HAVE_POSIX=1 - ], --- -2.14.3 - diff --git a/SOURCES/0010-build-Sync-defines-and-libs-with-build.gn.patch b/SOURCES/0010-build-Sync-defines-and-libs-with-build.gn.patch deleted file mode 100644 index 10c607c..0000000 --- a/SOURCES/0010-build-Sync-defines-and-libs-with-build.gn.patch +++ /dev/null @@ -1,75 +0,0 @@ -From c9cffb9e3d632b61465afbca5d10c36512888035 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Wed, 6 Jul 2016 11:32:55 -0400 -Subject: [PATCH 10/16] build: Sync defines and libs with build.gn - ---- - configure.ac | 13 +++++++++---- - webrtc/modules/audio_processing/Makefile.am | 2 +- - 2 files changed, 10 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 41d521c..bdefd72 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -51,26 +51,29 @@ AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IO - AS_CASE(["${host}"], - [*android*], - [ -- OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX" -+ OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME" -+ OS_LDFLAGS="-llog" - PLATFORM_CFLAGS="-DWEBRTC_POSIX" - HAVE_POSIX=1 - ], - [*-*linux*], - [ -- OS_CFLAGS="-DWEBRTC_LINUX" -+ OS_CFLAGS="-DWEBRTC_LINUX -DWEBRTC_THREAD_RR" - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -+ OS_LDFLAGS="-lrt" - HAVE_POSIX=1 - ], - [*-*darwin*], - [ -+ OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME" - AS_IF([test "$HAVE_IOS" = "yes"], -- [OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"], -- [OS_CFLAGS="-DWEBRTC_MAC"]) -+ [OS_CFLAGS+=" -DWEBRTC_IOS"]) - PLATFORM_CFLAGS="-DWEBRTC_POSIX" - HAVE_POSIX=1 - ], - [*-mingw32*], - [ -+ OS_LDFLAGS="-lwinmm" - PLATFORM_CFLAGS="-DWEBRTC_WIN -D_WIN32 -U__STRICT_ANSI__" - HAVE_WIN=1 - ], -@@ -131,8 +134,10 @@ AM_CONDITIONAL([HAVE_NEON], [test "x$HAVE_NEON" = "x1"]) - - COMMON_CFLAGS="-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)" - COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} ${GNUSTL_CFLAGS} -DNDEBUG -I\$(top_srcdir)" -+COMMON_LDFLAGS="${OS_LDFLAGS}" - AC_SUBST([COMMON_CFLAGS]) - AC_SUBST([COMMON_CXXFLAGS]) -+AC_SUBST([COMMON_LDFLAGS]) - - AC_CONFIG_FILES([ - webrtc-audio-processing.pc -diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am -index 8e45e3d..de259f0 100644 ---- a/webrtc/modules/audio_processing/Makefile.am -+++ b/webrtc/modules/audio_processing/Makefile.am -@@ -174,7 +174,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \ - $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \ - $(LIBWEBRTC_PRIVATEARCH) \ - $(GNUSTL_LIBS) --libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \ -+libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) $(COMMON_LDFLAGS) \ - -Wl,--no-undefined \ - -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO) - --- -2.14.3 - diff --git a/SOURCES/0011-build-Use-no-undefined-to-support-both-clang-and-gcc.patch b/SOURCES/0011-build-Use-no-undefined-to-support-both-clang-and-gcc.patch deleted file mode 100644 index c0c62d4..0000000 --- a/SOURCES/0011-build-Use-no-undefined-to-support-both-clang-and-gcc.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b8be6d1095df620bf0e2b5855818fa4340244254 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Wed, 6 Jul 2016 13:44:15 -0400 -Subject: [PATCH 11/16] build: Use -no-undefined to support both clang and gcc - ---- - webrtc/modules/audio_processing/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am -index de259f0..5a98913 100644 ---- a/webrtc/modules/audio_processing/Makefile.am -+++ b/webrtc/modules/audio_processing/Makefile.am -@@ -175,7 +175,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \ - $(LIBWEBRTC_PRIVATEARCH) \ - $(GNUSTL_LIBS) - libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) $(COMMON_LDFLAGS) \ -- -Wl,--no-undefined \ -+ -no-undefined \ - -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO) - - # FIXME: The MIPS optimisations need to be hooked up once we have the --- -2.14.3 - diff --git a/SOURCES/0012-build-Re-add-pthread-linking-on-linux.patch b/SOURCES/0012-build-Re-add-pthread-linking-on-linux.patch deleted file mode 100644 index c202a93..0000000 --- a/SOURCES/0012-build-Re-add-pthread-linking-on-linux.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7a37a8bca386faf206fef32cd8cdf0f8ea3313d5 Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Wed, 6 Jul 2016 13:57:00 -0400 -Subject: [PATCH 12/16] build: Re-add pthread linking on linux - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index bdefd72..a0c194a 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -60,7 +60,7 @@ AS_CASE(["${host}"], - [ - OS_CFLAGS="-DWEBRTC_LINUX -DWEBRTC_THREAD_RR" - PLATFORM_CFLAGS="-DWEBRTC_POSIX" -- OS_LDFLAGS="-lrt" -+ OS_LDFLAGS="-lrt -lpthread" - HAVE_POSIX=1 - ], - [*-*darwin*], --- -2.14.3 - diff --git a/SOURCES/0013-build-Add-ARM-64bit-support.patch b/SOURCES/0013-build-Add-ARM-64bit-support.patch deleted file mode 100644 index 26b3a4d..0000000 --- a/SOURCES/0013-build-Add-ARM-64bit-support.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 7d15b10fb0829d456486da6a49a84492dd3eca4f Mon Sep 17 00:00:00 2001 -From: Nicolas Dufresne -Date: Wed, 6 Jul 2016 15:18:15 -0400 -Subject: [PATCH 13/16] build: Add ARM 64bit support - ---- - configure.ac | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/configure.ac b/configure.ac -index a0c194a..b4b9ddf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -99,6 +99,11 @@ AS_CASE(["${host_cpu}"], - HAVE_ARM=1 - ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" - ], -+ [aarch64*], -+ [ -+ HAVE_NEON=1 -+ ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" -+ ], - # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines - [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] - ) --- -2.14.3 - diff --git a/SOURCES/0014-build-fix-architecture-detection.patch b/SOURCES/0014-build-fix-architecture-detection.patch deleted file mode 100644 index 603f5a2..0000000 --- a/SOURCES/0014-build-fix-architecture-detection.patch +++ /dev/null @@ -1,94 +0,0 @@ -From ff77a85c28564d939d554ba264480d1876cbc316 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 6 Aug 2016 11:02:43 +0200 -Subject: [PATCH 14/16] build: fix architecture detection - -The current architecture detection, based on the "host_cpu" part of the -tuple does not work properly for a number of reason: - - - The code assumes that if host_cpu starts with "arm" then ARM - instructions are available, which is incorrect. Indeed, Cortex-M - platforms can run Linux, they are ARM platforms (so host_cpu = arm), - but they don't support ARM instructions: they support only the - Thumb-2 instruction set. - - - The armv7 case is also not very useful, as it is not standard at all - to pass armv7 as host_cpu even if the host system is actually ARMv7 - based. - - - For the same reason, the armv8 case is not very useful: ARMv8 is - AArch64, and there is already a separate case to handle this - architecture. - -So, this commit moves away from a host_cpu based logic, and instead -tests using AC_CHECK_DECLS() the built-in definitions of the compiler: - - - If we have __ARM_ARCH_ISA_ARM defined, then it's an ARM processor - that supports the ARM instruction set (this allows to exclude Thumb-2 - only processors). - - - If we have __ARM_ARCH_7A__, then we have an ARMv7-A processor, and - we can enable the corresponding optimizations - - - Same for __aarch64__, __i386__ and __x86_64__. - -In addition, we remove the AC_MSG_ERROR() that makes the build fail for -all architectures but the ones that are explicitly supported. Indeed, -webrtc-audio-processing builds just fine for other architectures (tested -on MIPS), it's just that none of the architecture-specific optimizations -will be used. - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 35 +++++++++++------------------------ - 1 file changed, 11 insertions(+), 24 deletions(-) - -diff --git a/configure.ac b/configure.ac -index b4b9ddf..acbb3e2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -83,30 +83,17 @@ AC_SUBST(PLATFORM_CFLAGS) - AM_CONDITIONAL(HAVE_POSIX, [test "x${HAVE_POSIX}" = "x1"]) - AM_CONDITIONAL(HAVE_WIN, [test "x${HAVE_WIN}" = "x1"]) - --AS_CASE(["${host_cpu}"], -- [i?86|x86_64], -- [ -- HAVE_X86=1 -- ], -- [armv7*|armv8*], -- [ -- HAVE_ARM=1 -- HAVE_ARMV7=1 -- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7" -- ], -- [arm*], -- [ -- HAVE_ARM=1 -- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM" -- ], -- [aarch64*], -- [ -- HAVE_NEON=1 -- ARCH_CFLAGS="-DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64" -- ], -- # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines -- [AC_MSG_ERROR([Unsupported CPU type $host_cpu])] --) -+# Testing __ARM_ARCH_ISA_ARM since the code contains ARM instructions, -+# which don't work on Thumb-2 only platforms (ARMv7-M). -+AC_CHECK_DECLS([__ARM_ARCH_ISA_ARM], -+ [HAVE_ARM=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM"]) -+AC_CHECK_DECLS([__ARM_ARCH_7A__], -+ [HAVE_ARMV7=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM_V7"]) -+AC_CHECK_DECLS([__aarch64__], -+ [HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON -DWEBRTC_ARCH_ARM64"]) -+AC_CHECK_DECLS([__i386__], [HAVE_X86=1]) -+AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1]) -+ - AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"]) - AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"]) - AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"]) --- -2.14.3 - diff --git a/SOURCES/0015-doc-file-invalid-reference-to-pulseaudio-mailing-lis.patch b/SOURCES/0015-doc-file-invalid-reference-to-pulseaudio-mailing-lis.patch deleted file mode 100644 index 5721413..0000000 --- a/SOURCES/0015-doc-file-invalid-reference-to-pulseaudio-mailing-lis.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0d937fbc7152f34f32cd4cd016ed623434b90796 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 6 Aug 2016 11:03:27 +0200 -Subject: [PATCH 15/16] doc: file invalid reference to pulseaudio mailing list - -Signed-off-by: Thomas Petazzoni ---- - README.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/README.md b/README.md -index 03de756..9133f17 100644 ---- a/README.md -+++ b/README.md -@@ -18,7 +18,7 @@ Feedback - ======== - - Patches, suggestions welcome. You can send them to the PulseAudio mailing --list[2] or to me at the address below. -+list[3] or to me at the address below. - - -- Arun Raghavan - --- -2.14.3 - diff --git a/SOURCES/0016-build-Fix-configure-option-with-ns-mode.patch b/SOURCES/0016-build-Fix-configure-option-with-ns-mode.patch deleted file mode 100644 index 8f270c0..0000000 --- a/SOURCES/0016-build-Fix-configure-option-with-ns-mode.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ee8cfef49b8417c2f0ba65a249d2ee8c360d19ab Mon Sep 17 00:00:00 2001 -From: Mirko Vogt -Date: Fri, 6 Jan 2017 03:04:20 +0100 -Subject: [PATCH 16/16] build: Fix configure option '--with-ns-mode' - -Make *really* take '--with-ns-mode'-option into account. -Before it was bogus (wrong if-check) and it always resulted -in the float version being used. - -Signed-off-by: Mirko Vogt ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index acbb3e2..e78bf27 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,7 +20,7 @@ AC_LANG_CPLUSPLUS - AC_ARG_WITH([ns-mode], - AS_HELP_STRING([--with-ns-mode=float|fixed], [Noise suppresion mode to use. Default is float])) - --AS_CASE(["x${with_ns_mode}"], -+AS_CASE(["${with_ns_mode}"], - ["fixed"], [NS_FIXED=1], - ["float"], [NS_FIXED=0], - [NS_FIXED=0]) --- -2.14.3 - diff --git a/SOURCES/webrtc-audio-processing-0.2-big-endian.patch b/SOURCES/webrtc-audio-processing-0.2-big-endian.patch deleted file mode 100644 index 9361725..0000000 --- a/SOURCES/webrtc-audio-processing-0.2-big-endian.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -up webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc.than webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc ---- webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc.than 2016-05-24 08:28:45.749940095 -0400 -+++ webrtc-audio-processing-0.2/webrtc/common_audio/wav_file.cc 2016-05-24 08:50:30.361020010 -0400 -@@ -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(num_samples), - num_samples_remaining_); -@@ -76,6 +73,12 @@ size_t WavReader::ReadSamples(size_t num - RTC_CHECK(read == num_samples || feof(file_handle_)); - RTC_CHECK_LE(read, num_samples_remaining_); - num_samples_remaining_ -= rtc::checked_cast(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(written); - RTC_CHECK(written <= std::numeric_limits::max() || -diff -up webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc.than webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc ---- webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc.than 2016-05-24 08:50:52.591379263 -0400 -+++ webrtc-audio-processing-0.2/webrtc/common_audio/wav_header.cc 2016-05-24 08:52:08.552606848 -0400 -@@ -129,7 +129,39 @@ static inline std::string ReadFourCC(uin - return std::string(reinterpret_cast(&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(a) << 24 ) -+ | (static_cast(b) << 16) -+ | (static_cast(c) << 8) -+ | (static_cast(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(&x), 4); -+} - #endif - - static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) { diff --git a/SOURCES/webrtc-fix-typedefs-on-other-arches.patch b/SOURCES/webrtc-fix-typedefs-on-other-arches.patch deleted file mode 100644 index 81e5ae5..0000000 --- a/SOURCES/webrtc-fix-typedefs-on-other-arches.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef webrtc-audio-processing-0.2/webrtc/typedefs.h ---- webrtc-audio-processing-0.2/webrtc/typedefs.h.typedef 2016-05-12 09:08:53.885000410 -0500 -+++ webrtc-audio-processing-0.2/webrtc/typedefs.h 2016-05-12 09:12:38.006851953 -0500 -@@ -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/arches.patch b/arches.patch new file mode 100644 index 0000000..eaf43df --- /dev/null +++ b/arches.patch @@ -0,0 +1,86 @@ +--- webrtc-audio-processing-1.3/webrtc/rtc_base/system/arch.h 2023-09-05 10:19:47.000000000 -0500 ++++ webrtc-audio-processing-1.3/webrtc/rtc_base/system/arch.h 2024-02-12 10:04:12.114812565 -0600 +@@ -15,8 +15,9 @@ + #define RTC_BASE_SYSTEM_ARCH_H_ + + // Processor architecture detection. For more info on what's defined, see: +-// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +-// http://www.agner.org/optimize/calling_conventions.pdf ++// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros ++// https://www.agner.org/optimize/calling_conventions.pdf ++// https://sourceforge.net/p/predef/wiki/Architectures/ + // or with gcc, run: "echo | gcc -E -dM -" + #if defined(_M_X64) || defined(__x86_64__) + #define WEBRTC_ARCH_X86_FAMILY +@@ -27,29 +28,50 @@ + #define WEBRTC_ARCH_ARM_FAMILY + #define WEBRTC_ARCH_64_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN +-#elif defined(__riscv) || defined(__riscv__) +-#define WEBRTC_ARCH_LITTLE_ENDIAN +-#if __riscv_xlen == 64 +-#define WEBRTC_ARCH_64_BITS +-#else +-#define WEBRTC_ARCH_32_BITS +-#endif + #elif defined(_M_IX86) || defined(__i386__) + #define WEBRTC_ARCH_X86_FAMILY + #define WEBRTC_ARCH_X86 + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN +-#elif defined(__ARMEL__) ++#elif defined(_M_ARM) || defined(__ARMEL__) + #define WEBRTC_ARCH_ARM_FAMILY + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN +-#elif defined(__MIPSEL__) ++#elif defined(__MIPSEL__) || defined(__MIPSEB__) + #define WEBRTC_ARCH_MIPS_FAMILY + #if defined(__LP64__) + #define WEBRTC_ARCH_64_BITS + #else + #define WEBRTC_ARCH_32_BITS + #endif ++#if defined(__MIPSEL__) ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#else ++#define WEBRTC_ARCH_BIG_ENDIAN ++#endif ++#elif defined(__PPC__) ++#if defined(__PPC64__) ++#define WEBRTC_ARCH_64_BITS ++#else ++#define WEBRTC_ARCH_32_BITS ++#endif ++#if defined(__LITTLE_ENDIAN__) ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#else ++#define WEBRTC_ARCH_BIG_ENDIAN ++#endif ++#elif defined(__sparc) || defined(__sparc__) ++#if __SIZEOF_LONG__ == 8 ++#define WEBRTC_ARCH_64_BITS ++#else ++#define WEBRTC_ARCH_32_BITS ++#endif ++#define WEBRTC_ARCH_BIG_ENDIAN ++#elif defined(__riscv) && __riscv_xlen == 64 ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__riscv) && __riscv_xlen == 32 ++#define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN + #elif defined(__pnacl__) + #define WEBRTC_ARCH_32_BITS +--- webrtc-audio-processing-1.3/webrtc/rtc_base/system/arch.h~ 2024-02-12 10:14:11.277835532 -0600 ++++ webrtc-audio-processing-1.3/webrtc/rtc_base/system/arch.h 2024-02-12 10:25:11.558554823 -0600 +@@ -79,6 +79,9 @@ + #elif defined(__EMSCRIPTEN__) + #define WEBRTC_ARCH_32_BITS + #define WEBRTC_ARCH_LITTLE_ENDIAN ++#elif defined(__s390x__) ++#define WEBRTC_ARCH_64_BITS ++#define WEBRTC_ARCH_BIG_ENDIAN + #else + #error Please add support for your architecture in rtc_base/system/arch.h + #endif diff --git a/build-abseil-cpp-from-local-tarbal.patch b/build-abseil-cpp-from-local-tarbal.patch new file mode 100644 index 0000000..f8c1ddd --- /dev/null +++ b/build-abseil-cpp-from-local-tarbal.patch @@ -0,0 +1,17 @@ +diff -ru webrtc-audio-processing-1.3.old/subprojects/abseil-cpp.wrap webrtc-audio-processing-1.3/subprojects/abseil-cpp.wrap +--- webrtc-audio-processing-1.3.old/subprojects/abseil-cpp.wrap 2023-09-05 17:19:47.000000000 +0200 ++++ webrtc-audio-processing-1.3/subprojects/abseil-cpp.wrap 2024-07-12 17:45:02.377170755 +0200 +@@ -1,13 +1,7 @@ + [wrap-file] + directory = abseil-cpp-20230125.1 +-source_url = https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz + source_filename = abseil-cpp-20230125.1.tar.gz +-source_hash = 81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145 + patch_filename = abseil-cpp_20230125.1-4_patch.zip +-patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20230125.1-4/get_patch +-patch_hash = 112ee72052049d930396c2778fc1c6e184137905dd75d60a97dcfc386426610d +-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20230125.1-4/abseil-cpp-20230125.1.tar.gz +-wrapdb_version = 20230125.1-4 + + [provide] + absl_base = absl_base_dep diff --git a/sources b/sources new file mode 100644 index 0000000..34af675 --- /dev/null +++ b/sources @@ -0,0 +1,3 @@ +SHA512 (abseil-cpp-20230125.1.tar.gz) = 160764e2d10f1a5970b6ea7323868d231070c57b48fcc92e3614bca9d0e9ee0a571b66dfdc560934883de542f32dfbb1ba7b03c11bda8f03e63a5f31e273be6a +SHA512 (abseil-cpp_20230125.1-4_patch.zip) = 3e013f9a76dd6f3bc0ec039fdf4d52f228ca135da23d856f3dda17769c5d63ad424175ee78f284735056705d29ac86c76cf751d3ccd66c7882d5d617a1e5fe8c +SHA512 (webrtc-audio-processing-1.3.tar.xz) = daabaed06ff9d1d4076b2abba14efbbebeb8930b14a99fb47974399d2812f3f851e3d6a691b09fbcfb1a3535c6ade967bac4c17a3728f3138b302e3b844c5c67 diff --git a/SPECS/webrtc-audio-processing.spec b/webrtc-audio-processing.spec similarity index 55% rename from SPECS/webrtc-audio-processing.spec rename to webrtc-audio-processing.spec index a664d6e..f13571f 100644 --- a/SPECS/webrtc-audio-processing.spec +++ b/webrtc-audio-processing.spec @@ -1,36 +1,23 @@ Name: webrtc-audio-processing -Version: 0.3 -Release: 10%{?dist} +Version: 1.3 +Release: 5%{?dist} Summary: Library for echo cancellation -License: BSD and MIT +License: BSD-3-Clause URL: http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/ Source0: http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/%{name}-%{version}.tar.xz +Source1: abseil-cpp-20230125.1.tar.gz +Source2: abseil-cpp_20230125.1-4_patch.zip -## upstream patches (lookaside cache for now, not willing to bloat git this much yet) -Patch1: 0001-Add-missing-windows-specific-headers.patch -Patch2: 0002-build-Add-cerbero-gnustl-support-for-Android.patch -Patch3: 0003-build-Don-t-blindly-link-to-pthread.patch -Patch4: 0004-build-Add-required-define-for-Windows.patch -Patch5: 0005-build-Properly-select-the-right-system-wrappers.patch -Patch6: 0006-build-Define-MSVC-_WIN32-so-we-can-build-on-mingw.patch -Patch7: 0007-Add-missing-windows-conditions-variable.patch -Patch8: 0008-build-Protect-against-unsupported-CPU-types.patch -Patch9: 0009-osx-Fix-type-OS_FLAGS-instead-of-OS_CFLAGS.patch -Patch10: 0010-build-Sync-defines-and-libs-with-build.gn.patch -Patch11: 0011-build-Use-no-undefined-to-support-both-clang-and-gcc.patch -Patch12: 0012-build-Re-add-pthread-linking-on-linux.patch -Patch13: 0013-build-Add-ARM-64bit-support.patch -Patch14: 0014-build-fix-architecture-detection.patch -Patch15: 0015-doc-file-invalid-reference-to-pulseaudio-mailing-lis.patch -Patch16: 0016-build-Fix-configure-option-with-ns-mode.patch -Patch100: webrtc-fix-typedefs-on-other-arches.patch -# bz#1336466, https://bugs.freedesktop.org/show_bug.cgi?id=95738 -Patch104: webrtc-audio-processing-0.2-big-endian.patch +Patch0: arches.patch +Patch1: 65f002e.patch +Patch2: build-abseil-cpp-from-local-tarbal.patch -BuildRequires: autoconf automake libtool +BuildRequires: meson BuildRequires: gcc gcc-c++ +#BuildRequires: abseil-cpp-devel +#BuildRequires: neon-devel %description %{name} is a library derived from Google WebRTC project that @@ -48,53 +35,98 @@ files for developing applications that use %{name}. %prep %autosetup -p1 +mkdir subprojects/packagefiles +cp %{SOURCE1} subprojects/packagefiles/ +cp %{SOURCE2} subprojects/packagefiles/ + %build -# for patch1 -autoreconf -vif - -%configure \ -%ifarch %{arm} aarch64 - --enable-neon=no \ -%endif - --disable-silent-rules \ - --disable-static - -make %{?_smp_mflags} - +%meson +%meson_build \ +#%%ifarch %%{arm} aarch64 +# -Dneon=no \ +#%endif %install -make install DESTDIR=%{buildroot} INSTALL="install -p" - -# remove libtool archives -find %{buildroot} -type f -name "*.la" -delete - -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig +%meson_install +%ldconfig_scriptlets %files %doc NEWS AUTHORS README.md %license COPYING -%{_libdir}/libwebrtc_audio_processing.so.1* +%{_libdir}/libwebrtc-audio-coding-1.so.3* +%{_libdir}/libwebrtc-audio-processing-1.so.3* %files devel -%{_libdir}/libwebrtc_audio_processing.so -%{_libdir}/pkgconfig/webrtc-audio-processing.pc -%{_includedir}/webrtc_audio_processing/ - +%{_libdir}/libwebrtc-audio-coding-1.so +%{_libdir}/libwebrtc-audio-processing-1.so +%{_libdir}/pkgconfig/webrtc-audio-coding-1.pc +%{_libdir}/pkgconfig/webrtc-audio-processing-1.pc +%{_includedir}/webrtc-audio-processing-1/ +%{_includedir}/absl/ %changelog -* Tue Jan 11 2021 Tomas Popela 0.3-10 -- Include devel package in CRB -- Resolves: #2036956 +* Tue Oct 29 2024 Troy Dawson - 1.3-5 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 -* Mon Jun 01 2020 Debarshi Ray 0.3-9 -- Rebuild to address Annobin coverage issues -Resolves: #1704148 +* Mon Jul 15 2024 Wim Taymans - 1.3-4 +- Install abseil-cpp headers as well +- Resolves: RHEL-28928 -* Mon Jul 23 2018 Debarshi Ray 0.3-8 +* Fri Jul 12 2024 Wim Taymans - 1.3-3 +- Build abseil-cpp from tarbal +- Resolves: RHEL-28928 + +* Mon Jun 24 2024 Troy Dawson - 1.3-2 +- Bump release for June 2024 mass rebuild + +* Fri Feb 09 2024 Gwyn Ciesla - 1.3-1 +- 1.3 + +* Sat Jan 27 2024 Fedora Release Engineering - 0.3.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 0.3.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 0.3.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.3.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 0.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.3.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 0.3.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 0.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 0.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 0.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jul 25 2018 Rex Dieter - 0.3.1-1 +- 0.3.1 +- use %%make_build %%make_install %%ldconfig_scriptlets + +* Mon Jul 23 2018 Debarshi Ray 0.3-9 - Update License +* Sat Jul 14 2018 Fedora Release Engineering - 0.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Sat Mar 3 2018 Peter Robinson 0.3-7 - Add gcc/gcc-c++ build requires - Add aarch64 to NEON exception