summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxians <xians@chromium.org>2014-09-23 08:32:23 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-23 15:32:36 +0000
commite5d4e40f138c70432e05101b2ebea7b305aa0341 (patch)
tree469c90b23f5e4c27983a2d2bdb865d51ab38f334
parent131ad350c467be1fe8e0c87acc85ae5c2339d21e (diff)
downloadchromium_src-e5d4e40f138c70432e05101b2ebea7b305aa0341.zip
chromium_src-e5d4e40f138c70432e05101b2ebea7b305aa0341.tar.gz
chromium_src-e5d4e40f138c70432e05101b2ebea7b305aa0341.tar.bz2
Revert of Fix the way how we create webrtc::AudioProcessing in Chrome (patchset #5 id:100001 of https://codereview.chromium.org/588523002/)
Reason for revert: It broke some internal webrtc bots, revert it for now and will reland it after fixing the problems. http://chromegw.corp.google.com/i/internal.chromium.webrtc/builders/Mac%20Tester/builds/22092 Original issue's description: > Fix the way how we create webrtc::AudioProcessing in Chrome. > > BUG=415935 > TEST=all webrtc tests in all bots + manual test to verify the agc loggings exist. > > Committed: https://crrev.com/a5e9fc62b7bf25931ffe6153cc738098d8119c28 > Cr-Commit-Position: refs/heads/master@{#295990} TBR=tommi@chromium.org NOTREECHECKS=true NOTRY=true BUG=415935 Review URL: https://codereview.chromium.org/594883002 Cr-Commit-Position: refs/heads/master@{#296191}
-rw-r--r--content/renderer/media/media_stream_audio_processor.cc3
-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.cc21
-rw-r--r--third_party/libjingle/overrides/init_webrtc.h13
-rw-r--r--third_party/libjingle/overrides/initialize_module.cc6
6 files changed, 4 insertions, 41 deletions
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/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn
index aa71dc8..5c3e483 100644
--- a/third_party/libjingle/BUILD.gn
+++ b/third_party/libjingle/BUILD.gn
@@ -549,7 +549,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 6db34f6..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,7 @@ 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);
@@ -171,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)