Commit 058a229c authored by xians's avatar xians Committed by Commit bot

Revert of Reland 588523002: Fix the way how we create webrtc::AudioProcessing...

Revert of Reland  588523002: Fix the way how we create webrtc::AudioProcessing in Chrome (patchset #5 id:80001 of https://codereview.chromium.org/597923002/)

Reason for revert:
It fails some aec dump content browser tests on windows, and likely it also breaks the aec dump production code, it is safer to revert it since cut happens today.
http://chromegw.corp.google.com/i/internal.chromium.webrtc/builders/Win7%20Tester/builds/9752/steps/content_browsertests/logs/stdio

Original issue's description:
> 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
>
> BUG=415935
> TEST=all webrtc tests in all bots + manual test to verify the agc loggings exist.
>
> Committed: https://chromium.googlesource.com/chromium/src/+/5ac9f35c3e5d9781a01769f3f0d0433026c57de7

TBR=tommi@chromium.org,jochen@chromium.org,maruel@chromium.org,brettw@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=415935

Review URL: https://codereview.chromium.org/611493002

Cr-Commit-Position: refs/heads/master@{#296933}
parent a5dc279b
...@@ -118,7 +118,6 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None): ...@@ -118,7 +118,6 @@ def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None):
'--config-variable', 'component', 'static_library', '--config-variable', 'component', 'static_library',
'--config-variable', 'fastbuild', '0', '--config-variable', 'fastbuild', '0',
'--config-variable', 'icu_use_data_file_flag', '1', '--config-variable', 'icu_use_data_file_flag', '1',
'--config-variable', 'libpeer_target_type', 'static_library',
# TODO(maruel): This may not be always true. # TODO(maruel): This may not be always true.
'--config-variable', 'target_arch', 'arm', '--config-variable', 'target_arch', 'arm',
'--config-variable', 'use_openssl', '0', '--config-variable', 'use_openssl', '0',
......
...@@ -838,21 +838,6 @@ ...@@ -838,21 +838,6 @@
'../third_party/webrtc/modules/modules.gyp:desktop_capture', '../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', { ['enable_webrtc==1 and chromeos==1', {
'sources': [ 'sources': [
'browser/media/capture/desktop_capture_device_aura_unittest.cc', 'browser/media/capture/desktop_capture_device_aura_unittest.cc',
......
...@@ -56,13 +56,6 @@ ...@@ -56,13 +56,6 @@
], ],
}, },
}], }],
['OS=="linux" and libpeer_target_type=="loadable_module"', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/lib/libpeerconnection.so',
],
},
}],
['OS=="mac"', { ['OS=="mac"', {
'variables': { 'variables': {
'command': [ 'command': [
...@@ -98,13 +91,6 @@ ...@@ -98,13 +91,6 @@
], ],
}, },
}], }],
['OS=="win" and libpeer_target_type=="loadable_module"', {
'variables': {
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/libpeerconnection.dll',
],
},
}],
], ],
'includes': [ 'includes': [
'../base/base.isolate', '../base/base.isolate',
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "media/base/audio_fifo.h" #include "media/base/audio_fifo.h"
#include "media/base/channel_layout.h" #include "media/base/channel_layout.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.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/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h"
#include "third_party/webrtc/modules/audio_processing/typing_detection.h" #include "third_party/webrtc/modules/audio_processing/typing_detection.h"
...@@ -424,7 +423,7 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule( ...@@ -424,7 +423,7 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
#endif #endif
// Create and configure the webrtc::AudioProcessing. // Create and configure the webrtc::AudioProcessing.
audio_processing_.reset(CreateWebRtcAudioProcessing(config)); audio_processing_.reset(webrtc::AudioProcessing::Create(config));
// Enable the audio processing components. // Enable the audio processing components.
if (echo_cancellation) { if (echo_cancellation) {
......
...@@ -548,7 +548,6 @@ if (enable_webrtc) { ...@@ -548,7 +548,6 @@ if (enable_webrtc) {
deps = [ deps = [
":libjingle_webrtc_common", ":libjingle_webrtc_common",
"//third_party/webrtc", "//third_party/webrtc",
"//third_party/webrtc/modules/audio_processing",
"//third_party/webrtc/system_wrappers", "//third_party/webrtc/system_wrappers",
"//third_party/webrtc/voice_engine", "//third_party/webrtc/voice_engine",
] ]
......
...@@ -589,7 +589,6 @@ ...@@ -589,7 +589,6 @@
'<(libjingle_source)/talk/media/webrtc/webrtcvoiceengine.h', '<(libjingle_source)/talk/media/webrtc/webrtcvoiceengine.h',
], ],
'dependencies': [ '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/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'<(DEPTH)/third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine', '<(DEPTH)/third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine',
'<(DEPTH)/third_party/webrtc/webrtc.gyp:webrtc', '<(DEPTH)/third_party/webrtc/webrtc.gyp:webrtc',
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#include "base/metrics/field_trial.h" #include "base/metrics/field_trial.h"
#include "base/native_library.h" #include "base/native_library.h"
#include "base/path_service.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/basictypes.h"
#include "webrtc/base/logging.h" #include "webrtc/base/logging.h"
...@@ -55,13 +53,6 @@ bool InitializeWebRtcModule() { ...@@ -55,13 +53,6 @@ bool InitializeWebRtcModule() {
return true; 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 #else // !LIBPEERCONNECTION_LIB
// When being compiled as a shared library, we need to bridge the gap between // When being compiled as a shared library, we need to bridge the gap between
...@@ -71,7 +62,6 @@ webrtc::AudioProcessing* CreateWebRtcAudioProcessing( ...@@ -71,7 +62,6 @@ webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
// Global function pointers to the factory functions in the shared library. // Global function pointers to the factory functions in the shared library.
CreateWebRtcMediaEngineFunction g_create_webrtc_media_engine = NULL; CreateWebRtcMediaEngineFunction g_create_webrtc_media_engine = NULL;
DestroyWebRtcMediaEngineFunction g_destroy_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 // Returns the full or relative path to the libpeerconnection module depending
// on what platform we're on. // on what platform we're on.
...@@ -145,8 +135,7 @@ bool InitializeWebRtcModule() { ...@@ -145,8 +135,7 @@ bool InitializeWebRtcModule() {
&AddTraceEvent, &AddTraceEvent,
&g_create_webrtc_media_engine, &g_create_webrtc_media_engine,
&g_destroy_webrtc_media_engine, &g_destroy_webrtc_media_engine,
&init_diagnostic_logging, &init_diagnostic_logging);
&g_create_webrtc_audio_processing);
if (init_ok) if (init_ok)
rtc::SetExtraLoggingInit(init_diagnostic_logging); rtc::SetExtraLoggingInit(init_diagnostic_logging);
...@@ -171,12 +160,4 @@ void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { ...@@ -171,12 +160,4 @@ void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) {
g_destroy_webrtc_media_engine(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 #endif // LIBPEERCONNECTION_LIB
...@@ -23,8 +23,6 @@ class WebRtcVideoEncoderFactory; ...@@ -23,8 +23,6 @@ class WebRtcVideoEncoderFactory;
namespace webrtc { namespace webrtc {
class AudioDeviceModule; class AudioDeviceModule;
class AudioProcessing;
class Config;
} // namespace webrtc } // namespace webrtc
typedef std::string (*FieldTrialFindFullName)(const std::string& trial_name); typedef std::string (*FieldTrialFindFullName)(const std::string& trial_name);
...@@ -41,9 +39,6 @@ typedef void (*DestroyWebRtcMediaEngineFunction)( ...@@ -41,9 +39,6 @@ typedef void (*DestroyWebRtcMediaEngineFunction)(
typedef void (*InitDiagnosticLoggingDelegateFunctionFunction)( typedef void (*InitDiagnosticLoggingDelegateFunctionFunction)(
void (*DelegateFunction)(const std::string&)); void (*DelegateFunction)(const std::string&));
typedef webrtc::AudioProcessing* (*CreateWebRtcAudioProcessingFunction)(
const webrtc::Config& config);
// A typedef for the main initialize function in libpeerconnection. // A typedef for the main initialize function in libpeerconnection.
// This will initialize logging in the module with the proper arguments // This will initialize logging in the module with the proper arguments
// as well as provide pointers back to a couple webrtc factory functions. // as well as provide pointers back to a couple webrtc factory functions.
...@@ -61,8 +56,7 @@ typedef bool (*InitializeModuleFunction)( ...@@ -61,8 +56,7 @@ typedef bool (*InitializeModuleFunction)(
webrtc::AddTraceEventPtr trace_add_trace_event, webrtc::AddTraceEventPtr trace_add_trace_event,
CreateWebRtcMediaEngineFunction* create_media_engine, CreateWebRtcMediaEngineFunction* create_media_engine,
DestroyWebRtcMediaEngineFunction* destroy_media_engine, DestroyWebRtcMediaEngineFunction* destroy_media_engine,
InitDiagnosticLoggingDelegateFunctionFunction* init_diagnostic_logging, InitDiagnosticLoggingDelegateFunctionFunction* init_diagnostic_logging);
CreateWebRtcAudioProcessingFunction* create_audio_processing);
#if !defined(LIBPEERCONNECTION_IMPLEMENTATION) #if !defined(LIBPEERCONNECTION_IMPLEMENTATION)
// Load and initialize the shared WebRTC module (libpeerconnection). // Load and initialize the shared WebRTC module (libpeerconnection).
...@@ -71,11 +65,6 @@ typedef bool (*InitializeModuleFunction)( ...@@ -71,11 +65,6 @@ typedef bool (*InitializeModuleFunction)(
// If not called explicitly, this function will still be called from the main // If not called explicitly, this function will still be called from the main
// CreateWebRtcMediaEngine factory function the first time it is called. // CreateWebRtcMediaEngine factory function the first time it is called.
bool InitializeWebRtcModule(); bool InitializeWebRtcModule();
// Return a webrtc::AudioProcessing object.
webrtc::AudioProcessing* CreateWebRtcAudioProcessing(
const webrtc::Config& config);
#endif #endif
#endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_INIT_WEBRTC_H_ #endif // THIRD_PARTY_LIBJINGLE_OVERRIDES_INIT_WEBRTC_H_
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/logging.h" #include "base/logging.h"
#include "init_webrtc.h" #include "init_webrtc.h"
#include "talk/media/webrtc/webrtcmediaengine.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/basictypes.h"
#include "webrtc/base/logging.h" #include "webrtc/base/logging.h"
...@@ -72,9 +71,7 @@ bool InitializeModule(const CommandLine& command_line, ...@@ -72,9 +71,7 @@ bool InitializeModule(const CommandLine& command_line,
CreateWebRtcMediaEngineFunction* create_media_engine, CreateWebRtcMediaEngineFunction* create_media_engine,
DestroyWebRtcMediaEngineFunction* destroy_media_engine, DestroyWebRtcMediaEngineFunction* destroy_media_engine,
InitDiagnosticLoggingDelegateFunctionFunction* InitDiagnosticLoggingDelegateFunctionFunction*
init_diagnostic_logging, init_diagnostic_logging) {
CreateWebRtcAudioProcessingFunction*
create_audio_processing) {
#if !defined(OS_MACOSX) && !defined(OS_ANDROID) #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
g_alloc = alloc; g_alloc = alloc;
g_dealloc = dealloc; g_dealloc = dealloc;
...@@ -85,7 +82,6 @@ bool InitializeModule(const CommandLine& command_line, ...@@ -85,7 +82,6 @@ bool InitializeModule(const CommandLine& command_line,
*create_media_engine = &CreateWebRtcMediaEngine; *create_media_engine = &CreateWebRtcMediaEngine;
*destroy_media_engine = &DestroyWebRtcMediaEngine; *destroy_media_engine = &DestroyWebRtcMediaEngine;
*init_diagnostic_logging = &rtc::InitDiagnosticLoggingDelegateFunction; *init_diagnostic_logging = &rtc::InitDiagnosticLoggingDelegateFunction;
*create_audio_processing = &webrtc::AudioProcessing::Create;
if (CommandLine::Init(0, NULL)) { if (CommandLine::Init(0, NULL)) {
#if !defined(OS_WIN) #if !defined(OS_WIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment