Reland 28629004: adding new AEC dump start interface for chrome.

This is required because we are not allow to pass CRT objects across dll boundaries, that says, when we pass a file descriptor from chrome dll to libpeerconnection dll, the file descriptor will become invalid immediate, more information can be found here:
http://msdn.microsoft.com/en-us/library/ms235460.aspx

R=andresp@webrtc.org, andrew@webrtc.org, bjornv@webrtc.org, henrike@webrtc.org, henrikg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/30629004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7418 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
xians@webrtc.org
2014-10-10 08:36:56 +00:00
parent c5593ef1aa
commit e46bc77e94
11 changed files with 118 additions and 52 deletions

View File

@ -13,9 +13,7 @@
#include <string>
#if defined(WEBRTC_WIN)
#include "webrtc/base/win32.h"
#else
#if !defined(WEBRTC_WIN)
#include <dirent.h>
#include <stdio.h>
#include <sys/stat.h>
@ -25,6 +23,7 @@
#include "webrtc/base/basictypes.h"
#include "webrtc/base/common.h"
#include "webrtc/base/platform_file.h"
#include "webrtc/base/scoped_ptr.h"
namespace rtc {
@ -436,24 +435,6 @@ class FilesystemScope{
// process).
bool CreateUniqueFile(Pathname& path, bool create_empty);
// Taken from Chromium's base/platform_file.h.
// Don't use ClosePlatformFile to close a file opened with FdopenPlatformFile.
// Use fclose instead.
// TODO(grunell): Remove when Chromium has started to use AEC in each source.
// http://crbug.com/264611.
#if defined(WEBRTC_WIN)
typedef HANDLE PlatformFile;
const PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE;
#elif defined(WEBRTC_POSIX)
typedef int PlatformFile;
const PlatformFile kInvalidPlatformFileValue = -1;
#else
#error Unsupported platform
#endif
FILE* FdopenPlatformFileForWriting(PlatformFile file);
bool ClosePlatformFile(PlatformFile file);
} // namespace rtc
#endif // WEBRTC_BASE_FILEUTILS_H_