NetEq tests: BUILD target reorg

In this CL, the neteq_unittest_tools target is split in two separate
targets. One still called neteq_tools which does not set
testonly=true and that includes code related to audio input,
replacement audio and fake decoding. The other target called
neteq_test_tools contains the remaining files, and is
still under testonly=true.

Other renames:
neteq_test_tools -> neteq_test_tools_deprecated
neteq_test_minimal -> neteq_tools_minimal

Cyclic dependencies were also cleaned up.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_rel_ng,linux_chromium_compile_dbg_ng
BUG=webrtc:7467,webrtc:6828

Review-Url: https://codereview.webrtc.org/2845013003
Cr-Commit-Position: refs/heads/master@{#17921}
This commit is contained in:
henrik.lundin
2017-04-28 00:59:45 -07:00
committed by Commit bot
parent 777cb7b4c6
commit b637a94b63
4 changed files with 74 additions and 54 deletions

View File

@ -29,7 +29,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
RTC_DCHECK_GT(last_decoded_length_, 0);
std::fill_n(decoded, last_decoded_length_, 0);
*speech_type = kComfortNoise;
return last_decoded_length_;
return rtc::dchecked_cast<int>(last_decoded_length_);
}
RTC_CHECK_GE(encoded_len, 12);
@ -42,8 +42,8 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
if (last_decoded_length_ > 0) {
// Use length of last decoded packet, but since this is the total for all
// channels, we have to divide by 2 in the stereo case.
samples_to_decode = rtc::CheckedDivExact(
last_decoded_length_, static_cast<size_t>(stereo_ ? 2uL : 1uL));
samples_to_decode = rtc::dchecked_cast<int>(rtc::CheckedDivExact(
last_decoded_length_, static_cast<size_t>(stereo_ ? 2uL : 1uL)));
} else {
// This is the first packet to decode, and we do not know the length of
// it. Set it to 10 ms.
@ -70,7 +70,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
std::fill_n(decoded, last_decoded_length_, 0);
*speech_type = kComfortNoise;
cng_mode_ = true;
return last_decoded_length_;
return rtc::dchecked_cast<int>(last_decoded_length_);
}
cng_mode_ = false;
@ -83,7 +83,8 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
}
*speech_type = kSpeech;
return last_decoded_length_ = samples_to_decode;
last_decoded_length_ = samples_to_decode;
return rtc::dchecked_cast<int>(last_decoded_length_);
}
void FakeDecodeFromFile::PrepareEncoded(uint32_t timestamp,