diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index 9371947dadd..8cd7ab48dff 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -1119,11 +1119,6 @@ rtc_source_set("neteq_tools_minimal") { "neteq/tools/packet_source.h", ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - deps = [ ":neteq", "../..:typedefs", @@ -1510,31 +1505,22 @@ if (rtc_include_tests) { "neteq/audio_decoder_unittest.cc", ] - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } - - deps = [ - "../../test:fileutils", - ] - defines = neteq_defines - deps += audio_coding_deps - deps += [ - ":ilbc", - ":isac", - ":isac_fix", - ":neteq", - ":neteq_tools", - "../../api/audio_codecs:audio_codecs_api", - "../../api/audio_codecs/opus:audio_encoder_opus", - "../../common_audio", - "../../rtc_base:protobuf_utils", - "../../test:test_main", - "//testing/gtest", - ] + deps = [ + ":ilbc", + ":isac", + ":isac_fix", + ":neteq", + ":neteq_tools", + "../../test:fileutils", + "../../api/audio_codecs:audio_codecs_api", + "../../api/audio_codecs/opus:audio_encoder_opus", + "../../common_audio", + "../../rtc_base:protobuf_utils", + "../../test:test_main", + "//testing/gtest", + ] + audio_coding_deps data = audio_decoder_unittests_resources @@ -1545,7 +1531,7 @@ if (rtc_include_tests) { if (is_ios) { deps += [ ":audio_decoder_unittests_bundle_data" ] } - } # audio_decoder_unittests + } if (rtc_enable_protobuf) { proto_library("neteq_unittest_proto") { @@ -1777,11 +1763,6 @@ if (rtc_include_tests) { "../../system_wrappers:system_wrappers_default", "//testing/gtest", ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } } rtc_executable("neteq_opus_quality_test") { @@ -2020,11 +2001,6 @@ if (rtc_include_tests) { "../../test:test_main", "//testing/gtest", ] - - if (!build_with_chromium && is_clang) { - # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). - suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] - } } rtc_source_set("audio_coding_unittests") { diff --git a/modules/audio_coding/codecs/opus/opus_fec_test.cc b/modules/audio_coding/codecs/opus/opus_fec_test.cc index f1983ae9c49..4fab8a75a35 100644 --- a/modules/audio_coding/codecs/opus/opus_fec_test.cc +++ b/modules/audio_coding/codecs/opus/opus_fec_test.cc @@ -38,8 +38,8 @@ class OpusFecTest : public TestWithParam { protected: OpusFecTest(); - virtual void SetUp(); - virtual void TearDown(); + void SetUp() override; + void TearDown() override; virtual void EncodeABlock(); diff --git a/modules/audio_coding/neteq/audio_decoder_unittest.cc b/modules/audio_coding/neteq/audio_decoder_unittest.cc index 54ede6f4e3d..1ad48350bbb 100644 --- a/modules/audio_coding/neteq/audio_decoder_unittest.cc +++ b/modules/audio_coding/neteq/audio_decoder_unittest.cc @@ -100,16 +100,16 @@ class AudioDecoderTest : public ::testing::Test { payload_type_(17), decoder_(NULL) {} - virtual ~AudioDecoderTest() {} + ~AudioDecoderTest() override {} - virtual void SetUp() { + void SetUp() override { if (audio_encoder_) codec_input_rate_hz_ = audio_encoder_->SampleRateHz(); // Create arrays. ASSERT_GT(data_length_, 0u) << "The test must set data_length_ > 0"; } - virtual void TearDown() { + void TearDown() override { delete decoder_; decoder_ = NULL; } diff --git a/modules/audio_coding/neteq/tools/encode_neteq_input.cc b/modules/audio_coding/neteq/tools/encode_neteq_input.cc index f0d5b6fbb6a..c5766706581 100644 --- a/modules/audio_coding/neteq/tools/encode_neteq_input.cc +++ b/modules/audio_coding/neteq/tools/encode_neteq_input.cc @@ -27,6 +27,8 @@ EncodeNetEqInput::EncodeNetEqInput(std::unique_ptr generator, CreatePacket(); } +EncodeNetEqInput::~EncodeNetEqInput() = default; + absl::optional EncodeNetEqInput::NextPacketTime() const { RTC_DCHECK(packet_data_); return static_cast(packet_data_->time_ms); @@ -50,6 +52,10 @@ void EncodeNetEqInput::AdvanceOutputEvent() { next_output_event_ms_ += kOutputPeriodMs; } +bool EncodeNetEqInput::ended() const { + return next_output_event_ms_ <= input_duration_ms_; +} + absl::optional EncodeNetEqInput::NextHeader() const { RTC_DCHECK(packet_data_); return packet_data_->header; diff --git a/modules/audio_coding/neteq/tools/encode_neteq_input.h b/modules/audio_coding/neteq/tools/encode_neteq_input.h index a75262b2158..caa9ac76f41 100644 --- a/modules/audio_coding/neteq/tools/encode_neteq_input.h +++ b/modules/audio_coding/neteq/tools/encode_neteq_input.h @@ -35,6 +35,7 @@ class EncodeNetEqInput : public NetEqInput { EncodeNetEqInput(std::unique_ptr generator, std::unique_ptr encoder, int64_t input_duration_ms); + ~EncodeNetEqInput() override; absl::optional NextPacketTime() const override; @@ -44,9 +45,7 @@ class EncodeNetEqInput : public NetEqInput { void AdvanceOutputEvent() override; - bool ended() const override { - return next_output_event_ms_ <= input_duration_ms_; - } + bool ended() const override; absl::optional NextHeader() const override; diff --git a/modules/audio_coding/neteq/tools/neteq_input.cc b/modules/audio_coding/neteq/tools/neteq_input.cc index fed3eccea7c..bb2a01e0e17 100644 --- a/modules/audio_coding/neteq/tools/neteq_input.cc +++ b/modules/audio_coding/neteq/tools/neteq_input.cc @@ -15,6 +15,9 @@ namespace webrtc { namespace test { +NetEqInput::PacketData::PacketData() = default; +NetEqInput::PacketData::~PacketData() = default; + std::string NetEqInput::PacketData::ToString() const { std::stringstream ss; ss << "{" @@ -34,6 +37,8 @@ TimeLimitedNetEqInput::TimeLimitedNetEqInput(std::unique_ptr input, start_time_ms_(input_->NextEventTime()), duration_ms_(duration_ms) {} +TimeLimitedNetEqInput::~TimeLimitedNetEqInput() = default; + absl::optional TimeLimitedNetEqInput::NextPacketTime() const { return ended_ ? absl::nullopt : input_->NextPacketTime(); } diff --git a/modules/audio_coding/neteq/tools/neteq_input.h b/modules/audio_coding/neteq/tools/neteq_input.h index 16915853d19..b9cba098d86 100644 --- a/modules/audio_coding/neteq/tools/neteq_input.h +++ b/modules/audio_coding/neteq/tools/neteq_input.h @@ -28,6 +28,8 @@ namespace test { class NetEqInput { public: struct PacketData { + PacketData(); + ~PacketData(); std::string ToString() const; RTPHeader header; @@ -84,6 +86,7 @@ class NetEqInput { class TimeLimitedNetEqInput : public NetEqInput { public: TimeLimitedNetEqInput(std::unique_ptr input, int64_t duration_ms); + ~TimeLimitedNetEqInput() override; absl::optional NextPacketTime() const override; absl::optional NextOutputEventTime() const override; std::unique_ptr PopPacket() override; diff --git a/modules/audio_coding/neteq/tools/neteq_test.cc b/modules/audio_coding/neteq/tools/neteq_test.cc index e2bed562c2b..3448f4e840f 100644 --- a/modules/audio_coding/neteq/tools/neteq_test.cc +++ b/modules/audio_coding/neteq/tools/neteq_test.cc @@ -46,6 +46,8 @@ NetEqTest::NetEqTest(const NetEq::Config& config, RegisterExternalDecoders(ext_codecs); } +NetEqTest::~NetEqTest() = default; + int64_t NetEqTest::Run() { const int64_t start_time_ms = *input_->NextEventTime(); int64_t time_now_ms = start_time_ms; diff --git a/modules/audio_coding/neteq/tools/neteq_test.h b/modules/audio_coding/neteq/tools/neteq_test.h index 9c05fc468ac..ada6bab5bce 100644 --- a/modules/audio_coding/neteq/tools/neteq_test.h +++ b/modules/audio_coding/neteq/tools/neteq_test.h @@ -82,7 +82,7 @@ class NetEqTest { std::unique_ptr output, Callbacks callbacks); - ~NetEqTest() = default; + ~NetEqTest(); // Runs the test. Returns the duration of the produced audio in ms. int64_t Run(); diff --git a/modules/audio_coding/neteq/tools/rtp_file_source.h b/modules/audio_coding/neteq/tools/rtp_file_source.h index b44bc64d39a..013333b89a3 100644 --- a/modules/audio_coding/neteq/tools/rtp_file_source.h +++ b/modules/audio_coding/neteq/tools/rtp_file_source.h @@ -39,7 +39,7 @@ class RtpFileSource : public PacketSource { static bool ValidRtpDump(const std::string& file_name); static bool ValidPcap(const std::string& file_name); - virtual ~RtpFileSource(); + ~RtpFileSource() override; // Registers an RTP header extension and binds it to |id|. virtual bool RegisterRtpHeaderExtension(RTPExtensionType type, uint8_t id);