diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-10-11 15:34:17 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-10-11 15:38:00 -0700 |
| commit | 547e283a28cd386ff92d7a94cb3a7dd62b35d67b (patch) | |
| tree | f13e3f80410438d3e97504e54f54632212efdfe6 | |
| parent | cb93879fbbb3983ae9e7edd2e41470448cd2958e (diff) | |
| download | meta-openembedded-547e283a28cd386ff92d7a94cb3a7dd62b35d67b.tar.gz | |
webrtc-audio-processing-2: Fix build with abseil-cpp 202508
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 620 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2/60.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2/60.patch new file mode 100644 index 0000000000..5a4c154060 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2/60.patch | |||
| @@ -0,0 +1,619 @@ | |||
| 1 | From c8896801dfbfe03b56f85c1533abc077ff74a533 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Reilly Brogan <reilly@reillybrogan.com> | ||
| 3 | Date: Tue, 19 Aug 2025 14:47:03 -0500 | ||
| 4 | Subject: [PATCH 1/2] Fix build with abseil-cpp 202508 | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/60] | ||
| 7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 8 | --- | ||
| 9 | webrtc/api/audio/audio_processing.h | 12 +++++++++ | ||
| 10 | webrtc/api/make_ref_counted.h | 13 ++++++++++ | ||
| 11 | webrtc/api/scoped_refptr.h | 15 +++++++++++ | ||
| 12 | .../aec_dump/aec_dump_factory.h | 15 +++++++++++ | ||
| 13 | .../aec_dump/null_aec_dump_factory.cc | 25 +++++++++++++++++++ | ||
| 14 | .../audio_processing/audio_processing_impl.cc | 9 +++++++ | ||
| 15 | .../audio_processing/audio_processing_impl.h | 9 +++++++ | ||
| 16 | 7 files changed, 98 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/webrtc/api/audio/audio_processing.h b/webrtc/api/audio/audio_processing.h | ||
| 19 | index dca75f2..4580ba9 100644 | ||
| 20 | --- a/webrtc/api/audio/audio_processing.h | ||
| 21 | +++ b/webrtc/api/audio/audio_processing.h | ||
| 22 | @@ -28,6 +28,7 @@ | ||
| 23 | #include <string> | ||
| 24 | #include <utility> | ||
| 25 | |||
| 26 | +#include "absl/base/config.h" | ||
| 27 | #include "absl/base/nullability.h" | ||
| 28 | #include "absl/strings/string_view.h" | ||
| 29 | #include "api/array_view.h" | ||
| 30 | @@ -632,6 +633,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface { | ||
| 31 | // return value of true indicates that the file has been | ||
| 32 | // sucessfully opened, while a value of false indicates that | ||
| 33 | // opening the file failed. | ||
| 34 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 35 | virtual bool CreateAndAttachAecDump( | ||
| 36 | absl::string_view file_name, | ||
| 37 | int64_t max_log_size_bytes, | ||
| 38 | @@ -640,6 +642,16 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface { | ||
| 39 | absl::Nonnull<FILE*> handle, | ||
| 40 | int64_t max_log_size_bytes, | ||
| 41 | absl::Nonnull<TaskQueueBase*> worker_queue) = 0; | ||
| 42 | +#else | ||
| 43 | + virtual bool CreateAndAttachAecDump(absl::string_view file_name, | ||
| 44 | + int64_t max_log_size_bytes, | ||
| 45 | + TaskQueueBase* absl_nonnull | ||
| 46 | + worker_queue) = 0; | ||
| 47 | + virtual bool CreateAndAttachAecDump(FILE* absl_nonnull handle, | ||
| 48 | + int64_t max_log_size_bytes, | ||
| 49 | + TaskQueueBase* absl_nonnull | ||
| 50 | + worker_queue) = 0; | ||
| 51 | +#endif | ||
| 52 | |||
| 53 | // TODO(webrtc:5298) Deprecated variant. | ||
| 54 | // Attaches provided webrtc::AecDump for recording debugging | ||
| 55 | diff --git a/webrtc/api/make_ref_counted.h b/webrtc/api/make_ref_counted.h | ||
| 56 | index b5f4e99..080023a 100644 | ||
| 57 | --- a/webrtc/api/make_ref_counted.h | ||
| 58 | +++ b/webrtc/api/make_ref_counted.h | ||
| 59 | @@ -13,6 +13,7 @@ | ||
| 60 | #include <type_traits> | ||
| 61 | #include <utility> | ||
| 62 | |||
| 63 | +#include "absl/base/config.h" | ||
| 64 | #include "absl/base/nullability.h" | ||
| 65 | #include "api/ref_count.h" | ||
| 66 | #include "api/scoped_refptr.h" | ||
| 67 | @@ -86,7 +87,11 @@ template < | ||
| 68 | typename std::enable_if<std::is_convertible_v<T*, RefCountInterface*> && | ||
| 69 | std::is_abstract_v<T>, | ||
| 70 | T>::type* = nullptr> | ||
| 71 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 72 | absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) { | ||
| 73 | +#else | ||
| 74 | +absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) { | ||
| 75 | +#endif | ||
| 76 | return scoped_refptr<T>(new RefCountedObject<T>(std::forward<Args>(args)...)); | ||
| 77 | } | ||
| 78 | |||
| 79 | @@ -99,7 +104,11 @@ template < | ||
| 80 | !std::is_convertible_v<T*, RefCountInterface*> && | ||
| 81 | webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value, | ||
| 82 | T>::type* = nullptr> | ||
| 83 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 84 | absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) { | ||
| 85 | +#else | ||
| 86 | +absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) { | ||
| 87 | +#endif | ||
| 88 | return scoped_refptr<T>(new T(std::forward<Args>(args)...)); | ||
| 89 | } | ||
| 90 | |||
| 91 | @@ -113,7 +122,11 @@ template < | ||
| 92 | !webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value, | ||
| 93 | |||
| 94 | T>::type* = nullptr> | ||
| 95 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 96 | absl::Nonnull<scoped_refptr<FinalRefCountedObject<T>>> make_ref_counted( | ||
| 97 | +#else | ||
| 98 | +absl_nonnull scoped_refptr<FinalRefCountedObject<T>> make_ref_counted( | ||
| 99 | +#endif | ||
| 100 | Args&&... args) { | ||
| 101 | return scoped_refptr<FinalRefCountedObject<T>>( | ||
| 102 | new FinalRefCountedObject<T>(std::forward<Args>(args)...)); | ||
| 103 | diff --git a/webrtc/api/scoped_refptr.h b/webrtc/api/scoped_refptr.h | ||
| 104 | index c6fb560..8c441ff 100644 | ||
| 105 | --- a/webrtc/api/scoped_refptr.h | ||
| 106 | +++ b/webrtc/api/scoped_refptr.h | ||
| 107 | @@ -66,6 +66,7 @@ | ||
| 108 | #include <cstddef> | ||
| 109 | #include <utility> | ||
| 110 | |||
| 111 | +#include "absl/base/config.h" | ||
| 112 | #include "absl/base/nullability.h" | ||
| 113 | |||
| 114 | namespace webrtc { | ||
| 115 | @@ -73,13 +74,19 @@ namespace webrtc { | ||
| 116 | template <class T> | ||
| 117 | class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 118 | public: | ||
| 119 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 120 | using absl_nullability_compatible = void; | ||
| 121 | +#endif | ||
| 122 | using element_type = T; | ||
| 123 | |||
| 124 | scoped_refptr() : ptr_(nullptr) {} | ||
| 125 | scoped_refptr(std::nullptr_t) : ptr_(nullptr) {} // NOLINT(runtime/explicit) | ||
| 126 | |||
| 127 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 128 | explicit scoped_refptr(absl::Nullable<T*> p) : ptr_(p) { | ||
| 129 | +#else | ||
| 130 | + explicit scoped_refptr(T* absl_nullable p) : ptr_(p) { | ||
| 131 | +#endif | ||
| 132 | if (ptr_) | ||
| 133 | ptr_->AddRef(); | ||
| 134 | } | ||
| 135 | @@ -122,7 +129,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 136 | return retVal; | ||
| 137 | } | ||
| 138 | |||
| 139 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 140 | scoped_refptr<T>& operator=(absl::Nullable<T*> p) { | ||
| 141 | +#else | ||
| 142 | + scoped_refptr<T>& operator=(T* absl_nullable p) { | ||
| 143 | +#endif | ||
| 144 | // AddRef first so that self assignment should work | ||
| 145 | if (p) | ||
| 146 | p->AddRef(); | ||
| 147 | @@ -152,7 +163,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 148 | return *this; | ||
| 149 | } | ||
| 150 | |||
| 151 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 152 | void swap(absl::Nonnull<T**> pp) noexcept { | ||
| 153 | +#else | ||
| 154 | + void swap(T** absl_nonnull pp) noexcept { | ||
| 155 | +#endif | ||
| 156 | T* p = ptr_; | ||
| 157 | ptr_ = *pp; | ||
| 158 | *pp = p; | ||
| 159 | diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 160 | index 0d258a9..14d8b39 100644 | ||
| 161 | --- a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 162 | +++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 163 | @@ -29,6 +29,7 @@ class RTC_EXPORT AecDumpFactory { | ||
| 164 | // The AecDump takes responsibility for `handle` and closes it in the | ||
| 165 | // destructor. A non-null return value indicates that the file has been | ||
| 166 | // sucessfully opened. | ||
| 167 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 168 | static absl::Nullable<std::unique_ptr<AecDump>> Create( | ||
| 169 | FileWrapper file, | ||
| 170 | int64_t max_log_size_bytes, | ||
| 171 | @@ -41,6 +42,20 @@ class RTC_EXPORT AecDumpFactory { | ||
| 172 | absl::Nonnull<FILE*> handle, | ||
| 173 | int64_t max_log_size_bytes, | ||
| 174 | absl::Nonnull<TaskQueueBase*> worker_queue); | ||
| 175 | +#else | ||
| 176 | + static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 177 | + FileWrapper file, | ||
| 178 | + int64_t max_log_size_bytes, | ||
| 179 | + TaskQueueBase* absl_nonnull worker_queue); | ||
| 180 | + static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 181 | + absl::string_view file_name, | ||
| 182 | + int64_t max_log_size_bytes, | ||
| 183 | + TaskQueueBase* absl_nonnull worker_queue); | ||
| 184 | + static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 185 | + FILE* absl_nonnull handle, | ||
| 186 | + int64_t max_log_size_bytes, | ||
| 187 | + TaskQueueBase* absl_nonnull worker_queue); | ||
| 188 | +#endif | ||
| 189 | }; | ||
| 190 | |||
| 191 | } // namespace webrtc | ||
| 192 | diff --git a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 193 | index 63929af..658bcee 100644 | ||
| 194 | --- a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 195 | +++ b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 196 | @@ -16,6 +16,7 @@ | ||
| 197 | |||
| 198 | namespace webrtc { | ||
| 199 | |||
| 200 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 201 | absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create( | ||
| 202 | FileWrapper file, | ||
| 203 | int64_t max_log_size_bytes, | ||
| 204 | @@ -37,3 +38,27 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create( | ||
| 205 | return nullptr; | ||
| 206 | } | ||
| 207 | } // namespace webrtc | ||
| 208 | +#else | ||
| 209 | +absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 210 | + FileWrapper file, | ||
| 211 | + int64_t max_log_size_bytes, | ||
| 212 | + TaskQueueBase* absl_nonnull worker_queue) { | ||
| 213 | + return nullptr; | ||
| 214 | +} | ||
| 215 | + | ||
| 216 | +absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 217 | + absl::string_view file_name, | ||
| 218 | + int64_t max_log_size_bytes, | ||
| 219 | + TaskQueueBase* absl_nonnull worker_queue) { | ||
| 220 | + return nullptr; | ||
| 221 | +} | ||
| 222 | + | ||
| 223 | +absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 224 | + FILE* absl_nonnull handle, | ||
| 225 | + int64_t max_log_size_bytes, | ||
| 226 | + TaskQueueBase* absl_nonnull worker_queue) { | ||
| 227 | + return nullptr; | ||
| 228 | +} | ||
| 229 | +} // namespace webrtc | ||
| 230 | + | ||
| 231 | +#endif | ||
| 232 | diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 233 | index a1cba51..1dfe26d 100644 | ||
| 234 | --- a/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 235 | +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 236 | @@ -19,6 +19,7 @@ | ||
| 237 | #include <type_traits> | ||
| 238 | #include <utility> | ||
| 239 | |||
| 240 | +#include "absl/base/config.h" | ||
| 241 | #include "absl/base/nullability.h" | ||
| 242 | #include "absl/strings/match.h" | ||
| 243 | #include "absl/strings/string_view.h" | ||
| 244 | @@ -1787,7 +1788,11 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() { | ||
| 245 | bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 246 | absl::string_view file_name, | ||
| 247 | int64_t max_log_size_bytes, | ||
| 248 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 249 | absl::Nonnull<TaskQueueBase*> worker_queue) { | ||
| 250 | +#else | ||
| 251 | + TaskQueueBase* absl_nonnull worker_queue) { | ||
| 252 | +#endif | ||
| 253 | std::unique_ptr<AecDump> aec_dump = | ||
| 254 | AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue); | ||
| 255 | if (!aec_dump) { | ||
| 256 | @@ -1801,7 +1806,11 @@ bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 257 | bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 258 | FILE* handle, | ||
| 259 | int64_t max_log_size_bytes, | ||
| 260 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 261 | absl::Nonnull<TaskQueueBase*> worker_queue) { | ||
| 262 | +#else | ||
| 263 | + TaskQueueBase* absl_nonnull worker_queue) { | ||
| 264 | +#endif | ||
| 265 | std::unique_ptr<AecDump> aec_dump = | ||
| 266 | AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue); | ||
| 267 | if (!aec_dump) { | ||
| 268 | diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 269 | index ecdc055..51a2bfb 100644 | ||
| 270 | --- a/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 271 | +++ b/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 272 | @@ -20,6 +20,7 @@ | ||
| 273 | #include <string> | ||
| 274 | #include <vector> | ||
| 275 | |||
| 276 | +#include "absl/base/config.h" | ||
| 277 | #include "absl/base/nullability.h" | ||
| 278 | #include "absl/strings/string_view.h" | ||
| 279 | #include "api/array_view.h" | ||
| 280 | @@ -74,11 +75,19 @@ class AudioProcessingImpl : public AudioProcessing { | ||
| 281 | bool CreateAndAttachAecDump( | ||
| 282 | absl::string_view file_name, | ||
| 283 | int64_t max_log_size_bytes, | ||
| 284 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 285 | absl::Nonnull<TaskQueueBase*> worker_queue) override; | ||
| 286 | +#else | ||
| 287 | + TaskQueueBase* absl_nonnull worker_queue) override; | ||
| 288 | +#endif | ||
| 289 | bool CreateAndAttachAecDump( | ||
| 290 | FILE* handle, | ||
| 291 | int64_t max_log_size_bytes, | ||
| 292 | +#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 293 | absl::Nonnull<TaskQueueBase*> worker_queue) override; | ||
| 294 | +#else | ||
| 295 | + TaskQueueBase* absl_nonnull worker_queue) override; | ||
| 296 | +#endif | ||
| 297 | // TODO(webrtc:5298) Deprecated variant. | ||
| 298 | void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override; | ||
| 299 | void DetachAecDump() override; | ||
| 300 | -- | ||
| 301 | GitLab | ||
| 302 | |||
| 303 | |||
| 304 | From bc838790eeb6066d30f019c2a3516bd2b824a5c8 Mon Sep 17 00:00:00 2001 | ||
| 305 | From: Reilly Brogan <reilly@reillybrogan.com> | ||
| 306 | Date: Tue, 19 Aug 2025 15:25:51 -0500 | ||
| 307 | Subject: [PATCH 2/2] patches: Track abseil-cpp 202508 support patch | ||
| 308 | |||
| 309 | --- | ||
| 310 | ...001-Fix-build-with-abseil-cpp-202508.patch | 297 ++++++++++++++++++ | ||
| 311 | 1 file changed, 297 insertions(+) | ||
| 312 | create mode 100644 patches/0001-Fix-build-with-abseil-cpp-202508.patch | ||
| 313 | |||
| 314 | diff --git a/patches/0001-Fix-build-with-abseil-cpp-202508.patch b/patches/0001-Fix-build-with-abseil-cpp-202508.patch | ||
| 315 | new file mode 100644 | ||
| 316 | index 0000000..06c3794 | ||
| 317 | --- /dev/null | ||
| 318 | +++ b/patches/0001-Fix-build-with-abseil-cpp-202508.patch | ||
| 319 | @@ -0,0 +1,297 @@ | ||
| 320 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| 321 | +From: Reilly Brogan <reilly@reillybrogan.com> | ||
| 322 | +Date: Tue, 19 Aug 2025 14:47:03 -0500 | ||
| 323 | +Subject: [PATCH] Fix build with abseil-cpp 202508 | ||
| 324 | + | ||
| 325 | +--- | ||
| 326 | + webrtc/api/audio/audio_processing.h | 12 +++++++++ | ||
| 327 | + webrtc/api/make_ref_counted.h | 13 ++++++++++ | ||
| 328 | + webrtc/api/scoped_refptr.h | 15 +++++++++++ | ||
| 329 | + .../aec_dump/aec_dump_factory.h | 15 +++++++++++ | ||
| 330 | + .../aec_dump/null_aec_dump_factory.cc | 25 +++++++++++++++++++ | ||
| 331 | + .../audio_processing/audio_processing_impl.cc | 9 +++++++ | ||
| 332 | + .../audio_processing/audio_processing_impl.h | 9 +++++++ | ||
| 333 | + 7 files changed, 98 insertions(+) | ||
| 334 | + | ||
| 335 | +diff --git a/webrtc/api/audio/audio_processing.h b/webrtc/api/audio/audio_processing.h | ||
| 336 | +index dca75f2..4580ba9 100644 | ||
| 337 | +--- a/webrtc/api/audio/audio_processing.h | ||
| 338 | ++++ b/webrtc/api/audio/audio_processing.h | ||
| 339 | +@@ -28,6 +28,7 @@ | ||
| 340 | + #include <string> | ||
| 341 | + #include <utility> | ||
| 342 | + | ||
| 343 | ++#include "absl/base/config.h" | ||
| 344 | + #include "absl/base/nullability.h" | ||
| 345 | + #include "absl/strings/string_view.h" | ||
| 346 | + #include "api/array_view.h" | ||
| 347 | +@@ -632,6 +633,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface { | ||
| 348 | + // return value of true indicates that the file has been | ||
| 349 | + // sucessfully opened, while a value of false indicates that | ||
| 350 | + // opening the file failed. | ||
| 351 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 352 | + virtual bool CreateAndAttachAecDump( | ||
| 353 | + absl::string_view file_name, | ||
| 354 | + int64_t max_log_size_bytes, | ||
| 355 | +@@ -640,6 +642,16 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface { | ||
| 356 | + absl::Nonnull<FILE*> handle, | ||
| 357 | + int64_t max_log_size_bytes, | ||
| 358 | + absl::Nonnull<TaskQueueBase*> worker_queue) = 0; | ||
| 359 | ++#else | ||
| 360 | ++ virtual bool CreateAndAttachAecDump(absl::string_view file_name, | ||
| 361 | ++ int64_t max_log_size_bytes, | ||
| 362 | ++ TaskQueueBase* absl_nonnull | ||
| 363 | ++ worker_queue) = 0; | ||
| 364 | ++ virtual bool CreateAndAttachAecDump(FILE* absl_nonnull handle, | ||
| 365 | ++ int64_t max_log_size_bytes, | ||
| 366 | ++ TaskQueueBase* absl_nonnull | ||
| 367 | ++ worker_queue) = 0; | ||
| 368 | ++#endif | ||
| 369 | + | ||
| 370 | + // TODO(webrtc:5298) Deprecated variant. | ||
| 371 | + // Attaches provided webrtc::AecDump for recording debugging | ||
| 372 | +diff --git a/webrtc/api/make_ref_counted.h b/webrtc/api/make_ref_counted.h | ||
| 373 | +index b5f4e99..080023a 100644 | ||
| 374 | +--- a/webrtc/api/make_ref_counted.h | ||
| 375 | ++++ b/webrtc/api/make_ref_counted.h | ||
| 376 | +@@ -13,6 +13,7 @@ | ||
| 377 | + #include <type_traits> | ||
| 378 | + #include <utility> | ||
| 379 | + | ||
| 380 | ++#include "absl/base/config.h" | ||
| 381 | + #include "absl/base/nullability.h" | ||
| 382 | + #include "api/ref_count.h" | ||
| 383 | + #include "api/scoped_refptr.h" | ||
| 384 | +@@ -86,7 +87,11 @@ template < | ||
| 385 | + typename std::enable_if<std::is_convertible_v<T*, RefCountInterface*> && | ||
| 386 | + std::is_abstract_v<T>, | ||
| 387 | + T>::type* = nullptr> | ||
| 388 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 389 | + absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) { | ||
| 390 | ++#else | ||
| 391 | ++absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) { | ||
| 392 | ++#endif | ||
| 393 | + return scoped_refptr<T>(new RefCountedObject<T>(std::forward<Args>(args)...)); | ||
| 394 | + } | ||
| 395 | + | ||
| 396 | +@@ -99,7 +104,11 @@ template < | ||
| 397 | + !std::is_convertible_v<T*, RefCountInterface*> && | ||
| 398 | + webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value, | ||
| 399 | + T>::type* = nullptr> | ||
| 400 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 401 | + absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) { | ||
| 402 | ++#else | ||
| 403 | ++absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) { | ||
| 404 | ++#endif | ||
| 405 | + return scoped_refptr<T>(new T(std::forward<Args>(args)...)); | ||
| 406 | + } | ||
| 407 | + | ||
| 408 | +@@ -113,7 +122,11 @@ template < | ||
| 409 | + !webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value, | ||
| 410 | + | ||
| 411 | + T>::type* = nullptr> | ||
| 412 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 413 | + absl::Nonnull<scoped_refptr<FinalRefCountedObject<T>>> make_ref_counted( | ||
| 414 | ++#else | ||
| 415 | ++absl_nonnull scoped_refptr<FinalRefCountedObject<T>> make_ref_counted( | ||
| 416 | ++#endif | ||
| 417 | + Args&&... args) { | ||
| 418 | + return scoped_refptr<FinalRefCountedObject<T>>( | ||
| 419 | + new FinalRefCountedObject<T>(std::forward<Args>(args)...)); | ||
| 420 | +diff --git a/webrtc/api/scoped_refptr.h b/webrtc/api/scoped_refptr.h | ||
| 421 | +index c6fb560..8c441ff 100644 | ||
| 422 | +--- a/webrtc/api/scoped_refptr.h | ||
| 423 | ++++ b/webrtc/api/scoped_refptr.h | ||
| 424 | +@@ -66,6 +66,7 @@ | ||
| 425 | + #include <cstddef> | ||
| 426 | + #include <utility> | ||
| 427 | + | ||
| 428 | ++#include "absl/base/config.h" | ||
| 429 | + #include "absl/base/nullability.h" | ||
| 430 | + | ||
| 431 | + namespace webrtc { | ||
| 432 | +@@ -73,13 +74,19 @@ namespace webrtc { | ||
| 433 | + template <class T> | ||
| 434 | + class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 435 | + public: | ||
| 436 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 437 | + using absl_nullability_compatible = void; | ||
| 438 | ++#endif | ||
| 439 | + using element_type = T; | ||
| 440 | + | ||
| 441 | + scoped_refptr() : ptr_(nullptr) {} | ||
| 442 | + scoped_refptr(std::nullptr_t) : ptr_(nullptr) {} // NOLINT(runtime/explicit) | ||
| 443 | + | ||
| 444 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 445 | + explicit scoped_refptr(absl::Nullable<T*> p) : ptr_(p) { | ||
| 446 | ++#else | ||
| 447 | ++ explicit scoped_refptr(T* absl_nullable p) : ptr_(p) { | ||
| 448 | ++#endif | ||
| 449 | + if (ptr_) | ||
| 450 | + ptr_->AddRef(); | ||
| 451 | + } | ||
| 452 | +@@ -122,7 +129,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 453 | + return retVal; | ||
| 454 | + } | ||
| 455 | + | ||
| 456 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 457 | + scoped_refptr<T>& operator=(absl::Nullable<T*> p) { | ||
| 458 | ++#else | ||
| 459 | ++ scoped_refptr<T>& operator=(T* absl_nullable p) { | ||
| 460 | ++#endif | ||
| 461 | + // AddRef first so that self assignment should work | ||
| 462 | + if (p) | ||
| 463 | + p->AddRef(); | ||
| 464 | +@@ -152,7 +163,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { | ||
| 465 | + return *this; | ||
| 466 | + } | ||
| 467 | + | ||
| 468 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 469 | + void swap(absl::Nonnull<T**> pp) noexcept { | ||
| 470 | ++#else | ||
| 471 | ++ void swap(T** absl_nonnull pp) noexcept { | ||
| 472 | ++#endif | ||
| 473 | + T* p = ptr_; | ||
| 474 | + ptr_ = *pp; | ||
| 475 | + *pp = p; | ||
| 476 | +diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 477 | +index 0d258a9..14d8b39 100644 | ||
| 478 | +--- a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 479 | ++++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h | ||
| 480 | +@@ -29,6 +29,7 @@ class RTC_EXPORT AecDumpFactory { | ||
| 481 | + // The AecDump takes responsibility for `handle` and closes it in the | ||
| 482 | + // destructor. A non-null return value indicates that the file has been | ||
| 483 | + // sucessfully opened. | ||
| 484 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 485 | + static absl::Nullable<std::unique_ptr<AecDump>> Create( | ||
| 486 | + FileWrapper file, | ||
| 487 | + int64_t max_log_size_bytes, | ||
| 488 | +@@ -41,6 +42,20 @@ class RTC_EXPORT AecDumpFactory { | ||
| 489 | + absl::Nonnull<FILE*> handle, | ||
| 490 | + int64_t max_log_size_bytes, | ||
| 491 | + absl::Nonnull<TaskQueueBase*> worker_queue); | ||
| 492 | ++#else | ||
| 493 | ++ static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 494 | ++ FileWrapper file, | ||
| 495 | ++ int64_t max_log_size_bytes, | ||
| 496 | ++ TaskQueueBase* absl_nonnull worker_queue); | ||
| 497 | ++ static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 498 | ++ absl::string_view file_name, | ||
| 499 | ++ int64_t max_log_size_bytes, | ||
| 500 | ++ TaskQueueBase* absl_nonnull worker_queue); | ||
| 501 | ++ static absl_nullable std::unique_ptr<AecDump> Create( | ||
| 502 | ++ FILE* absl_nonnull handle, | ||
| 503 | ++ int64_t max_log_size_bytes, | ||
| 504 | ++ TaskQueueBase* absl_nonnull worker_queue); | ||
| 505 | ++#endif | ||
| 506 | + }; | ||
| 507 | + | ||
| 508 | + } // namespace webrtc | ||
| 509 | +diff --git a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 510 | +index 63929af..658bcee 100644 | ||
| 511 | +--- a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 512 | ++++ b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc | ||
| 513 | +@@ -16,6 +16,7 @@ | ||
| 514 | + | ||
| 515 | + namespace webrtc { | ||
| 516 | + | ||
| 517 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 518 | + absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create( | ||
| 519 | + FileWrapper file, | ||
| 520 | + int64_t max_log_size_bytes, | ||
| 521 | +@@ -37,3 +38,27 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create( | ||
| 522 | + return nullptr; | ||
| 523 | + } | ||
| 524 | + } // namespace webrtc | ||
| 525 | ++#else | ||
| 526 | ++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 527 | ++ FileWrapper file, | ||
| 528 | ++ int64_t max_log_size_bytes, | ||
| 529 | ++ TaskQueueBase* absl_nonnull worker_queue) { | ||
| 530 | ++ return nullptr; | ||
| 531 | ++} | ||
| 532 | ++ | ||
| 533 | ++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 534 | ++ absl::string_view file_name, | ||
| 535 | ++ int64_t max_log_size_bytes, | ||
| 536 | ++ TaskQueueBase* absl_nonnull worker_queue) { | ||
| 537 | ++ return nullptr; | ||
| 538 | ++} | ||
| 539 | ++ | ||
| 540 | ++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create( | ||
| 541 | ++ FILE* absl_nonnull handle, | ||
| 542 | ++ int64_t max_log_size_bytes, | ||
| 543 | ++ TaskQueueBase* absl_nonnull worker_queue) { | ||
| 544 | ++ return nullptr; | ||
| 545 | ++} | ||
| 546 | ++} // namespace webrtc | ||
| 547 | ++ | ||
| 548 | ++#endif | ||
| 549 | +diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 550 | +index a1cba51..1dfe26d 100644 | ||
| 551 | +--- a/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 552 | ++++ b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
| 553 | +@@ -19,6 +19,7 @@ | ||
| 554 | + #include <type_traits> | ||
| 555 | + #include <utility> | ||
| 556 | + | ||
| 557 | ++#include "absl/base/config.h" | ||
| 558 | + #include "absl/base/nullability.h" | ||
| 559 | + #include "absl/strings/match.h" | ||
| 560 | + #include "absl/strings/string_view.h" | ||
| 561 | +@@ -1787,7 +1788,11 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() { | ||
| 562 | + bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 563 | + absl::string_view file_name, | ||
| 564 | + int64_t max_log_size_bytes, | ||
| 565 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 566 | + absl::Nonnull<TaskQueueBase*> worker_queue) { | ||
| 567 | ++#else | ||
| 568 | ++ TaskQueueBase* absl_nonnull worker_queue) { | ||
| 569 | ++#endif | ||
| 570 | + std::unique_ptr<AecDump> aec_dump = | ||
| 571 | + AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue); | ||
| 572 | + if (!aec_dump) { | ||
| 573 | +@@ -1801,7 +1806,11 @@ bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 574 | + bool AudioProcessingImpl::CreateAndAttachAecDump( | ||
| 575 | + FILE* handle, | ||
| 576 | + int64_t max_log_size_bytes, | ||
| 577 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 578 | + absl::Nonnull<TaskQueueBase*> worker_queue) { | ||
| 579 | ++#else | ||
| 580 | ++ TaskQueueBase* absl_nonnull worker_queue) { | ||
| 581 | ++#endif | ||
| 582 | + std::unique_ptr<AecDump> aec_dump = | ||
| 583 | + AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue); | ||
| 584 | + if (!aec_dump) { | ||
| 585 | +diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 586 | +index ecdc055..51a2bfb 100644 | ||
| 587 | +--- a/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 588 | ++++ b/webrtc/modules/audio_processing/audio_processing_impl.h | ||
| 589 | +@@ -20,6 +20,7 @@ | ||
| 590 | + #include <string> | ||
| 591 | + #include <vector> | ||
| 592 | + | ||
| 593 | ++#include "absl/base/config.h" | ||
| 594 | + #include "absl/base/nullability.h" | ||
| 595 | + #include "absl/strings/string_view.h" | ||
| 596 | + #include "api/array_view.h" | ||
| 597 | +@@ -74,11 +75,19 @@ class AudioProcessingImpl : public AudioProcessing { | ||
| 598 | + bool CreateAndAttachAecDump( | ||
| 599 | + absl::string_view file_name, | ||
| 600 | + int64_t max_log_size_bytes, | ||
| 601 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 602 | + absl::Nonnull<TaskQueueBase*> worker_queue) override; | ||
| 603 | ++#else | ||
| 604 | ++ TaskQueueBase* absl_nonnull worker_queue) override; | ||
| 605 | ++#endif | ||
| 606 | + bool CreateAndAttachAecDump( | ||
| 607 | + FILE* handle, | ||
| 608 | + int64_t max_log_size_bytes, | ||
| 609 | ++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512 | ||
| 610 | + absl::Nonnull<TaskQueueBase*> worker_queue) override; | ||
| 611 | ++#else | ||
| 612 | ++ TaskQueueBase* absl_nonnull worker_queue) override; | ||
| 613 | ++#endif | ||
| 614 | + // TODO(webrtc:5298) Deprecated variant. | ||
| 615 | + void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override; | ||
| 616 | + void DetachAecDump() override; | ||
| 617 | -- | ||
| 618 | GitLab | ||
| 619 | |||
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2_2.1.bb b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2_2.1.bb index 9aab57a089..4d076630aa 100644 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2_2.1.bb +++ b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-2_2.1.bb | |||
| @@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2" | |||
| 11 | SRC_URI = " \ | 11 | SRC_URI = " \ |
| 12 | http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${PV}.tar.xz \ | 12 | http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${PV}.tar.xz \ |
| 13 | file://e9c78dc4712fa6362b0c839ad57b6b46dce1ba83.patch \ | 13 | file://e9c78dc4712fa6362b0c839ad57b6b46dce1ba83.patch \ |
| 14 | file://60.patch \ | ||
| 14 | " | 15 | " |
| 15 | SRC_URI[sha256sum] = "ae9302824b2038d394f10213cab05312c564a038434269f11dbf68f511f9f9fe" | 16 | SRC_URI[sha256sum] = "ae9302824b2038d394f10213cab05312c564a038434269f11dbf68f511f9f9fe" |
| 16 | S = "${UNPACKDIR}/webrtc-audio-processing-${PV}" | 17 | S = "${UNPACKDIR}/webrtc-audio-processing-${PV}" |
