Migrated GN target :neteq_ilbc_quality_test
Migrated GN target :neteq_ilbc_quality_test from webrtc/modules/audio_coding/neteq/neteq_tests.gypi NOTRY=True BUG=webrtc:6190 Review-Url: https://codereview.webrtc.org/2221193004 Cr-Commit-Position: refs/heads/master@{#13708}
This commit is contained in:
@ -1167,6 +1167,7 @@ if (rtc_include_tests) {
|
||||
"neteq/tools/audio_checksum.h",
|
||||
"neteq/tools/audio_loop.cc",
|
||||
"neteq/tools/audio_loop.h",
|
||||
"neteq/tools/audio_sink.cc",
|
||||
"neteq/tools/audio_sink.h",
|
||||
"neteq/tools/constant_pcm_packet_source.cc",
|
||||
"neteq/tools/constant_pcm_packet_source.h",
|
||||
@ -1388,17 +1389,12 @@ if (rtc_include_tests) {
|
||||
deps = [
|
||||
":neteq",
|
||||
":neteq_test_support",
|
||||
":neteq_unittest_tools",
|
||||
":webrtc_opus",
|
||||
"../../test:test_support_main",
|
||||
"//testing/gtest",
|
||||
"//third_party/gflags",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugins
|
||||
# (bugs.webrtc.org/163).
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
executable("neteq_speed_test") {
|
||||
@ -1428,4 +1424,23 @@ if (rtc_include_tests) {
|
||||
"../../system_wrappers:system_wrappers_default",
|
||||
]
|
||||
}
|
||||
|
||||
executable("neteq_ilbc_quality_test") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"neteq/test/neteq_ilbc_quality_test.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":ilbc",
|
||||
":neteq",
|
||||
":neteq_test_support",
|
||||
":neteq_unittest_tools",
|
||||
"../../system_wrappers:system_wrappers_default",
|
||||
"../../test:test_support_main",
|
||||
"//testing/gtest",
|
||||
"//third_party/gflags",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,6 +228,7 @@
|
||||
'tools/audio_loop.cc',
|
||||
'tools/audio_loop.h',
|
||||
'tools/audio_sink.h',
|
||||
'tools/audio_sink.cc',
|
||||
'tools/constant_pcm_packet_source.cc',
|
||||
'tools/constant_pcm_packet_source.h',
|
||||
'tools/fake_decode_from_file.cc',
|
||||
|
||||
@ -241,6 +241,7 @@
|
||||
'dependencies': [
|
||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
|
||||
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
|
||||
'<(webrtc_root)/test/test.gyp:test_support_main',
|
||||
'neteq',
|
||||
'neteq_test_support',
|
||||
|
||||
21
webrtc/modules/audio_coding/neteq/tools/audio_sink.cc
Normal file
21
webrtc/modules/audio_coding/neteq/tools/audio_sink.cc
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
bool AudioSinkFork::WriteArray(const int16_t* audio, size_t num_samples) {
|
||||
return left_sink_->WriteArray(audio, num_samples) &&
|
||||
right_sink_->WriteArray(audio, num_samples);
|
||||
}
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
@ -47,10 +47,7 @@ class AudioSinkFork : public AudioSink {
|
||||
AudioSinkFork(AudioSink* left, AudioSink* right)
|
||||
: left_sink_(left), right_sink_(right) {}
|
||||
|
||||
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||
return left_sink_->WriteArray(audio, num_samples) &&
|
||||
right_sink_->WriteArray(audio, num_samples);
|
||||
}
|
||||
bool WriteArray(const int16_t* audio, size_t num_samples) override;
|
||||
|
||||
private:
|
||||
AudioSink* left_sink_;
|
||||
@ -58,6 +55,7 @@ class AudioSinkFork : public AudioSink {
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(AudioSinkFork);
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_AUDIO_SINK_H_
|
||||
|
||||
Reference in New Issue
Block a user