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

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: Initial version Created 5 years, 2 months 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
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index eed1195975704aea781d564eefca5a9953b164d4..67f88c9f1ad0ecc03aad66673f49202e63f6d41f 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -1278,6 +1278,27 @@ bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file) {
return true;
}
+bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file,
+ int max_size_bytes) {
+ FILE* aec_dump_file_stream = rtc::FdopenPlatformFileForWriting(file);
+ if (!aec_dump_file_stream) {
+ LOG(LS_ERROR) << "Could not open AEC dump file stream.";
+ if (!rtc::ClosePlatformFile(file))
+ LOG(LS_WARNING) << "Could not close file.";
+ return false;
+ }
+ StopAecDump();
+ if (voe_wrapper_->processing()->StartDebugRecording(aec_dump_file_stream,
+ max_size_bytes) !=
+ webrtc::AudioProcessing::kNoError) {
+ LOG_RTCERR0(StartDebugRecording);
+ fclose(aec_dump_file_stream);
+ return false;
+ }
+ is_dumping_aec_ = true;
+ return true;
+}
kwiberg-webrtc 2015/10/25 02:29:12 This duplicates a lot of the preceding function. C
the sun 2015/10/26 10:37:20 See previous comment in PeerConnectionFactory: we
ivoc 2015/11/05 13:14:45 Done.
+
void WebRtcVoiceEngine::StartAecDump(const std::string& filename) {
if (!is_dumping_aec_) {
// Start dumping AEC when we are not dumping.

Powered by Google App Engine
This is Rietveld 408576698