mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-10-22 15:03:59 +02:00
webrtc-audio-processing-2: Fix build with abseil-cpp 202508
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
cb93879fbb
commit
547e283a28
|
@ -0,0 +1,619 @@
|
|||
From c8896801dfbfe03b56f85c1533abc077ff74a533 Mon Sep 17 00:00:00 2001
|
||||
From: Reilly Brogan <reilly@reillybrogan.com>
|
||||
Date: Tue, 19 Aug 2025 14:47:03 -0500
|
||||
Subject: [PATCH 1/2] Fix build with abseil-cpp 202508
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/60]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
webrtc/api/audio/audio_processing.h | 12 +++++++++
|
||||
webrtc/api/make_ref_counted.h | 13 ++++++++++
|
||||
webrtc/api/scoped_refptr.h | 15 +++++++++++
|
||||
.../aec_dump/aec_dump_factory.h | 15 +++++++++++
|
||||
.../aec_dump/null_aec_dump_factory.cc | 25 +++++++++++++++++++
|
||||
.../audio_processing/audio_processing_impl.cc | 9 +++++++
|
||||
.../audio_processing/audio_processing_impl.h | 9 +++++++
|
||||
7 files changed, 98 insertions(+)
|
||||
|
||||
diff --git a/webrtc/api/audio/audio_processing.h b/webrtc/api/audio/audio_processing.h
|
||||
index dca75f2..4580ba9 100644
|
||||
--- a/webrtc/api/audio/audio_processing.h
|
||||
+++ b/webrtc/api/audio/audio_processing.h
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
+#include "absl/base/config.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/array_view.h"
|
||||
@@ -632,6 +633,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
|
||||
// return value of true indicates that the file has been
|
||||
// sucessfully opened, while a value of false indicates that
|
||||
// opening the file failed.
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
virtual bool CreateAndAttachAecDump(
|
||||
absl::string_view file_name,
|
||||
int64_t max_log_size_bytes,
|
||||
@@ -640,6 +642,16 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
|
||||
absl::Nonnull<FILE*> handle,
|
||||
int64_t max_log_size_bytes,
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
|
||||
+#else
|
||||
+ virtual bool CreateAndAttachAecDump(absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull
|
||||
+ worker_queue) = 0;
|
||||
+ virtual bool CreateAndAttachAecDump(FILE* absl_nonnull handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull
|
||||
+ worker_queue) = 0;
|
||||
+#endif
|
||||
|
||||
// TODO(webrtc:5298) Deprecated variant.
|
||||
// Attaches provided webrtc::AecDump for recording debugging
|
||||
diff --git a/webrtc/api/make_ref_counted.h b/webrtc/api/make_ref_counted.h
|
||||
index b5f4e99..080023a 100644
|
||||
--- a/webrtc/api/make_ref_counted.h
|
||||
+++ b/webrtc/api/make_ref_counted.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
+#include "absl/base/config.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "api/ref_count.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
@@ -86,7 +87,11 @@ template <
|
||||
typename std::enable_if<std::is_convertible_v<T*, RefCountInterface*> &&
|
||||
std::is_abstract_v<T>,
|
||||
T>::type* = nullptr>
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
|
||||
+#else
|
||||
+absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
|
||||
+#endif
|
||||
return scoped_refptr<T>(new RefCountedObject<T>(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
@@ -99,7 +104,11 @@ template <
|
||||
!std::is_convertible_v<T*, RefCountInterface*> &&
|
||||
webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
|
||||
T>::type* = nullptr>
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
|
||||
+#else
|
||||
+absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
|
||||
+#endif
|
||||
return scoped_refptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
@@ -113,7 +122,11 @@ template <
|
||||
!webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
|
||||
|
||||
T>::type* = nullptr>
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<scoped_refptr<FinalRefCountedObject<T>>> make_ref_counted(
|
||||
+#else
|
||||
+absl_nonnull scoped_refptr<FinalRefCountedObject<T>> make_ref_counted(
|
||||
+#endif
|
||||
Args&&... args) {
|
||||
return scoped_refptr<FinalRefCountedObject<T>>(
|
||||
new FinalRefCountedObject<T>(std::forward<Args>(args)...));
|
||||
diff --git a/webrtc/api/scoped_refptr.h b/webrtc/api/scoped_refptr.h
|
||||
index c6fb560..8c441ff 100644
|
||||
--- a/webrtc/api/scoped_refptr.h
|
||||
+++ b/webrtc/api/scoped_refptr.h
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
+#include "absl/base/config.h"
|
||||
#include "absl/base/nullability.h"
|
||||
|
||||
namespace webrtc {
|
||||
@@ -73,13 +74,19 @@ namespace webrtc {
|
||||
template <class T>
|
||||
class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
public:
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
using absl_nullability_compatible = void;
|
||||
+#endif
|
||||
using element_type = T;
|
||||
|
||||
scoped_refptr() : ptr_(nullptr) {}
|
||||
scoped_refptr(std::nullptr_t) : ptr_(nullptr) {} // NOLINT(runtime/explicit)
|
||||
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
explicit scoped_refptr(absl::Nullable<T*> p) : ptr_(p) {
|
||||
+#else
|
||||
+ explicit scoped_refptr(T* absl_nullable p) : ptr_(p) {
|
||||
+#endif
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
@@ -122,7 +129,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
scoped_refptr<T>& operator=(absl::Nullable<T*> p) {
|
||||
+#else
|
||||
+ scoped_refptr<T>& operator=(T* absl_nullable p) {
|
||||
+#endif
|
||||
// AddRef first so that self assignment should work
|
||||
if (p)
|
||||
p->AddRef();
|
||||
@@ -152,7 +163,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
return *this;
|
||||
}
|
||||
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
void swap(absl::Nonnull<T**> pp) noexcept {
|
||||
+#else
|
||||
+ void swap(T** absl_nonnull pp) noexcept {
|
||||
+#endif
|
||||
T* p = ptr_;
|
||||
ptr_ = *pp;
|
||||
*pp = p;
|
||||
diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
index 0d258a9..14d8b39 100644
|
||||
--- a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
+++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
@@ -29,6 +29,7 @@ class RTC_EXPORT AecDumpFactory {
|
||||
// The AecDump takes responsibility for `handle` and closes it in the
|
||||
// destructor. A non-null return value indicates that the file has been
|
||||
// sucessfully opened.
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
static absl::Nullable<std::unique_ptr<AecDump>> Create(
|
||||
FileWrapper file,
|
||||
int64_t max_log_size_bytes,
|
||||
@@ -41,6 +42,20 @@ class RTC_EXPORT AecDumpFactory {
|
||||
absl::Nonnull<FILE*> handle,
|
||||
int64_t max_log_size_bytes,
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue);
|
||||
+#else
|
||||
+ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
+ FileWrapper file,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue);
|
||||
+ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
+ absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue);
|
||||
+ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
+ FILE* absl_nonnull handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue);
|
||||
+#endif
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
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
|
||||
index 63929af..658bcee 100644
|
||||
--- a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
|
||||
+++ b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
|
||||
FileWrapper file,
|
||||
int64_t max_log_size_bytes,
|
||||
@@ -37,3 +38,27 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace webrtc
|
||||
+#else
|
||||
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
+ FileWrapper file,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
+ return nullptr;
|
||||
+}
|
||||
+
|
||||
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
+ absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
+ return nullptr;
|
||||
+}
|
||||
+
|
||||
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
+ FILE* absl_nonnull handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
+ return nullptr;
|
||||
+}
|
||||
+} // namespace webrtc
|
||||
+
|
||||
+#endif
|
||||
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
index a1cba51..1dfe26d 100644
|
||||
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
+#include "absl/base/config.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
@@ -1787,7 +1788,11 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() {
|
||||
bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
absl::string_view file_name,
|
||||
int64_t max_log_size_bytes,
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue) {
|
||||
+#else
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
+#endif
|
||||
std::unique_ptr<AecDump> aec_dump =
|
||||
AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue);
|
||||
if (!aec_dump) {
|
||||
@@ -1801,7 +1806,11 @@ bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
FILE* handle,
|
||||
int64_t max_log_size_bytes,
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue) {
|
||||
+#else
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
+#endif
|
||||
std::unique_ptr<AecDump> aec_dump =
|
||||
AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue);
|
||||
if (!aec_dump) {
|
||||
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
index ecdc055..51a2bfb 100644
|
||||
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+#include "absl/base/config.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "api/array_view.h"
|
||||
@@ -74,11 +75,19 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
bool CreateAndAttachAecDump(
|
||||
absl::string_view file_name,
|
||||
int64_t max_log_size_bytes,
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue) override;
|
||||
+#else
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) override;
|
||||
+#endif
|
||||
bool CreateAndAttachAecDump(
|
||||
FILE* handle,
|
||||
int64_t max_log_size_bytes,
|
||||
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
absl::Nonnull<TaskQueueBase*> worker_queue) override;
|
||||
+#else
|
||||
+ TaskQueueBase* absl_nonnull worker_queue) override;
|
||||
+#endif
|
||||
// TODO(webrtc:5298) Deprecated variant.
|
||||
void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override;
|
||||
void DetachAecDump() override;
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From bc838790eeb6066d30f019c2a3516bd2b824a5c8 Mon Sep 17 00:00:00 2001
|
||||
From: Reilly Brogan <reilly@reillybrogan.com>
|
||||
Date: Tue, 19 Aug 2025 15:25:51 -0500
|
||||
Subject: [PATCH 2/2] patches: Track abseil-cpp 202508 support patch
|
||||
|
||||
---
|
||||
...001-Fix-build-with-abseil-cpp-202508.patch | 297 ++++++++++++++++++
|
||||
1 file changed, 297 insertions(+)
|
||||
create mode 100644 patches/0001-Fix-build-with-abseil-cpp-202508.patch
|
||||
|
||||
diff --git a/patches/0001-Fix-build-with-abseil-cpp-202508.patch b/patches/0001-Fix-build-with-abseil-cpp-202508.patch
|
||||
new file mode 100644
|
||||
index 0000000..06c3794
|
||||
--- /dev/null
|
||||
+++ b/patches/0001-Fix-build-with-abseil-cpp-202508.patch
|
||||
@@ -0,0 +1,297 @@
|
||||
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
+From: Reilly Brogan <reilly@reillybrogan.com>
|
||||
+Date: Tue, 19 Aug 2025 14:47:03 -0500
|
||||
+Subject: [PATCH] Fix build with abseil-cpp 202508
|
||||
+
|
||||
+---
|
||||
+ webrtc/api/audio/audio_processing.h | 12 +++++++++
|
||||
+ webrtc/api/make_ref_counted.h | 13 ++++++++++
|
||||
+ webrtc/api/scoped_refptr.h | 15 +++++++++++
|
||||
+ .../aec_dump/aec_dump_factory.h | 15 +++++++++++
|
||||
+ .../aec_dump/null_aec_dump_factory.cc | 25 +++++++++++++++++++
|
||||
+ .../audio_processing/audio_processing_impl.cc | 9 +++++++
|
||||
+ .../audio_processing/audio_processing_impl.h | 9 +++++++
|
||||
+ 7 files changed, 98 insertions(+)
|
||||
+
|
||||
+diff --git a/webrtc/api/audio/audio_processing.h b/webrtc/api/audio/audio_processing.h
|
||||
+index dca75f2..4580ba9 100644
|
||||
+--- a/webrtc/api/audio/audio_processing.h
|
||||
++++ b/webrtc/api/audio/audio_processing.h
|
||||
+@@ -28,6 +28,7 @@
|
||||
+ #include <string>
|
||||
+ #include <utility>
|
||||
+
|
||||
++#include "absl/base/config.h"
|
||||
+ #include "absl/base/nullability.h"
|
||||
+ #include "absl/strings/string_view.h"
|
||||
+ #include "api/array_view.h"
|
||||
+@@ -632,6 +633,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
|
||||
+ // return value of true indicates that the file has been
|
||||
+ // sucessfully opened, while a value of false indicates that
|
||||
+ // opening the file failed.
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ virtual bool CreateAndAttachAecDump(
|
||||
+ absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+@@ -640,6 +642,16 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
|
||||
+ absl::Nonnull<FILE*> handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
|
||||
++#else
|
||||
++ virtual bool CreateAndAttachAecDump(absl::string_view file_name,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull
|
||||
++ worker_queue) = 0;
|
||||
++ virtual bool CreateAndAttachAecDump(FILE* absl_nonnull handle,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull
|
||||
++ worker_queue) = 0;
|
||||
++#endif
|
||||
+
|
||||
+ // TODO(webrtc:5298) Deprecated variant.
|
||||
+ // Attaches provided webrtc::AecDump for recording debugging
|
||||
+diff --git a/webrtc/api/make_ref_counted.h b/webrtc/api/make_ref_counted.h
|
||||
+index b5f4e99..080023a 100644
|
||||
+--- a/webrtc/api/make_ref_counted.h
|
||||
++++ b/webrtc/api/make_ref_counted.h
|
||||
+@@ -13,6 +13,7 @@
|
||||
+ #include <type_traits>
|
||||
+ #include <utility>
|
||||
+
|
||||
++#include "absl/base/config.h"
|
||||
+ #include "absl/base/nullability.h"
|
||||
+ #include "api/ref_count.h"
|
||||
+ #include "api/scoped_refptr.h"
|
||||
+@@ -86,7 +87,11 @@ template <
|
||||
+ typename std::enable_if<std::is_convertible_v<T*, RefCountInterface*> &&
|
||||
+ std::is_abstract_v<T>,
|
||||
+ T>::type* = nullptr>
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
|
||||
++#else
|
||||
++absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
|
||||
++#endif
|
||||
+ return scoped_refptr<T>(new RefCountedObject<T>(std::forward<Args>(args)...));
|
||||
+ }
|
||||
+
|
||||
+@@ -99,7 +104,11 @@ template <
|
||||
+ !std::is_convertible_v<T*, RefCountInterface*> &&
|
||||
+ webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
|
||||
+ T>::type* = nullptr>
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
|
||||
++#else
|
||||
++absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
|
||||
++#endif
|
||||
+ return scoped_refptr<T>(new T(std::forward<Args>(args)...));
|
||||
+ }
|
||||
+
|
||||
+@@ -113,7 +122,11 @@ template <
|
||||
+ !webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
|
||||
+
|
||||
+ T>::type* = nullptr>
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<scoped_refptr<FinalRefCountedObject<T>>> make_ref_counted(
|
||||
++#else
|
||||
++absl_nonnull scoped_refptr<FinalRefCountedObject<T>> make_ref_counted(
|
||||
++#endif
|
||||
+ Args&&... args) {
|
||||
+ return scoped_refptr<FinalRefCountedObject<T>>(
|
||||
+ new FinalRefCountedObject<T>(std::forward<Args>(args)...));
|
||||
+diff --git a/webrtc/api/scoped_refptr.h b/webrtc/api/scoped_refptr.h
|
||||
+index c6fb560..8c441ff 100644
|
||||
+--- a/webrtc/api/scoped_refptr.h
|
||||
++++ b/webrtc/api/scoped_refptr.h
|
||||
+@@ -66,6 +66,7 @@
|
||||
+ #include <cstddef>
|
||||
+ #include <utility>
|
||||
+
|
||||
++#include "absl/base/config.h"
|
||||
+ #include "absl/base/nullability.h"
|
||||
+
|
||||
+ namespace webrtc {
|
||||
+@@ -73,13 +74,19 @@ namespace webrtc {
|
||||
+ template <class T>
|
||||
+ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
+ public:
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ using absl_nullability_compatible = void;
|
||||
++#endif
|
||||
+ using element_type = T;
|
||||
+
|
||||
+ scoped_refptr() : ptr_(nullptr) {}
|
||||
+ scoped_refptr(std::nullptr_t) : ptr_(nullptr) {} // NOLINT(runtime/explicit)
|
||||
+
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ explicit scoped_refptr(absl::Nullable<T*> p) : ptr_(p) {
|
||||
++#else
|
||||
++ explicit scoped_refptr(T* absl_nullable p) : ptr_(p) {
|
||||
++#endif
|
||||
+ if (ptr_)
|
||||
+ ptr_->AddRef();
|
||||
+ }
|
||||
+@@ -122,7 +129,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
+ return retVal;
|
||||
+ }
|
||||
+
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ scoped_refptr<T>& operator=(absl::Nullable<T*> p) {
|
||||
++#else
|
||||
++ scoped_refptr<T>& operator=(T* absl_nullable p) {
|
||||
++#endif
|
||||
+ // AddRef first so that self assignment should work
|
||||
+ if (p)
|
||||
+ p->AddRef();
|
||||
+@@ -152,7 +163,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
|
||||
+ return *this;
|
||||
+ }
|
||||
+
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ void swap(absl::Nonnull<T**> pp) noexcept {
|
||||
++#else
|
||||
++ void swap(T** absl_nonnull pp) noexcept {
|
||||
++#endif
|
||||
+ T* p = ptr_;
|
||||
+ ptr_ = *pp;
|
||||
+ *pp = p;
|
||||
+diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
+index 0d258a9..14d8b39 100644
|
||||
+--- a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
++++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
|
||||
+@@ -29,6 +29,7 @@ class RTC_EXPORT AecDumpFactory {
|
||||
+ // The AecDump takes responsibility for `handle` and closes it in the
|
||||
+ // destructor. A non-null return value indicates that the file has been
|
||||
+ // sucessfully opened.
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ static absl::Nullable<std::unique_ptr<AecDump>> Create(
|
||||
+ FileWrapper file,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+@@ -41,6 +42,20 @@ class RTC_EXPORT AecDumpFactory {
|
||||
+ absl::Nonnull<FILE*> handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue);
|
||||
++#else
|
||||
++ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
++ FileWrapper file,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue);
|
||||
++ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
++ absl::string_view file_name,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue);
|
||||
++ static absl_nullable std::unique_ptr<AecDump> Create(
|
||||
++ FILE* absl_nonnull handle,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue);
|
||||
++#endif
|
||||
+ };
|
||||
+
|
||||
+ } // namespace webrtc
|
||||
+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
|
||||
+index 63929af..658bcee 100644
|
||||
+--- a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
|
||||
++++ b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
|
||||
+@@ -16,6 +16,7 @@
|
||||
+
|
||||
+ namespace webrtc {
|
||||
+
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
|
||||
+ FileWrapper file,
|
||||
+ int64_t max_log_size_bytes,
|
||||
+@@ -37,3 +38,27 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ } // namespace webrtc
|
||||
++#else
|
||||
++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
++ FileWrapper file,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
++ return nullptr;
|
||||
++}
|
||||
++
|
||||
++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
++ absl::string_view file_name,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
++ return nullptr;
|
||||
++}
|
||||
++
|
||||
++absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
|
||||
++ FILE* absl_nonnull handle,
|
||||
++ int64_t max_log_size_bytes,
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
++ return nullptr;
|
||||
++}
|
||||
++} // namespace webrtc
|
||||
++
|
||||
++#endif
|
||||
+diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
+index a1cba51..1dfe26d 100644
|
||||
+--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
++++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
|
||||
+@@ -19,6 +19,7 @@
|
||||
+ #include <type_traits>
|
||||
+ #include <utility>
|
||||
+
|
||||
++#include "absl/base/config.h"
|
||||
+ #include "absl/base/nullability.h"
|
||||
+ #include "absl/strings/match.h"
|
||||
+ #include "absl/strings/string_view.h"
|
||||
+@@ -1787,7 +1788,11 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() {
|
||||
+ bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
+ absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue) {
|
||||
++#else
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
++#endif
|
||||
+ std::unique_ptr<AecDump> aec_dump =
|
||||
+ AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue);
|
||||
+ if (!aec_dump) {
|
||||
+@@ -1801,7 +1806,11 @@ bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
+ bool AudioProcessingImpl::CreateAndAttachAecDump(
|
||||
+ FILE* handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue) {
|
||||
++#else
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) {
|
||||
++#endif
|
||||
+ std::unique_ptr<AecDump> aec_dump =
|
||||
+ AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue);
|
||||
+ if (!aec_dump) {
|
||||
+diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
+index ecdc055..51a2bfb 100644
|
||||
+--- a/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
++++ b/webrtc/modules/audio_processing/audio_processing_impl.h
|
||||
+@@ -20,6 +20,7 @@
|
||||
+ #include <string>
|
||||
+ #include <vector>
|
||||
+
|
||||
++#include "absl/base/config.h"
|
||||
+ #include "absl/base/nullability.h"
|
||||
+ #include "absl/strings/string_view.h"
|
||||
+ #include "api/array_view.h"
|
||||
+@@ -74,11 +75,19 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
+ bool CreateAndAttachAecDump(
|
||||
+ absl::string_view file_name,
|
||||
+ int64_t max_log_size_bytes,
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue) override;
|
||||
++#else
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) override;
|
||||
++#endif
|
||||
+ bool CreateAndAttachAecDump(
|
||||
+ FILE* handle,
|
||||
+ int64_t max_log_size_bytes,
|
||||
++#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
|
||||
+ absl::Nonnull<TaskQueueBase*> worker_queue) override;
|
||||
++#else
|
||||
++ TaskQueueBase* absl_nonnull worker_queue) override;
|
||||
++#endif
|
||||
+ // TODO(webrtc:5298) Deprecated variant.
|
||||
+ void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override;
|
||||
+ void DetachAecDump() override;
|
||||
--
|
||||
GitLab
|
||||
|
|
@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2"
|
|||
SRC_URI = " \
|
||||
http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${PV}.tar.xz \
|
||||
file://e9c78dc4712fa6362b0c839ad57b6b46dce1ba83.patch \
|
||||
file://60.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "ae9302824b2038d394f10213cab05312c564a038434269f11dbf68f511f9f9fe"
|
||||
S = "${UNPACKDIR}/webrtc-audio-processing-${PV}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user