Revert of Move smoothing filter to common audio. (patchset #3 id:60001 of https://codereview.webrtc.org/2484153002/ )

Reason for revert:
Breaks downstream projects:
error: undefined reference to 'rtc::ExpFilter::kValueUndefined'
error: undefined reference to 'rtc::ExpFilter::Apply(float, float)'
error: undefined reference to 'rtc::ExpFilter::Reset(float)'
rror: undefined reference to 'rtc::ExpFilter::UpdateBase(float)'

Original issue's description:
> Move smoothing filter to common audio.
>
> This will make the smoothing filter a basic tool that is going to be used by both voice engine and ANA.
>
> BUG=webrtc:6443
>
> Committed: https://crrev.com/a82395bf7cd15b7396456df06fe952ede8db0c39
> Cr-Commit-Position: refs/heads/master@{#15146}

TBR=minyue@webrtc.org,solenberg@webrtc.org,perkj@webrtc.org,tommi@webrtc.org,michaelt@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6443

Review-Url: https://codereview.webrtc.org/2510373002
Cr-Commit-Position: refs/heads/master@{#15147}
This commit is contained in:
magjed 2016-11-18 01:31:16 -08:00 committed by Commit bot
parent a82395bf7c
commit d7ac0a9bcc
12 changed files with 23 additions and 26 deletions

View File

@ -536,7 +536,6 @@ if (rtc_include_tests) {
deps = [
"base:rtc_base",
"base:rtc_base_tests_utils",
"base:rtc_exp_filter",
"base:rtc_task_queue",
"p2p:libstunprober",
"p2p:rtc_p2p",

View File

@ -22,7 +22,6 @@ group("base") {
public_deps = [
":rtc_base",
":rtc_base_approved",
":rtc_exp_filter",
":rtc_task_queue",
]
if (is_android) {
@ -125,6 +124,8 @@ rtc_static_library("rtc_base_approved") {
"event.h",
"event_tracer.cc",
"event_tracer.h",
"exp_filter.cc",
"exp_filter.h",
"file.cc",
"file.h",
"format_macros.h",
@ -337,13 +338,6 @@ rtc_static_library("rtc_task_queue") {
}
}
rtc_static_library("rtc_exp_filter") {
sources = [
"exp_filter.cc",
"exp_filter.h",
]
}
config("rtc_base_warnings_config") {
if (is_win && is_clang) {
cflags = [

View File

@ -86,8 +86,6 @@ rtc_static_library("common_audio") {
"signal_processing/splitting_filter.c",
"signal_processing/sqrt_of_one_minus_x_squared.c",
"signal_processing/vector_scaling_operations.c",
"smoothing_filter.cc",
"smoothing_filter.h",
"sparse_fir_filter.cc",
"sparse_fir_filter.h",
"vad/include/vad.h",
@ -111,7 +109,6 @@ rtc_static_library("common_audio") {
]
deps = [
"../base:rtc_exp_filter",
"../system_wrappers",
]
@ -260,7 +257,6 @@ if (rtc_include_tests) {
"ring_buffer_unittest.cc",
"signal_processing/real_fft_unittest.cc",
"signal_processing/signal_processing_unittest.cc",
"smoothing_filter_unittest.cc",
"sparse_fir_filter_unittest.cc",
"vad/vad_core_unittest.cc",
"vad/vad_filterbank_unittest.cc",

View File

@ -264,6 +264,7 @@ if (rtc_include_tests) {
"audio_coding/audio_network_adaptor/frame_length_controller_unittest.cc",
"audio_coding/audio_network_adaptor/mock/mock_controller.h",
"audio_coding/audio_network_adaptor/mock/mock_controller_manager.h",
"audio_coding/audio_network_adaptor/smoothing_filter_unittest.cc",
]
deps = [
"audio_coding:audio_network_adaptor",

View File

@ -757,6 +757,8 @@ rtc_static_library("audio_network_adaptor") {
"audio_network_adaptor/frame_length_controller.cc",
"audio_network_adaptor/frame_length_controller.h",
"audio_network_adaptor/include/audio_network_adaptor.h",
"audio_network_adaptor/smoothing_filter.cc",
"audio_network_adaptor/smoothing_filter.h",
]
deps = [

View File

@ -14,8 +14,8 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
#include "webrtc/common_audio/smoothing_filter.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/controller.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
namespace webrtc {

View File

@ -10,8 +10,8 @@
#include <utility>
#include "webrtc/common_audio/mocks/mock_smoothing_filter.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_smoothing_filter.h"
#include "webrtc/test/gtest.h"
namespace webrtc {
@ -55,6 +55,7 @@ FecControllerStates CreateFecController(bool initial_fec_enabled) {
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter(
new NiceMock<MockSmoothingFilter>());
states.packet_loss_smoothed = mock_smoothing_filter.get();
EXPECT_CALL(*states.packet_loss_smoothed, Die());
using Threshold = FecController::Config::Threshold;
states.controller.reset(new FecController(
FecController::Config(
@ -261,6 +262,7 @@ TEST(FecControllerTest, CheckBehaviorOnSpecialCurves) {
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter(
new NiceMock<MockSmoothingFilter>());
states.packet_loss_smoothed = mock_smoothing_filter.get();
EXPECT_CALL(*states.packet_loss_smoothed, Die());
using Threshold = FecController::Config::Threshold;
states.controller.reset(new FecController(
FecController::Config(
@ -291,6 +293,7 @@ TEST(FecControllerDeathTest, InvalidConfig) {
std::unique_ptr<MockSmoothingFilter> mock_smoothing_filter(
new NiceMock<MockSmoothingFilter>());
states.packet_loss_smoothed = mock_smoothing_filter.get();
EXPECT_CALL(*states.packet_loss_smoothed, Die());
using Threshold = FecController::Config::Threshold;
EXPECT_DEATH(
states.controller.reset(new FecController(

View File

@ -8,20 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_
#define WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_
#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_SMOOTHING_FILTER_H_
#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_SMOOTHING_FILTER_H_
#include "webrtc/common_audio/smoothing_filter.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
#include "webrtc/test/gmock.h"
namespace webrtc {
class MockSmoothingFilter : public SmoothingFilter {
public:
virtual ~MockSmoothingFilter() { Die(); }
MOCK_METHOD0(Die, void());
MOCK_METHOD1(AddSample, void(float));
MOCK_CONST_METHOD0(GetAverage, rtc::Optional<float>());
};
} // namespace webrtc
#endif // WEBRTC_COMMON_AUDIO_MOCKS_MOCK_SMOOTHING_FILTER_H_
#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_MOCK_MOCK_SMOOTHING_FILTER_H_

View File

@ -10,7 +10,7 @@
#include <cmath>
#include "webrtc/common_audio/smoothing_filter.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
namespace webrtc {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
#define WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_
#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/exp_filter.h"
@ -46,9 +46,9 @@ class SmoothingFilterImpl final : public SmoothingFilter {
int64_t last_sample_time_ms_;
rtc::ExpFilter filter_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SmoothingFilterImpl);
RTC_DISALLOW_COPY_AND_ASSIGN(SmoothingFilterImpl);
};
} // namespace webrtc
#endif // WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_

View File

@ -10,7 +10,7 @@
#include <memory>
#include "webrtc/common_audio/smoothing_filter.h"
#include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
#include "webrtc/test/gtest.h"
namespace webrtc {

View File

@ -9,8 +9,8 @@
*/
#include <memory>
#include "webrtc/modules/audio_coding/audio_network_adaptor/smoothing_filter.h"
#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/gtest.h"
namespace webrtc {