Default enable delay adaptation during DTX.

Bug: webrtc:10736
Change-Id: I5dcc431211c6c1c89b4d7d1ab07b23d63c0550d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201385
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32999}
This commit is contained in:
Jakob Ivarsson
2021-01-15 14:39:26 +01:00
committed by Commit Bot
parent 5ab6a8cea9
commit 59bdcbe3c9
4 changed files with 52 additions and 52 deletions

View File

@ -987,15 +987,6 @@ TEST_F(NetEqImplTest, CodecInternalCng) {
EXPECT_TRUE(neteq_->RegisterPayloadType(kPayloadType,
SdpAudioFormat("opus", 48000, 2)));
// Insert one packet (decoder will return speech).
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
// Insert second packet (decoder will return CNG).
payload[0] = 1;
rtp_header.sequenceNumber++;
rtp_header.timestamp += kPayloadLengthSamples;
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
const size_t kMaxOutputSize = static_cast<size_t>(10 * kSampleRateKhz);
AudioFrame output;
AudioFrame::SpeechType expected_type[8] = {
@ -1012,11 +1003,20 @@ TEST_F(NetEqImplTest, CodecInternalCng) {
50 * kSampleRateKhz,
10 * kSampleRateKhz};
// Insert one packet (decoder will return speech).
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
bool muted;
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
absl::optional<uint32_t> last_timestamp = neteq_->GetPlayoutTimestamp();
ASSERT_TRUE(last_timestamp);
// Insert second packet (decoder will return CNG).
payload[0] = 1;
rtp_header.sequenceNumber++;
rtp_header.timestamp += kPayloadLengthSamples;
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));
// Lambda for verifying the timestamps.
auto verify_timestamp = [&last_timestamp, &expected_timestamp_increment](
absl::optional<uint32_t> ts, size_t i) {