Ana Guerrero 2025-02-05 11:39:32 +00:00 committed by Git OBS Bridge
commit 64a804a6ab
14 changed files with 102 additions and 433 deletions

View File

@ -3,8 +3,8 @@
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git</param>
<param name="revision">v1.3</param>
<param name="versionformat">1.3</param>
<param name="revision">v2.1</param>
<param name="versionformat">2.1</param>
<!--
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@+git%cd.%h</param>

View File

@ -1,2 +1 @@
libwebrtc-audio-processing-1-3
libwebrtc-audio-coding-1-3
libwebrtc-audio-processing-2-1

View File

@ -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(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;
@@ -76,6 +73,12 @@ size_t WavReader::ReadSamples(size_t num
num_samples_left_to_read -= num_samples_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 num_samples - num_samples_left_to_read;
}
@@ -120,10 +123,17 @@ WavWriter::~WavWriter() {
void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) {
#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
-#error "Need to convert samples to little-endian when writing to WAV file"
-#endif
+ int16_t * le_samples = new int16_t[num_samples];
+ for(size_t idx = 0; idx < num_samples; idx++) {
+ le_samples[idx] = (samples[idx]<<8) | (samples[idx]>>8);
+ }
+ const size_t written =
+ fwrite(le_samples, sizeof(*le_samples), num_samples, file_handle_);
+ delete []le_samples;
+#else
const size_t written =
fwrite(samples, sizeof(*samples), num_samples, file_handle_);
+#endif
RTC_CHECK_EQ(num_samples, written);
num_samples_ += static_cast<uint32_t>(written);
RTC_CHECK(written <= std::numeric_limits<uint32_t>::max() ||
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<char*>(&x), 4);
}
#else
-#error "Write be-to-le conversion functions"
+static inline void WriteLE16(uint16_t* f, uint16_t x) {
+ *f = ((x << 8) & 0xff00) | ( ( x >> 8) & 0x00ff);
+}
+
+static inline void WriteLE32(uint32_t* f, uint32_t x) {
+ *f = ( (x & 0x000000ff) << 24 )
+ | ((x & 0x0000ff00) << 8)
+ | ((x & 0x00ff0000) >> 8)
+ | ((x & 0xff000000) >> 24 );
+}
+
+static inline void WriteFourCC(uint32_t* f, char a, char b, char c, char d) {
+ *f = (static_cast<uint32_t>(a) << 24 )
+ | (static_cast<uint32_t>(b) << 16)
+ | (static_cast<uint32_t>(c) << 8)
+ | (static_cast<uint32_t>(d) );
+}
+
+static inline uint16_t ReadLE16(uint16_t x) {
+ return (( x & 0x00ff) << 8 )| ((x & 0xff00)>>8);
+}
+
+static inline uint32_t ReadLE32(uint32_t x) {
+ return ( (x & 0x000000ff) << 24 )
+ | ( (x & 0x0000ff00) << 8 )
+ | ( (x & 0x00ff0000) >> 8)
+ | ( (x & 0xff000000) >> 24 );
+}
+
+static inline std::string ReadFourCC(uint32_t x) {
+ x = ReadLE32(x);
+ return std::string(reinterpret_cast<char*>(&x), 4);
+}
#endif
static inline uint32_t RiffChunkSize(uint32_t bytes_in_payload) {

View File

@ -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))

View File

@ -1,60 +1,48 @@
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
Index: webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc
@@ -39,6 +39,7 @@ float GetLevel(const VadLevelAnalyzer::R
return vad_level.rms_dbfs;
break;
case LevelEstimatorType::kPeak:
--- webrtc-audio-processing-2.1.orig/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
+++ webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
@@ -58,6 +58,7 @@ rtc::FunctionView<float(float)> GetActiv
case ActivationFunction::kTansigApproximated:
return ::rnnoise::TansigApproximated;
case ActivationFunction::kSigmoidApproximated:
+ default:
return vad_level.peak_dbfs;
break;
return ::rnnoise::SigmoidApproximated;
}
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc
}
Index: webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -112,6 +112,7 @@ GainControl::Mode Agc1ConfigModeToInterf
case Agc1Config::kAdaptiveDigital:
return GainControl::kAdaptiveDigital;
case Agc1Config::kFixedDigital:
+ default:
return GainControl::kFixedDigital;
--- webrtc-audio-processing-2.1.orig/webrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
+++ webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
@@ -46,6 +46,7 @@ constexpr absl::string_view MetricNamePr
case InputVolumeType::kApplied:
return "WebRTC.Audio.Apm.AppliedInputVolume.";
case InputVolumeType::kRecommended:
+ default:
return "WebRTC.Audio.Apm.RecommendedInputVolume.";
}
}
@@ -1852,6 +1853,7 @@ void AudioProcessingImpl::InitializeNois
return NsConfig::SuppressionLevel::k21dB;
default:
RTC_NOTREACHED();
+ return NsConfig::SuppressionLevel::k21dB; // Just to keep the compiler happy
}
};
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/include/audio_processing.cc
Index: webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/clipping_predictor.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/include/audio_processing.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/include/audio_processing.cc
@@ -26,6 +26,7 @@ std::string NoiseSuppressionLevelToStrin
case AudioProcessing::Config::NoiseSuppression::Level::kHigh:
return "High";
case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh:
--- webrtc-audio-processing-2.1.orig/webrtc/modules/audio_processing/agc2/clipping_predictor.cc
+++ webrtc-audio-processing-2.1/webrtc/modules/audio_processing/agc2/clipping_predictor.cc
@@ -373,6 +373,7 @@ std::unique_ptr<ClippingPredictor> Creat
config.reference_window_delay, config.clipping_threshold,
/*adaptive_step_estimation=*/true);
case ClippingPredictorMode::kFixedStepClippingPeakPrediction:
+ default:
return "VeryHigh";
}
}
@@ -38,6 +39,7 @@ std::string GainController1ModeToString(
case AudioProcessing::Config::GainController1::Mode::kAdaptiveDigital:
return "AdaptiveDigital";
case AudioProcessing::Config::GainController1::Mode::kFixedDigital:
return std::make_unique<ClippingPeakPredictor>(
num_channels, config.window_length, config.reference_window_length,
config.reference_window_delay, config.clipping_threshold,
Index: webrtc-audio-processing-2.1/webrtc/modules/audio_processing/audio_processing_impl.cc
===================================================================
--- webrtc-audio-processing-2.1.orig/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ webrtc-audio-processing-2.1/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -165,6 +165,7 @@ int AudioFormatValidityToErrorCode(Audio
case AudioFormatValidity::kInvalidSampleRate:
return AudioProcessing::kBadSampleRateError;
case AudioFormatValidity::kInvalidChannelCount:
+ default:
return "FixedDigital";
return AudioProcessing::kBadNumberChannelsError;
}
}
@@ -48,6 +50,7 @@ std::string GainController2LevelEstimato
case AudioProcessing::Config::GainController2::LevelEstimator::kRms:
return "Rms";
case AudioProcessing::Config::GainController2::LevelEstimator::kPeak:
+ default:
return "Peak";
}
}
RTC_DCHECK(false);

View File

@ -1,126 +0,0 @@
Index: webrtc-audio-processing-1.3/webrtc/third_party/pffft/src/pffft.c
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/third_party/pffft/src/pffft.c
+++ webrtc-audio-processing-1.3/webrtc/third_party/pffft/src/pffft.c
@@ -131,7 +131,7 @@ inline v4sf ld_ps1(const float *p) { v4s
/*
SSE1 support macros
*/
-#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || defined(_M_IX86))
+#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || defined(_M_IX86)) && defined(__SSE2__)
#include <xmmintrin.h>
typedef __m128 v4sf;
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter.cc
@@ -88,6 +88,7 @@ void ComputeFrequencyResponse_Neon(
#if defined(WEBRTC_ARCH_X86_FAMILY)
// Computes and stores the frequency response of the filter.
+__attribute__((target("sse2")))
void ComputeFrequencyResponse_Sse2(
size_t num_partitions,
const std::vector<std::vector<FftData>>& H,
@@ -207,9 +208,10 @@ void AdaptPartitions_Neon(const RenderBu
} while (p < lim2);
}
#endif
-
+
#if defined(WEBRTC_ARCH_X86_FAMILY)
// Adapts the filter partitions. (SSE2 variant)
+__attribute__((target("sse2")))
void AdaptPartitions_Sse2(const RenderBuffer& render_buffer,
const FftData& G,
size_t num_partitions,
@@ -375,6 +377,7 @@ void ApplyFilter_Neon(const RenderBuffer
#if defined(WEBRTC_ARCH_X86_FAMILY)
// Produces the filter output (SSE2 variant).
+__attribute__((target("sse2")))
void ApplyFilter_Sse2(const RenderBuffer& render_buffer,
size_t num_partitions,
const std::vector<std::vector<FftData>>& H,
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/matched_filter.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/matched_filter.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/matched_filter.cc
@@ -143,7 +143,7 @@ void MatchedFilterCore_NEON(size_t x_sta
#endif
#if defined(WEBRTC_ARCH_X86_FAMILY)
-
+__attribute__((target("sse2")))
void MatchedFilterCore_SSE2(size_t x_start_index,
float x2_sum_threshold,
float smoothing,
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/fft_data.h
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/fft_data.h
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/fft_data.h
@@ -48,7 +48,7 @@ struct FftData {
rtc::ArrayView<float> power_spectrum) const {
RTC_DCHECK_EQ(kFftLengthBy2Plus1, power_spectrum.size());
switch (optimization) {
-#if defined(WEBRTC_ARCH_X86_FAMILY)
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
case Aec3Optimization::kSse2: {
constexpr int kNumFourBinBands = kFftLengthBy2 / 4;
constexpr int kLimit = kNumFourBinBands * 4;
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/vector_math.h
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/vector_math.h
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/vector_math.h
@@ -43,7 +43,7 @@ class VectorMath {
void SqrtAVX2(rtc::ArrayView<float> x);
void Sqrt(rtc::ArrayView<float> x) {
switch (optimization_) {
-#if defined(WEBRTC_ARCH_X86_FAMILY)
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
case Aec3Optimization::kSse2: {
const int x_size = static_cast<int>(x.size());
const int vector_limit = x_size >> 2;
@@ -123,7 +123,7 @@ class VectorMath {
RTC_DCHECK_EQ(z.size(), x.size());
RTC_DCHECK_EQ(z.size(), y.size());
switch (optimization_) {
-#if defined(WEBRTC_ARCH_X86_FAMILY)
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
case Aec3Optimization::kSse2: {
const int x_size = static_cast<int>(x.size());
const int vector_limit = x_size >> 2;
@@ -173,7 +173,7 @@ class VectorMath {
void Accumulate(rtc::ArrayView<const float> x, rtc::ArrayView<float> z) {
RTC_DCHECK_EQ(z.size(), x.size());
switch (optimization_) {
-#if defined(WEBRTC_ARCH_X86_FAMILY)
+#if defined(WEBRTC_ARCH_X86_FAMILY) && defined(__SSE2__)
case Aec3Optimization::kSse2: {
const int x_size = static_cast<int>(x.size());
const int vector_limit = x_size >> 2;
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/rnn_vad/rnn.cc
@@ -229,6 +229,7 @@ void ComputeFullyConnectedLayerOutput(
#if defined(WEBRTC_ARCH_X86_FAMILY)
// Fully connected layer SSE2 implementation.
+__attribute__((target("sse2")))
void ComputeFullyConnectedLayerOutputSse2(
size_t input_size,
size_t output_size,
Index: webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
===================================================================
--- webrtc-audio-processing-1.3.orig/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
+++ webrtc-audio-processing-1.3/webrtc/modules/audio_processing/aec3/adaptive_fir_filter_erl.cc
@@ -57,6 +57,7 @@ void ErlComputer_NEON(
#if defined(WEBRTC_ARCH_X86_FAMILY)
// Computes and stores the echo return loss estimate of the filter, which is the
// sum of the partition frequency responses.
+__attribute__((target("sse2")))
void ErlComputer_SSE2(
const std::vector<std::array<float, kFftLengthBy2Plus1>>& H2,
rtc::ArrayView<float> erl) {

View File

@ -1,12 +0,0 @@
Index: webrtc-audio-processing-1.3/meson.build
===================================================================
--- webrtc-audio-processing-1.3.orig/meson.build
+++ webrtc-audio-processing-1.3/meson.build
@@ -1,6 +1,6 @@
project('webrtc-audio-processing', 'c', 'cpp',
version : '1.3',
- meson_version : '>= 0.63',
+ meson_version : '>= 0.59.4',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized',
'c_std=c11',

BIN
webrtc-audio-processing-1.3.obscpio (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea446ba793ebb2f66a3f045e42b5c71863aedf954ac781b47051392884e2d757
size 4075020

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Fri Jan 31 10:21:07 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 2.1:
* Build-system fixups to install more headers
* add a missing absl dependency
* forward port some missing patches to fix Windows builds.
- Update to version 2.0:
* Bump to code from WebRTC M131 version.
* Minor (breaking) API changes upstream
* Various improvements to the AEC implementation
* Transient suppression is removed
* ExperimentalAgc and ExperimentalNs are removed
* iSAC and the webrtc-audio-coding library were removed
* abseil-cpp dependency bumped to 20240722
* NEON runtime detection dropped following upstream
* Fixes for building on i686 and MIPS
* Support for BSDs is added
* Other build-system cleanups
* Patches to upstream are now also tracked in patches/
- Do not generate libwebrtc-audio-coding-* subpackages
since the library was removed by upstream.
- Drop patches that aren't needed anymore:
* big_endian_support.patch
* big_endian_support_2.patch
* fix-i586.patch
* reduce-meson-dep.patch
* webrtc-ppc64.patch
* webrtc-s390x.patch
- Rebase patch to fix build with the new sources:
* fix-build.patch
-------------------------------------------------------------------
Tue Feb 20 15:14:05 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,4 +1,4 @@
name: webrtc-audio-processing
version: 1.3
mtime: 1693927187
commit: 8e258a1933d405073c9e6465628a69ac7d2a1f13
version: 2.1
mtime: 1737585138
commit: 846fe90a289f58b7c9303a635142aa2c7caa93e5

View File

@ -2,7 +2,7 @@
#
# spec file for package webrtc-audio-processing
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
@ -18,11 +18,12 @@
#
%define pkg_soname 1-3
%define soname 3
%define major_version 2
%define soname 1
%define pkg_soname %{major_version}-%{soname}
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: webrtc-audio-processing
Version: 1.3
Version: 2.1
Release: 0
Summary: Real-Time Communication Library for Web Browsers
License: BSD-3-Clause
@ -32,16 +33,6 @@ Source: webrtc-audio-processing-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM fix-build.patch alarrosa@suse.com -- Fix a number of "control reaches end of non-void function" errors
Patch0: fix-build.patch
# PATCH-FIX-UPSTREAN big_endian_support.patch https://bugs.freedesktop.org/show_bug.cgi?id=95738
Patch1: big_endian_support.patch
# PATCH-FIX-UPSTREAN big_endian_support.patch https://bugs.freedesktop.org/show_bug.cgi?id=95738
Patch2: big_endian_support_2.patch
Patch3: fix-i586.patch
# PATCH-FIX-OPENSUSE webrtc-(ppc64|s390x|aarch64).patch
Patch100: webrtc-ppc64.patch
Patch101: webrtc-s390x.patch
# PATCH-FIX-OPENSUSE reduce-meson-dep.patch
Patch102: reduce-meson-dep.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: glibc-devel
@ -50,7 +41,7 @@ BuildRequires: make
BuildRequires: meson >= 0.59.4
BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: cmake(absl)
BuildRequires: cmake(absl) >= 20240722
ExcludeArch: s390 s390x ppc64
%description
@ -95,51 +86,9 @@ components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-%{pkg_soname}
Summary: Real-Time Communication Library for Web Browsers
Group: System/Libraries
%description -n libwebrtc-audio-coding-%{pkg_soname}
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-devel
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-coding-%{pkg_soname} = %{version}
%description -n libwebrtc-audio-coding-devel
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%package -n libwebrtc-audio-coding-devel-static
Summary: Real-Time Communication Library for Web Browsers
Group: Development/Libraries/C and C++
Requires: libwebrtc-audio-coding-devel = %{version}
%description -n libwebrtc-audio-coding-devel-static
WebRTC is an open source project that enables web browsers with Real-Time
Communications (RTC) capabilities via simple Javascript APIs. The WebRTC
components have been optimized to best serve this purpose.
WebRTC implements the W3C's proposal for video conferencing on the web.
%prep
%autosetup -p1 -N
%autosetup -p1
sed -i 's/\r$//' AUTHORS
%patch -P 0 -p1
#%%patch -P 1 -p1
#%%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 100 -p1
%patch -P 101 -p1
%patch -P 102 -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
@ -149,6 +98,14 @@ sed -i 's/\r$//' AUTHORS
-Ddefault_library=both \
-Dc_args="${CFLAGS} ${LDFLAGS}" \
-Dcpp_args="${CXXFLAGS} ${LDFLAGS}" \
%ifarch aarch64
-Dneon=enabled \
%else
-Dneon=disabled \
%endif
%ifarch i586
-Dinline-sse=false \
%endif
%{nil}
%meson_build
@ -159,32 +116,18 @@ find %{buildroot} -type f -name "*.la" -delete -print
%post -n libwebrtc-audio-processing-%{pkg_soname} -p /sbin/ldconfig
%postun -n libwebrtc-audio-processing-%{pkg_soname} -p /sbin/ldconfig
%post -n libwebrtc-audio-coding-%{pkg_soname} -p /sbin/ldconfig
%postun -n libwebrtc-audio-coding-%{pkg_soname} -p /sbin/ldconfig
%files -n libwebrtc-audio-processing-%{pkg_soname}
%license COPYING
%doc AUTHORS NEWS README.md UPDATING.md
%{_libdir}/libwebrtc-audio-processing-1.so.%{soname}*
%{_libdir}/libwebrtc-audio-processing-%{major_version}.so.%{soname}*
%files -n libwebrtc-audio-processing-devel
%{_includedir}/webrtc-audio-processing-1
%{_libdir}/libwebrtc-audio-processing-1.so
%{_libdir}/pkgconfig/webrtc-audio-processing-1.pc
%{_includedir}/webrtc-audio-processing-%{major_version}
%{_libdir}/libwebrtc-audio-processing-%{major_version}.so
%{_libdir}/pkgconfig/webrtc-audio-processing-%{major_version}.pc
%files -n libwebrtc-audio-processing-devel-static
%{_libdir}/libwebrtc-audio-processing-1.a
%files -n libwebrtc-audio-coding-%{pkg_soname}
%license COPYING
%doc AUTHORS NEWS README.md UPDATING.md
%{_libdir}/libwebrtc-audio-coding-1.so.%{soname}*
%files -n libwebrtc-audio-coding-devel
%{_libdir}/libwebrtc-audio-coding-1.so
%{_libdir}/pkgconfig/webrtc-audio-coding-1.pc
%files -n libwebrtc-audio-coding-devel-static
%{_libdir}/libwebrtc-audio-coding-1.a
%{_libdir}/libwebrtc-audio-processing-%{major_version}.a
%changelog

View File

@ -1,26 +0,0 @@
Index: webrtc/typedefs.h
===================================================================
--- a/webrtc/rtc_base/system/arch.h.orig
+++ b/webrtc/rtc_base/system/arch.h
@@ -57,6 +57,15 @@
# #elif defined(__pnacl__)
# #define WEBRTC_ARCH_32_BITS
# #define WEBRTC_ARCH_LITTLE_ENDIAN
#elif defined(__EMSCRIPTEN__)
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__powerpc64__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__powerpc__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_32_BITS
#else
#error Please add support for your architecture in rtc_base/system/arch.h
#endif
# #else
# /* instead of failing, use typical unix defines... */
# #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

View File

@ -1,18 +0,0 @@
--- a/webrtc/rtc_base/system/arch.h.orig
+++ b/webrtc/rtc_base/system/arch.h
@@ -63,6 +63,12 @@
#elif defined(__powerpc__)
#define WEBRTC_ARCH_BIG_ENDIAN
#define WEBRTC_ARCH_32_BITS
+#elif defined(__s390x__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_64_BITS
+#elif defined(__s390__)
+#define WEBRTC_ARCH_BIG_ENDIAN
+#define WEBRTC_ARCH_32_BITS
#else
#error Please add support for your architecture in rtc_base/system/arch.h
#endif
# #else
# /* instead of failing, use typical unix defines... */
# #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__