diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2023-09-17 12:54:34 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-09-18 07:08:54 -0700 |
commit | ce572d3ea02b664beee7912ba917928a18d488f4 (patch) | |
tree | d2ccd8e0cb5b258f1af7670c84446658402189ea /meta-multimedia/recipes-multimedia/webrtc-audio-processing | |
parent | 803e679cf211b4cdc018293ebea64fdbd1e7ed02 (diff) | |
download | meta-openembedded-ce572d3ea02b664beee7912ba917928a18d488f4.tar.gz |
webrtc-audio-processing: Fix build with -Werror=return-type
* apply the work around from:
https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/28
which is still needed for 1.3 version:
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc: In function 'float webrtc::{anonymous}::GetLevel(const webrtc::VadLevelAnalyzer::Result&, LevelEstimatorType)':
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc:45:1: error: control reaches end of non-void function [-Werror=return-type]
45 | }
| ^
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc: In function 'webrtc::GainControl::Mode webrtc::{anonymous}::Agc1ConfigModeToInterfaceMode(webrtc::AudioProcessing::Config::GainController1::Mode)':
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc:117:1: error: control reaches end of non-void function [-Werror=return-type]
117 | }
| ^
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc: In lambda function:
webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc:1853:13: error: control reaches end of non-void function -Werror=return-type]
1853 | default:
| ^~~~~~~
* this can now be dropped from meta-webosose, where it was since:
https://github.com/webosose/meta-webosose/commit/c2a24372e9f792bc900939a6642e64c459073b36#diff-c367f86896c48beb338dac912d3bf03e07d92c8345fa08dc3dcd93093a949c16
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/webrtc-audio-processing')
2 files changed, 98 insertions, 2 deletions
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1/0001-Fix-return-type-errors.patch b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1/0001-Fix-return-type-errors.patch new file mode 100644 index 000000000..37b4db689 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1/0001-Fix-return-type-errors.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | From b6ad4b7086a6487b36d626248322f4c9d5bf420a Mon Sep 17 00:00:00 2001 | ||
2 | From: "thomas.georgec" <thomas.georgec@lge.com> | ||
3 | Date: Sun, 12 Mar 2023 14:28:50 +0530 | ||
4 | Subject: [PATCH] Fix return-type errors | ||
5 | |||
6 | Fix "control reaches end of non-void function" in code when -Werror=return-type | ||
7 | is used. | ||
8 | |||
9 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc: In function 'float webrtc::{anonymous}::GetLevel(const webrtc::VadLevelAnalyzer::Result&, LevelEstimatorType)': | ||
10 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc:45:1: error: control reaches end of non-void function [-Werror=return-type] | ||
11 | 45 | } | ||
12 | | ^ | ||
13 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc: In function 'webrtc::GainControl::Mode webrtc::{anonymous}::Agc1ConfigModeToInterfaceMode(webrtc::AudioProcessing::Config::GainController1::Mode)': | ||
14 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc:117:1: error: control reaches end of non-void function [-Werror=return-type] | ||
15 | 117 | } | ||
16 | | ^ | ||
17 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc: In lambda function: | ||
18 | webrtc-audio-processing-1.3/webrtc/modules/audio_processing/audio_processing_impl.cc:1853:13: error: control reaches end of non-void function -Werror=return-type] | ||
19 | 1853 | default: | ||
20 | | ^~~~~~~ | ||
21 | |||
22 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
23 | --- | ||
24 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/28] | ||
25 | |||
26 | .../audio_processing/agc2/adaptive_mode_level_estimator.cc | 2 ++ | ||
27 | webrtc/modules/audio_processing/audio_processing_impl.cc | 3 +++ | ||
28 | webrtc/modules/audio_processing/include/audio_processing.cc | 6 ++++++ | ||
29 | 3 files changed, 11 insertions(+) | ||
30 | |||
31 | diff --git a/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc b/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc | ||
32 | index f09f63b..9cdf6ca 100644 | ||
33 | --- a/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc | ||
34 | +++ b/webrtc/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc | ||
35 | @@ -42,6 +42,8 @@ float GetLevel(const VadLevelAnalyzer::Result& vad_level, | ||
36 | return vad_level.peak_dbfs; | ||
37 | break; | ||
38 | } | ||
39 | + RTC_NOTREACHED(); | ||
40 | + __builtin_unreachable (); | ||
41 | } | ||
42 | |||
43 | } // namespace | ||
44 | diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
45 | index 67208df..3b8262a 100644 | ||
46 | --- a/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
47 | +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc | ||
48 | @@ -114,6 +114,8 @@ GainControl::Mode Agc1ConfigModeToInterfaceMode( | ||
49 | case Agc1Config::kFixedDigital: | ||
50 | return GainControl::kFixedDigital; | ||
51 | } | ||
52 | + RTC_NOTREACHED(); | ||
53 | + __builtin_unreachable (); | ||
54 | } | ||
55 | |||
56 | // Maximum lengths that frame of samples being passed from the render side to | ||
57 | @@ -1852,6 +1854,7 @@ void AudioProcessingImpl::InitializeNoiseSuppressor() { | ||
58 | return NsConfig::SuppressionLevel::k21dB; | ||
59 | default: | ||
60 | RTC_NOTREACHED(); | ||
61 | + __builtin_unreachable (); | ||
62 | } | ||
63 | }; | ||
64 | |||
65 | diff --git a/webrtc/modules/audio_processing/include/audio_processing.cc b/webrtc/modules/audio_processing/include/audio_processing.cc | ||
66 | index 8854415..cc8752b 100644 | ||
67 | --- a/webrtc/modules/audio_processing/include/audio_processing.cc | ||
68 | +++ b/webrtc/modules/audio_processing/include/audio_processing.cc | ||
69 | @@ -28,6 +28,8 @@ std::string NoiseSuppressionLevelToString( | ||
70 | case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: | ||
71 | return "VeryHigh"; | ||
72 | } | ||
73 | + RTC_NOTREACHED(); | ||
74 | + __builtin_unreachable (); | ||
75 | } | ||
76 | |||
77 | std::string GainController1ModeToString( | ||
78 | @@ -40,6 +42,8 @@ std::string GainController1ModeToString( | ||
79 | case AudioProcessing::Config::GainController1::Mode::kFixedDigital: | ||
80 | return "FixedDigital"; | ||
81 | } | ||
82 | + RTC_NOTREACHED(); | ||
83 | + __builtin_unreachable (); | ||
84 | } | ||
85 | |||
86 | std::string GainController2LevelEstimatorToString( | ||
87 | @@ -50,6 +54,8 @@ std::string GainController2LevelEstimatorToString( | ||
88 | case AudioProcessing::Config::GainController2::LevelEstimator::kPeak: | ||
89 | return "Peak"; | ||
90 | } | ||
91 | + RTC_NOTREACHED(); | ||
92 | + __builtin_unreachable (); | ||
93 | } | ||
94 | |||
95 | int GetDefaultMaxInternalRate() { | ||
diff --git a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1_1.3.bb b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1_1.3.bb index 8d281dad5..c56ca53f8 100644 --- a/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1_1.3.bb +++ b/meta-multimedia/recipes-multimedia/webrtc-audio-processing/webrtc-audio-processing-1_1.3.bb | |||
@@ -9,8 +9,9 @@ LICENSE = "BSD-3-Clause" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=da08a38a32a340c5d91e13ee86a118f2" |
10 | 10 | ||
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://0001-add-missing-header-for-musl.patch \ | 13 | file://0001-add-missing-header-for-musl.patch \ |
14 | file://0001-Fix-return-type-errors.patch \ | ||
14 | " | 15 | " |
15 | SRC_URI[sha256sum] = "2365e93e778d7b61b5d6e02d21c47d97222e9c7deff9e1d0838ad6ec2e86f1b9" | 16 | SRC_URI[sha256sum] = "2365e93e778d7b61b5d6e02d21c47d97222e9c7deff9e1d0838ad6ec2e86f1b9" |
16 | S = "${WORKDIR}/webrtc-audio-processing-${PV}" | 17 | S = "${WORKDIR}/webrtc-audio-processing-${PV}" |