mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Revert changes to enable echo detection
This commit is contained in:
parent
c632a4acfc
commit
2bfff4ea6d
7 changed files with 4 additions and 18 deletions
|
@ -441,7 +441,6 @@ class RTC_EXPORT RTCAudioSourceStats final : public RTCMediaSourceStats {
|
|||
RTCStatsMember<double> total_samples_duration;
|
||||
RTCStatsMember<double> echo_return_loss;
|
||||
RTCStatsMember<double> echo_return_loss_enhancement;
|
||||
RTCStatsMember<double> echo_likelihood; // RingRTC change to enable echo detection
|
||||
};
|
||||
|
||||
// https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats
|
||||
|
|
|
@ -1032,10 +1032,6 @@ void SetAudioProcessingStats(StatsType* stats,
|
|||
stats->echo_return_loss_enhancement =
|
||||
*apm_stats.echo_return_loss_enhancement;
|
||||
}
|
||||
// RingRTC change to enable echo detection
|
||||
if (apm_stats.residual_echo_likelihood_recent_max) {
|
||||
stats->echo_likelihood = *apm_stats.residual_echo_likelihood_recent_max;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -29,7 +29,6 @@ typedef struct {
|
|||
double remote_jitter;
|
||||
double remote_round_trip_time;
|
||||
double total_audio_energy;
|
||||
double echo_likelihood;
|
||||
} AudioSenderStatistics;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -55,7 +55,6 @@ void StatsObserverRffi::OnStatsDelivered(const rtc::scoped_refptr<const RTCStats
|
|||
auto audio_source_stat = report->GetAs<RTCAudioSourceStats>(*stat->media_source_id);
|
||||
if (audio_source_stat) {
|
||||
audio_sender.total_audio_energy = audio_source_stat->total_audio_energy.ValueOrDefault(0.0);
|
||||
audio_sender.echo_likelihood = audio_source_stat->echo_likelihood.ValueOrDefault(0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@ if (is_android) {
|
|||
allow_poison = [
|
||||
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
|
||||
"software_video_codecs", # TODO(bugs.webrtc.org/7925): Remove.
|
||||
"default_echo_detector", # RingRTC change to enable echo detection
|
||||
]
|
||||
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
|
||||
":audio_jni",
|
||||
|
@ -591,15 +590,13 @@ if (current_os == "linux" || is_android) {
|
|||
|
||||
rtc_library("audio_jni") {
|
||||
visibility = [ "*" ]
|
||||
# RingRTC change to enable echo detection (allowing default_echo_detector)
|
||||
allow_poison = [ "audio_codecs", "default_echo_detector" ]
|
||||
allow_poison = [ "audio_codecs" ]
|
||||
sources = [ "src/jni/pc/audio.cc" ]
|
||||
|
||||
deps = [
|
||||
":base_jni",
|
||||
"../../modules/audio_processing",
|
||||
"../../modules/audio_processing:api",
|
||||
"../../api/audio:echo_detector_creator", # RingRTC change to enable echo detection
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -10,15 +10,13 @@
|
|||
|
||||
#include "sdk/android/src/jni/pc/audio.h"
|
||||
|
||||
#include "api/audio/echo_detector_creator.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace jni {
|
||||
|
||||
rtc::scoped_refptr<AudioProcessing> CreateAudioProcessing() {
|
||||
// RingRTC change to enable echo detection
|
||||
return AudioProcessingBuilder().SetEchoDetector(CreateEchoDetector()).Create();
|
||||
return AudioProcessingBuilder().Create();
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
|
|
|
@ -587,8 +587,7 @@ WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source",
|
|||
&total_audio_energy,
|
||||
&total_samples_duration,
|
||||
&echo_return_loss,
|
||||
&echo_return_loss_enhancement,
|
||||
&echo_likelihood) // RingRTC change to enable echo detection
|
||||
&echo_return_loss_enhancement)
|
||||
// clang-format on
|
||||
|
||||
RTCAudioSourceStats::RTCAudioSourceStats(std::string id, Timestamp timestamp)
|
||||
|
@ -597,8 +596,7 @@ RTCAudioSourceStats::RTCAudioSourceStats(std::string id, Timestamp timestamp)
|
|||
total_audio_energy("totalAudioEnergy"),
|
||||
total_samples_duration("totalSamplesDuration"),
|
||||
echo_return_loss("echoReturnLoss"),
|
||||
echo_return_loss_enhancement("echoReturnLossEnhancement"),
|
||||
echo_likelihood("echoLikelihood") {} // RingRTC change to enable echo detection
|
||||
echo_return_loss_enhancement("echoReturnLossEnhancement") {}
|
||||
|
||||
RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) =
|
||||
default;
|
||||
|
|
Loading…
Reference in a new issue