Index: talk/media/webrtc/webrtcvoiceengine.cc |
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc |
index 54fac221d8fb7d6d829f606e8ab5f9897dc2469a..0f87257896468d39be196acee7689f94b9235e55 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" |
@@ -1276,6 +1277,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 RtcEventLog file stream."; |
+ if (!rtc::ClosePlatformFile(file)) { |
the sun
2015/10/13 11:00:40
This isn't completely clear to me.
I assume Close
ivoc
2015/10/13 13:50:50
Hmm, that is actually a really good point. The str
terelius
2015/10/13 14:29:52
Do we need any other way to pass the file, or can
the sun
2015/10/13 14:29:54
Yes, that seems like the best option. Make sure th
ivoc
2015/10/13 14:55:06
@terelius: Possibly, but I don't know if using a r
|
+ 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; |
+ } |
+ 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_); |
} |