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@5239 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrikg@webrtc.org
2013-12-06 16:05:17 +00:00
parent 0f3d0bb601
commit 863b536100
10 changed files with 134 additions and 5 deletions

View File

@ -12,6 +12,7 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_AUDIO_PROCESSING_H_
#include <stddef.h> // size_t
#include <stdio.h> // FILE
#include "webrtc/common.h"
#include "webrtc/modules/interface/module.h"
@ -234,6 +235,10 @@ class AudioProcessing : public Module {
static const size_t kMaxFilenameSize = 1024;
virtual int StartDebugRecording(const char filename[kMaxFilenameSize]) = 0;
// Same as above but uses an existing file handle. Takes ownership
// of |handle| and closes it at StopDebugRecording().
virtual int StartDebugRecording(FILE* handle) = 0;
// Stops recording debugging information, and closes the file. Recording
// cannot be resumed in the same file (without overwriting it).
virtual int StopDebugRecording() = 0;