diff options
author | henrikg@webrtc.org <henrikg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-06 16:05:17 +0000 |
---|---|---|
committer | henrikg@webrtc.org <henrikg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-06 16:05:17 +0000 |
commit | 7b72264dd14dcffb873d096339de6ed47015ac43 (patch) | |
tree | c651b094eec9d2f99ba613d8714b20d7228c6609 /voice_engine/voe_audio_processing_impl.cc | |
parent | 4383539b27ae877337679901c1cc9120f3a83fef (diff) | |
download | webrtc-7b72264dd14dcffb873d096339de6ed47015ac43.tar.gz |
Allow opening an AEC dump from an existing file handle.
This is necessary for Chromium to be able enable the dump with the sanbox enabled. It will open the file in the browser process and pass the handle to the render process.
This changes FileWrapper to deal with the case were the file handle is not managed by the wrapper.
BUG=2567
R=andrew@webrtc.org, henrika@webrtc.org, perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/4649004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5239 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/voe_audio_processing_impl.cc')
-rw-r--r-- | voice_engine/voe_audio_processing_impl.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/voice_engine/voe_audio_processing_impl.cc b/voice_engine/voe_audio_processing_impl.cc index a57ede93..63a4ed76 100644 --- a/voice_engine/voe_audio_processing_impl.cc +++ b/voice_engine/voe_audio_processing_impl.cc @@ -972,6 +972,17 @@ int VoEAudioProcessingImpl::StartDebugRecording(const char* fileNameUTF8) { return _shared->audio_processing()->StartDebugRecording(fileNameUTF8); } +int VoEAudioProcessingImpl::StartDebugRecording(FILE* file_handle) { + WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), + "StartDebugRecording()"); + if (!_shared->statistics().Initialized()) { + _shared->SetLastError(VE_NOT_INITED, kTraceError); + return -1; + } + + return _shared->audio_processing()->StartDebugRecording(file_handle); +} + int VoEAudioProcessingImpl::StopDebugRecording() { WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), "StopDebugRecording()"); |