Chromium Code Reviews| Index: talk/media/webrtc/webrtcvoiceengine.cc |
| diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc |
| index 5130232bca4ce880ba5fea277fb0b58d7e39fefa..d39654589d2c043d3bf5671590cdb1a0b19060e1 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,26 @@ 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."; |
|
Henrik Grunell WebRTC
2015/10/02 10:23:42
Update text.
ivoc
2015/10/07 14:27:27
Done.
|
| + if (!rtc::ClosePlatformFile(file)) |
|
pthatcher1
2015/10/06 20:49:09
{}s please
ivoc
2015/10/07 14:27:27
Done.
|
| + LOG(LS_WARNING) << "Could not close file."; |
| + return false; |
| + } |
| + if (voe_wrapper_->codec()->GetEventLog()->StartLogging(event_log_file) != 0) { |
| + LOG_RTCERR0(StartLogging); |
|
pthatcher1
2015/10/06 20:49:09
Why does this go through the voice engine? Why do
ivoc
2015/10/07 14:27:27
See other reply. For now VoE owns the logging obje
pthatcher1
2015/10/07 15:59:23
Then can you put a comment in PeerConnectionFactor
ivoc
2015/10/08 16:20:17
Good idea, I added some comments there like you su
|
| + 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_); |
| } |