9 Commits
v2.0 ... master

Author SHA1 Message Date
846fe90a28 doc: Add release notes for v2.1 2025-01-22 17:32:18 -05:00
8f445c36cc meson: Bump version to 2.1 2025-01-22 17:30:47 -05:00
a24b45cc19 patches: Track some MinGW fixups 2025-01-10 15:07:56 -05:00
a9f97c9fdd Some fixes for MinGW
* Rename Windows.h uses to windows.h
  * Comment out structured exception handling usage

Makes MinGW happier. Mostly the same as previous work by
Nicolas Dufresne <nicolas.dufresne@collabora.com>, with the exception
that we now don't try to invoke RaiseException which would fail in MinGW
as it raises a Windows structured exception.
2025-01-10 15:07:34 -05:00
f8a6ea0a9a meson: Add absl_numeric as a dep
Another implicit cascading dependency.
2025-01-10 12:49:22 -05:00
222790ad57 meson: Update abseil-cpp wrap for missing headers 2025-01-10 12:01:31 -05:00
1818e5eb50 patches: Track patch for Windows builds 2025-01-09 16:36:34 -05:00
c555fb6eaf meson: Fixes for MSVC build
winsock2.h must be included before windows.h or alternative
definitions of `struct sockaddr` are defined.

```
FAILED: webrtc/rtc_base/liblibbase.a.p/logging.cc.obj
"cl" "-Iwebrtc\rtc_base\liblibbase.a.p" "-Iwebrtc\rtc_base" "-I..\webrtc\rtc_base" "-Iwebrtc" "-I..\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W2" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Zi" "-DWEBRTC_LIBRARY_
IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-DWEBRTC_ENABLE_AVX2" "/Fdwebrtc\rtc_base\liblibbase.a.p\logging.cc.pdb" /Fowebrtc/rtc_base/liblibbase.a.p/logging.cc.obj "/c" ../webrtc/rtc_base/logging.cc
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: 'AF_IPX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of 'AF_IPX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: 'AF_MAX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of 'AF_MAX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: 'SO_DONTLINGER': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of 'SO_DONTLINGER'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: 'sockaddr': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of 'sockaddr'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2143: syntax error: missing '}' before 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C2143: syntax error: missing ';' before '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
```
2025-01-09 16:35:01 -05:00
845e79a2a7 meson: Install some new headers
The main header has moved to api/audio/... and there are a bunch of new
dependent headers.
2025-01-09 15:53:16 -05:00
10 changed files with 127 additions and 7 deletions

7
NEWS
View File

@ -1,3 +1,10 @@
Release 2.1
-----------
Build-system fixups to install more headers, add a missing absl dependency, and
forward port some missing patches to fix Windows builds.
Release 2.0 Release 2.0
----------- -----------

View File

@ -1,5 +1,5 @@
project('webrtc-audio-processing', 'c', 'cpp', project('webrtc-audio-processing', 'c', 'cpp',
version : '2.0', version : '2.1',
meson_version : '>= 0.63', meson_version : '>= 0.63',
default_options : [ 'warning_level=1', default_options : [ 'warning_level=1',
'buildtype=debugoptimized', 'buildtype=debugoptimized',
@ -52,6 +52,7 @@ absl_dep = [
dependency('absl_base', default_options: ['cpp_std=c++17'], version: '>=20240722'), dependency('absl_base', default_options: ['cpp_std=c++17'], version: '>=20240722'),
dependency('absl_flags'), dependency('absl_flags'),
dependency('absl_strings'), dependency('absl_strings'),
dependency('absl_numeric'),
dependency('absl_synchronization'), dependency('absl_synchronization'),
dependency('absl_bad_optional_access'), dependency('absl_bad_optional_access'),
] ]
@ -62,6 +63,7 @@ if absl_dep[0].type_name() == 'internal'
absl_subproj.get_variable('absl_base_headers'), absl_subproj.get_variable('absl_base_headers'),
absl_subproj.get_variable('absl_flags_headers'), absl_subproj.get_variable('absl_flags_headers'),
absl_subproj.get_variable('absl_strings_headers'), absl_subproj.get_variable('absl_strings_headers'),
absl_subproj.get_variable('absl_numeric_headers'),
absl_subproj.get_variable('absl_synchronization_headers'), absl_subproj.get_variable('absl_synchronization_headers'),
absl_subproj.get_variable('absl_types_headers'), absl_subproj.get_variable('absl_types_headers'),
] ]

View File

@ -0,0 +1,51 @@
From a9f97c9fdd490e35bd43d6463424eee5b44c4a7d Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun@asymptotic.io>
Date: Fri, 18 Jun 2021 18:40:32 -0400
Subject: [PATCH] Some fixes for MinGW
* Rename Windows.h uses to windows.h
* Comment out structured exception handling usage
Makes MinGW happier. Mostly the same as previous work by
Nicolas Dufresne <nicolas.dufresne@collabora.com>, with the exception
that we now don't try to invoke RaiseException which would fail in MinGW
as it raises a Windows structured exception.
---
webrtc/rtc_base/platform_thread_types.cc | 2 ++
webrtc/rtc_base/system/file_wrapper.cc | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/webrtc/rtc_base/platform_thread_types.cc b/webrtc/rtc_base/platform_thread_types.cc
index e98e8ec..1a24881 100644
--- a/webrtc/rtc_base/platform_thread_types.cc
+++ b/webrtc/rtc_base/platform_thread_types.cc
@@ -118,11 +118,13 @@ void SetCurrentThreadName(const char* name) {
#pragma warning(push)
#pragma warning(disable : 6320 6322)
+#ifndef __MINGW32__
__try {
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR),
reinterpret_cast<ULONG_PTR*>(&threadname_info));
} __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT
}
+#endif
#pragma warning(pop)
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
diff --git a/webrtc/rtc_base/system/file_wrapper.cc b/webrtc/rtc_base/system/file_wrapper.cc
index 12c27a5..3203bc6 100644
--- a/webrtc/rtc_base/system/file_wrapper.cc
+++ b/webrtc/rtc_base/system/file_wrapper.cc
@@ -22,7 +22,7 @@
#include "rtc_base/numerics/safe_conversions.h"
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#else
#endif
--
2.47.1

View File

@ -0,0 +1,46 @@
From c555fb6eaf0568c2205bbd197ebbcc0e85714c77 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 26 May 2023 02:20:56 +0530
Subject: [PATCH] meson: Fixes for MSVC build
winsock2.h must be included before windows.h or alternative
definitions of `struct sockaddr` are defined.
```
FAILED: webrtc/rtc_base/liblibbase.a.p/logging.cc.obj
"cl" "-Iwebrtc\rtc_base\liblibbase.a.p" "-Iwebrtc\rtc_base" "-I..\webrtc\rtc_base" "-Iwebrtc" "-I..\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W2" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Zi" "-DWEBRTC_LIBRARY_
IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-DWEBRTC_ENABLE_AVX2" "/Fdwebrtc\rtc_base\liblibbase.a.p\logging.cc.pdb" /Fowebrtc/rtc_base/liblibbase.a.p/logging.cc.obj "/c" ../webrtc/rtc_base/logging.cc
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: 'AF_IPX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of 'AF_IPX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: 'AF_MAX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of 'AF_MAX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: 'SO_DONTLINGER': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of 'SO_DONTLINGER'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: 'sockaddr': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of 'sockaddr'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2143: syntax error: missing '}' before 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C2143: syntax error: missing ';' before '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
```
---
webrtc/rtc_base/logging.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/webrtc/rtc_base/logging.cc b/webrtc/rtc_base/logging.cc
index 61a3c66..825c686 100644
--- a/webrtc/rtc_base/logging.cc
+++ b/webrtc/rtc_base/logging.cc
@@ -15,6 +15,7 @@
#if RTC_LOG_ENABLED()
#if defined(WEBRTC_WIN)
+#include <winsock2.h>
#include <windows.h>
#if _MSC_VER < 1900
#define snprintf _snprintf
--
2.47.1

View File

@ -3,11 +3,11 @@ directory = abseil-cpp-20240722.0
source_url = https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz source_url = https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz
source_filename = abseil-cpp-20240722.0.tar.gz source_filename = abseil-cpp-20240722.0.tar.gz
source_hash = f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3 source_hash = f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3
patch_filename = abseil-cpp_20240722.0-1_patch.zip patch_filename = abseil-cpp_20240722.0-3_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20240722.0-1/get_patch patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20240722.0-3/get_patch
patch_hash = 692bbbc39cacaba4dc4b0c8b2fbbe32736c9cde6377acfa0d52088797af14ded patch_hash = 12dd8df1488a314c53e3751abd2750cf233b830651d168b6a9f15e7d0cf71f7b
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20240722.0-1/abseil-cpp-20240722.0.tar.gz source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20240722.0-3/abseil-cpp-20240722.0.tar.gz
wrapdb_version = 20240722.0-1 wrapdb_version = 20240722.0-3
[provide] [provide]
absl_base = absl_base_dep absl_base = absl_base_dep

View File

@ -18,9 +18,15 @@ api_sources = [
api_headers = [ api_headers = [
['', 'array_view.h'], ['', 'array_view.h'],
['', 'location.h'],
['', 'ref_count.h'],
['', 'scoped_refptr.h'], ['', 'scoped_refptr.h'],
['audio', 'audio_processing.h'],
['audio', 'audio_processing_statistics.h'],
['audio', 'echo_canceller3_config.h'], ['audio', 'echo_canceller3_config.h'],
['audio', 'echo_control.h'], ['audio', 'echo_control.h'],
['task_queue', 'task_queue_base.h'],
['units', 'time_delta.h'],
] ]
foreach h : api_headers foreach h : api_headers

View File

@ -15,6 +15,7 @@
#if RTC_LOG_ENABLED() #if RTC_LOG_ENABLED()
#if defined(WEBRTC_WIN) #if defined(WEBRTC_WIN)
#include <winsock2.h>
#include <windows.h> #include <windows.h>
#if _MSC_VER < 1900 #if _MSC_VER < 1900
#define snprintf _snprintf #define snprintf _snprintf

View File

@ -26,11 +26,16 @@ base_headers = [
[ '', 'arraysize.h' ], [ '', 'arraysize.h' ],
[ '', 'checks.h' ], [ '', 'checks.h' ],
[ '', 'ref_count.h' ], [ '', 'ref_count.h' ],
[ '', 'thread_annotations.h' ],
[ '', 'type_traits.h' ], [ '', 'type_traits.h' ],
[ 'numerics', 'divide_round.h' ],
[ 'numerics', 'safe_compare.h' ], [ 'numerics', 'safe_compare.h' ],
[ 'numerics', 'safe_conversions.h' ],
[ 'numerics', 'safe_conversions_impl.h' ],
[ 'system', 'file_wrapper.h' ], [ 'system', 'file_wrapper.h' ],
[ 'system', 'inline.h' ], [ 'system', 'inline.h' ],
[ 'system', 'rtc_export.h' ], [ 'system', 'rtc_export.h' ],
[ 'units', 'unit_base.h' ],
] ]
foreach h : base_headers foreach h : base_headers

View File

@ -118,11 +118,13 @@ void SetCurrentThreadName(const char* name) {
#pragma warning(push) #pragma warning(push)
#pragma warning(disable : 6320 6322) #pragma warning(disable : 6320 6322)
#ifndef __MINGW32__
__try { __try {
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR), ::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR),
reinterpret_cast<ULONG_PTR*>(&threadname_info)); reinterpret_cast<ULONG_PTR*>(&threadname_info));
} __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT } __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT
} }
#endif
#pragma warning(pop) #pragma warning(pop)
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) #elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT

View File

@ -22,7 +22,7 @@
#include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/safe_conversions.h"
#ifdef _WIN32 #ifdef _WIN32
#include <Windows.h> #include <windows.h>
#else #else
#endif #endif