diff options
author | ivoc <ivoc@webrtc.org> | 2015-12-19 10:02:30 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-19 18:02:39 +0000 |
commit | f4f5cb09277d5ef6aeac8341e5f54a055867803a (patch) | |
tree | 37187aff9828a18be22fa906e67cf5a6f6ea61b2 /talk/media/webrtc/webrtcvoiceengine.cc | |
parent | bd7d8f7e2b824a887aa12236cb6185d446d7da61 (diff) | |
download | webrtc-f4f5cb09277d5ef6aeac8341e5f54a055867803a.tar.gz |
Reland "Added option to specify a maximum file size when recording an AEC dump.", commit ae2c5ad12afc8cc29fe9c59dea432b697b871a87.
The revert of the original CL was commit 36d4c545007129446e551c45c17b25377dce89a4.
Original review: https://codereview.webrtc.org/1413483003/
The original CL changes a function on audio_processing.h that is used by Chrome, this CL adds back the old function.
NOTRY=true
TBR=glaznev@webrtc.org, henrik.lundin@webrtc.org, solenberg@google.com, henrikg@webrtc.org, perkj@webrtc.org
BUG=webrtc:4741
Review URL: https://codereview.webrtc.org/1541633002
Cr-Commit-Position: refs/heads/master@{#11093}
Diffstat (limited to 'talk/media/webrtc/webrtcvoiceengine.cc')
-rw-r--r-- | talk/media/webrtc/webrtcvoiceengine.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc index 9eee2af202..38b6c54b73 100644 --- a/talk/media/webrtc/webrtcvoiceengine.cc +++ b/talk/media/webrtc/webrtcvoiceengine.cc @@ -1011,7 +1011,8 @@ bool WebRtcVoiceEngine::SetAudioDeviceModule(webrtc::AudioDeviceModule* adm) { return true; } -bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file) { +bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file, + int64_t max_size_bytes) { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); FILE* aec_dump_file_stream = rtc::FdopenPlatformFileForWriting(file); if (!aec_dump_file_stream) { @@ -1021,7 +1022,8 @@ bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file) { return false; } StopAecDump(); - if (voe_wrapper_->processing()->StartDebugRecording(aec_dump_file_stream) != + if (voe_wrapper_->base()->audio_processing()->StartDebugRecording( + aec_dump_file_stream, max_size_bytes) != webrtc::AudioProcessing::kNoError) { LOG_RTCERR0(StartDebugRecording); fclose(aec_dump_file_stream); @@ -1035,8 +1037,8 @@ void WebRtcVoiceEngine::StartAecDump(const std::string& filename) { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); if (!is_dumping_aec_) { // Start dumping AEC when we are not dumping. - if (voe_wrapper_->processing()->StartDebugRecording( - filename.c_str()) != webrtc::AudioProcessing::kNoError) { + if (voe_wrapper_->base()->audio_processing()->StartDebugRecording( + filename.c_str(), -1) != webrtc::AudioProcessing::kNoError) { LOG_RTCERR1(StartDebugRecording, filename.c_str()); } else { is_dumping_aec_ = true; @@ -1048,7 +1050,7 @@ void WebRtcVoiceEngine::StopAecDump() { RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); if (is_dumping_aec_) { // Stop dumping AEC when we are dumping. - if (voe_wrapper_->processing()->StopDebugRecording() != + if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() != webrtc::AudioProcessing::kNoError) { LOG_RTCERR0(StopDebugRecording); } |