summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Mineer <amineer@chromium.org>2014-11-14 09:13:38 -0800
committerAlex Mineer <amineer@chromium.org>2014-11-14 17:14:33 +0000
commite5e683b7c41ca32b42486b0de4bbcdd106ee9e59 (patch)
tree6e2e71a98648356f4d0c1dcde9e3811dcf98504b
parentddcb7a2971fd021bec923e9377f7f1093a28bf20 (diff)
downloadchromium_src-e5e683b7c41ca32b42486b0de4bbcdd106ee9e59.zip
chromium_src-e5e683b7c41ca32b42486b0de4bbcdd106ee9e59.tar.gz
chromium_src-e5e683b7c41ca32b42486b0de4bbcdd106ee9e59.tar.bz2
Revert "Merge 663413002 to M39:"
This reverts commit 255ee24a13c30cdd0e6cd75db897f03f35bc0674. R=tommi@chromium.org Revert of Reland 597923002: Fix the way how we create webrtc::AudioProcessing in Chrome (patchset #4 id:60001 of https://codereview.chromium.org/663413002/) Reason for revert: This CL broke the configuration of AudioProcessing, we have to revert it to fix the echo issues it introduces. Original issue's description: > Reland 597923002: Fix the way how we create webrtc::AudioProcessing in Chrome. > > The original review thread is in https://codereview.chromium.org/588523002/ > > Fix the way how we create webrtc::AudioProcessing in Chrome. > > TBR=tommi@chromium.org,maruel@chromium.org > > BUG=415935 > TEST=all webrtc tests in all bots + manual test to verify the agc loggings exist. Review URL: https://codereview.chromium.org/730563002 (cherry picked from commit e78feb7865c15d596a428ba892f842c653995615) Cr-Original-Commit-Position: refs/branch-heads/2171@{#419} Cr-Original-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060} Cr-Commit-Position: refs/branch-heads/2171_62@{#2} Cr-Branched-From: 6ac5b3b7a7861707e68ff88605ec7e2e1dd3f941-refs/branch-heads/2171@{#415} Cr-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060}
-rw-r--r--build/android/pylib/gtest/setup.py1
-rw-r--r--content/content_tests.gypi15
-rw-r--r--content/content_unittests.isolate14
-rw-r--r--content/renderer/media/media_stream_audio_processor.cc3
-rw-r--r--content/renderer/media/media_stream_audio_processor_options.cc11
-rw-r--r--third_party/libjingle/BUILD.gn1
-rw-r--r--third_party/libjingle/libjingle.gyp1
-rw-r--r--third_party/libjingle/overrides/init_webrtc.cc22
-rw-r--r--third_party/libjingle/overrides/init_webrtc.h13
-rw-r--r--third_party/libjingle/overrides/initialize_module.cc6
10 files changed, 13 insertions, 74 deletions
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 2782859..6a9e65b 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -118,7 +118,6 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None):
'--config-variable', 'component', 'static_library',
'--config-variable', 'fastbuild', '0',
'--config-variable', 'icu_use_data_file_flag', '1',
- '--config-variable', 'libpeer_target_type', 'static_library',
# TODO(maruel): This may not be always true.
'--config-variable', 'target_arch', 'arm',
'--config-variable', 'use_openssl', '0',
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index ba9da06..e311974 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -838,21 +838,6 @@
'../third_party/webrtc/modules/modules.gyp:desktop_capture',
],
}],
- ['enable_webrtc==1 and OS=="mac"', {
- 'variables': {
- 'libpeer_target_type%': 'static_library',
- },
- 'conditions': [
- ['libpeer_target_type!="static_library"', {
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/Libraries',
- 'files': [
- '<(PRODUCT_DIR)/libpeerconnection.so',
- ],
- }],
- }],
- ],
- }],
['enable_webrtc==1 and chromeos==1', {
'sources': [
'browser/media/capture/desktop_capture_device_aura_unittest.cc',
diff --git a/content/content_unittests.isolate b/content/content_unittests.isolate
index 87a4ee9..7f4f9c4 100644
--- a/content/content_unittests.isolate
+++ b/content/content_unittests.isolate
@@ -56,13 +56,6 @@
],
},
}],
- ['OS=="linux" and libpeer_target_type=="loadable_module"', {
- 'variables': {
- 'isolate_dependency_tracked': [
- '<(PRODUCT_DIR)/lib/libpeerconnection.so',
- ],
- },
- }],
['OS=="mac"', {
'variables': {
'command': [
@@ -98,13 +91,6 @@
],
},
}],
- ['OS=="win" and libpeer_target_type=="loadable_module"', {
- 'variables': {
- 'isolate_dependency_tracked': [
- '<(PRODUCT_DIR)/libpeerconnection.dll',
- ],
- },
- }],
],
'includes': [
'../base/base.isolate',
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index ac41187..4efc507 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -19,7 +19,6 @@
#include "media/base/audio_fifo.h"
#include "media/base/channel_layout.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
-#include "third_party/libjingle/overrides/init_webrtc.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
#include "third_party/webrtc/modules/audio_processing/typing_detection.h"
@@ -424,7 +423,7 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
#endif
// Create and configure the webrtc::AudioProcessing.
- audio_processing_.reset(CreateWebRtcAudioProcessing(config));
+ audio_processing_.reset(webrtc::AudioProcessing::Create(config));
// Enable the audio processing components.
if (echo_cancellation) {
diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
index 8462a65..e386308 100644
--- a/content/renderer/media/media_stream_audio_processor_options.cc
+++ b/content/renderer/media/media_stream_audio_processor_options.cc
@@ -251,10 +251,15 @@ void EnableTypingDetection(AudioProcessing* audio_processing,
void StartEchoCancellationDump(AudioProcessing* audio_processing,
base::File aec_dump_file) {
DCHECK(aec_dump_file.IsValid());
- if (audio_processing->StartDebugRecordingForPlatformFile(
- aec_dump_file.TakePlatformFile())) {
- DLOG(ERROR) << "Fail to start AEC debug recording";
+
+ FILE* stream = base::FileToFILE(aec_dump_file.Pass(), "w");
+ if (!stream) {
+ LOG(ERROR) << "Failed to open AEC dump file";
+ return;
}
+
+ if (audio_processing->StartDebugRecording(stream))
+ DLOG(ERROR) << "Fail to start AEC debug recording";
}
void StopEchoCancellationDump(AudioProcessing* audio_processing) {
diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn
index 69a744e..02c2bf9 100644
--- a/third_party/libjingle/BUILD.gn
+++ b/third_party/libjingle/BUILD.gn
@@ -548,7 +548,6 @@ if (enable_webrtc) {
deps = [
":libjingle_webrtc_common",
"//third_party/webrtc",
- "//third_party/webrtc/modules/audio_processing",
"//third_party/webrtc/system_wrappers",
"//third_party/webrtc/voice_engine",
]
diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp
index 63a5230..0eaf86c 100644
--- a/third_party/libjingle/libjingle.gyp
+++ b/third_party/libjingle/libjingle.gyp
@@ -589,7 +589,6 @@
'<(libjingle_source)/talk/media/webrtc/webrtcvoiceengine.h',
],
'dependencies': [
- '<(DEPTH)/third_party/webrtc/modules/modules.gyp:audio_processing',
'<(DEPTH)/third_party/webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(DEPTH)/third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine',
'<(DEPTH)/third_party/webrtc/webrtc.gyp:webrtc',
diff --git a/third_party/libjingle/overrides/init_webrtc.cc b/third_party/libjingle/overrides/init_webrtc.cc
index 0004d8e..ab89d58 100644
--- a/third_party/libjingle/overrides/init_webrtc.cc
+++ b/third_party/libjingle/overrides/init_webrtc.cc
@@ -11,8 +11,6 @@
#include "base/metrics/field_trial.h"
#include "base/native_library.h"
#include "base/path_service.h"
-#include "third_party/webrtc/common.h"
-#include "third_party/webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/logging.h"
@@ -55,13 +53,6 @@ bool InitializeWebRtcModule() {
return true;
}
-webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
- const webrtc::Config& config) {
- // libpeerconnection is being compiled as a static lib, use
- // webrtc::AudioProcessing directly.
- return webrtc::AudioProcessing::Create(config);
-}
-
#else // !LIBPEERCONNECTION_LIB
// When being compiled as a shared library, we need to bridge the gap between
@@ -71,7 +62,6 @@ webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
// Global function pointers to the factory functions in the shared library.
CreateWebRtcMediaEngineFunction g_create_webrtc_media_engine = NULL;
DestroyWebRtcMediaEngineFunction g_destroy_webrtc_media_engine = NULL;
-CreateWebRtcAudioProcessingFunction g_create_webrtc_audio_processing = NULL;
// Returns the full or relative path to the libpeerconnection module depending
// on what platform we're on.
@@ -145,8 +135,8 @@ bool InitializeWebRtcModule() {
&AddTraceEvent,
&g_create_webrtc_media_engine,
&g_destroy_webrtc_media_engine,
- &init_diagnostic_logging,
- &g_create_webrtc_audio_processing);
+ &init_diagnostic_logging);
+
if (init_ok)
rtc::SetExtraLoggingInit(init_diagnostic_logging);
return init_ok;
@@ -170,12 +160,4 @@ void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) {
g_destroy_webrtc_media_engine(media_engine);
}
-webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
- const webrtc::Config& config) {
- // The same as CreateWebRtcMediaEngine(), we call InitializeWebRtcModule here
- // for convenience of tests.
- InitializeWebRtcModule();
- return g_create_webrtc_audio_processing(config);
-}
-
#endif // LIBPEERCONNECTION_LIB
diff --git a/third_party/libjingle/overrides/init_webrtc.h b/third_party/libjingle/overrides/init_webrtc.h
index 4d06e9e..c5c190c 100644
--- a/third_party/libjingle/overrides/init_webrtc.h
+++ b/third_party/libjingle/overrides/init_webrtc.h
@@ -23,8 +23,6 @@ class WebRtcVideoEncoderFactory;
namespace webrtc {
class AudioDeviceModule;
-class AudioProcessing;
-class Config;
} // namespace webrtc
typedef std::string (*FieldTrialFindFullName)(const std::string& trial_name);
@@ -41,9 +39,6 @@ typedef void (*DestroyWebRtcMediaEngineFunction)(
typedef void (*InitDiagnosticLoggingDelegateFunctionFunction)(
void (*DelegateFunction)(const std::string&));
-typedef webrtc::AudioProcessing* (*CreateWebRtcAudioProcessingFunction)(
- const webrtc::Config& config);
-
// A typedef for the main initialize function in libpeerconnection.
// This will initialize logging in the module with the proper arguments
// as well as provide pointers back to a couple webrtc factory functions.
@@ -61,8 +56,7 @@ typedef bool (*InitializeModuleFunction)(
webrtc::AddTraceEventPtr trace_add_trace_event,
CreateWebRtcMediaEngineFunction* create_media_engine,
DestroyWebRtcMediaEngineFunction* destroy_media_engine,
- InitDiagnosticLoggingDelegateFunctionFunction* init_diagnostic_logging,
- CreateWebRtcAudioProcessingFunction* create_audio_processing);
+ InitDiagnosticLoggingDelegateFunctionFunction* init_diagnostic_logging);
#if !defined(LIBPEERCONNECTION_IMPLEMENTATION)
// Load and initialize the shared WebRTC module (libpeerconnection).
@@ -71,11 +65,6 @@ typedef bool (*InitializeModuleFunction)(
// If not called explicitly, this function will still be called from the main
// CreateWebRtcMediaEngine factory function the first time it is called.
bool InitializeWebRtcModule();
-
-// Return a webrtc::AudioProcessing object.
-webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
- const webrtc::Config& config);
-
#endif
#endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_INIT_WEBRTC_H_
diff --git a/third_party/libjingle/overrides/initialize_module.cc b/third_party/libjingle/overrides/initialize_module.cc
index b84e2d8..ce11567 100644
--- a/third_party/libjingle/overrides/initialize_module.cc
+++ b/third_party/libjingle/overrides/initialize_module.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "init_webrtc.h"
#include "talk/media/webrtc/webrtcmediaengine.h"
-#include "third_party/webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/logging.h"
@@ -72,9 +71,7 @@ bool InitializeModule(const CommandLine& command_line,
CreateWebRtcMediaEngineFunction* create_media_engine,
DestroyWebRtcMediaEngineFunction* destroy_media_engine,
InitDiagnosticLoggingDelegateFunctionFunction*
- init_diagnostic_logging,
- CreateWebRtcAudioProcessingFunction*
- create_audio_processing) {
+ init_diagnostic_logging) {
#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
g_alloc = alloc;
g_dealloc = dealloc;
@@ -85,7 +82,6 @@ bool InitializeModule(const CommandLine& command_line,
*create_media_engine = &CreateWebRtcMediaEngine;
*destroy_media_engine = &DestroyWebRtcMediaEngine;
*init_diagnostic_logging = &rtc::InitDiagnosticLoggingDelegateFunction;
- *create_audio_processing = &webrtc::AudioProcessing::Create;
if (CommandLine::Init(0, NULL)) {
#if !defined(OS_WIN)