Index: talk/media/webrtc/webrtcvoiceengine.cc |
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc |
index 5130232bca4ce880ba5fea277fb0b58d7e39fefa..db8600a10feb059208c14e9fd74ee8b3f3c8e7d9 100644 |
--- a/talk/media/webrtc/webrtcvoiceengine.cc |
+++ b/talk/media/webrtc/webrtcvoiceengine.cc |
@@ -50,6 +50,7 @@ |
#include "webrtc/base/logging.h" |
#include "webrtc/base/stringencode.h" |
#include "webrtc/base/stringutils.h" |
+#include "webrtc/call/rtc_event_log.h" |
#include "webrtc/common.h" |
#include "webrtc/modules/audio_processing/include/audio_processing.h" |
@@ -1336,6 +1337,27 @@ void WebRtcVoiceEngine::StopAecDump() { |
} |
} |
+bool WebRtcVoiceEngine::StartRtcEventLog(rtc::PlatformFile file) { |
+ FILE* event_log_file = rtc::FdopenPlatformFileForWriting(file); |
+ if (!event_log_file) { |
+ LOG(LS_ERROR) << "Could not open AEC dump file stream."; |
+ if (!rtc::ClosePlatformFile(file)) |
+ LOG(LS_WARNING) << "Could not close file."; |
+ return false; |
+ } |
+ if (voe_wrapper_->codec()->GetEventLog()->StartLogging(event_log_file) != 0) { |
+ LOG_RTCERR0(StartLogging); |
+ fclose(event_log_file); |
+ return false; |
+ } |
+ is_dumping_aec_ = true; |
+ return true; |
+} |
+ |
+void WebRtcVoiceEngine::StopRtcEventLog() { |
+ voe_wrapper_->codec()->GetEventLog()->StopLogging(); |
+} |
+ |
int WebRtcVoiceEngine::CreateVoiceChannel(VoEWrapper* voice_engine_wrapper) { |
return voice_engine_wrapper->base()->CreateChannel(voe_config_); |
} |