Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2801853005: Create a private API for controlling WebRTC's AEC3 (Closed)
Patch Set: After grunell's second round of comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index ede70ada11303dfea53c00bb16ed53491a313293..214749d07116b7ab2d24d3b63c024ebc862e14bd 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2343,6 +2343,19 @@ bool RenderProcessHostImpl::StopWebRTCEventLog() {
return webrtc_eventlog_host_.StopWebRTCEventLog();
}
+void RenderProcessHostImpl::SetEchoCanceller3(bool enable) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ // Piggybacking on AEC dumps.
+ // TODO(hlundin): Change name for aec_dump_consumers_;
+ // http://crbug.com/709919.
+ for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
+ it != aec_dump_consumers_.end(); ++it) {
+ Send(new AudioProcessingMsg_EnableAec3(*it, enable));
+ }
+ override_aec3_ = base::Optional<bool>(enable);
+}
+
void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
base::Callback<void(const std::string&)> callback) {
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -2996,6 +3009,9 @@ void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) {
WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath());
EnableAecDumpForId(file_with_extensions, id);
}
+ if (override_aec3_) {
+ Send(new AudioProcessingMsg_EnableAec3(id, *override_aec3_));
+ }
}
void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) {

Powered by Google App Engine
This is Rietveld 408576698