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

Unified Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1413483003: Added option to specify a maximum file size when recording an AEC dump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added function to avoid breaking Chromium. Created 5 years 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
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index 2634a24630741224d85c1a5006811b297ecfa394..f3a479b6c5fe089eddd7f9a1a98d71644e5911da 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -1016,7 +1016,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) {
@@ -1026,7 +1027,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);
@@ -1040,8 +1042,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;
@@ -1053,7 +1055,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);
}
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.h ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698