From 7b72264dd14dcffb873d096339de6ed47015ac43 Mon Sep 17 00:00:00 2001 From: "henrikg@webrtc.org" Date: Fri, 6 Dec 2013 16:05:17 +0000 Subject: 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 --- voice_engine/voe_audio_processing_impl.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'voice_engine/voe_audio_processing_impl.cc') 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()"); -- cgit v1.2.3