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

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: 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..a635ecaacc1cb6c1485c7e99537d206eefd485d3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2343,6 +2343,17 @@ bool RenderProcessHostImpl::StopWebRTCEventLog() {
return webrtc_eventlog_host_.StopWebRTCEventLog();
}
+void RenderProcessHostImpl::SetEchoCanceller3(bool enable) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ // Piggybacking on AEC dumps.
+ // TODO(hlundin) Consider changing name for aec_dump_consumers_.
Henrik Grunell 2017/04/10 08:13:28 I think this should be done. I'm OK with a follow-
hlundin-chromium 2017/04/10 10:10:16 Done.
+ for (std::vector<int>::iterator it = aec_dump_consumers_.begin();
+ it != aec_dump_consumers_.end(); ++it) {
+ SetEchoCanceller3ForId(enable, *it);
Henrik Grunell 2017/04/10 08:13:28 Just do Send(new AudioProcessingMsg_EnableAec3(id
hlundin-chromium 2017/04/10 10:10:16 Done.
+ }
+}
+
void RenderProcessHostImpl::SetWebRtcLogMessageCallback(
base::Callback<void(const std::string&)> callback) {
#if BUILDFLAG(ENABLE_WEBRTC)
@@ -3036,6 +3047,11 @@ base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions(
return file.AddExtension(IntToStringType(base::GetProcId(GetHandle())))
.AddExtension(kAecDumpFileNameAddition);
}
+
+void RenderProcessHostImpl::SetEchoCanceller3ForId(bool enable, int id) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ Send(new AudioProcessingMsg_EnableAec3(id, enable));
+}
#endif // BUILDFLAG(ENABLE_WEBRTC)
void RenderProcessHostImpl::GetAudioOutputControllers(

Powered by Google App Engine
This is Rietveld 408576698