Reland "Reland "Refactor NetEq delay manager logic.""

This is a reland of 2a7c57c34f323ee1977f6e7809ee23bfcf9a7459

Original change's description:
> Reland "Refactor NetEq delay manager logic."
>
> This is a reland of f8e62fcb14e37a5be4f1e4f599d34c8483fea8e9
>
> Original change's description:
> > Refactor NetEq delay manager logic.
> >
> > - Removes dependence on sequence number for calculating target delay.
> > - Changes target delay unit to milliseconds instead of number of
> >   packets.
> > - Moves acceleration/preemptive expand thresholds to decision logic.
> >   Tests for this will be added in a follow up cl.
> >
> > Bug: webrtc:10333
> > Change-Id: If690aae4abf41ef1d9353f0ff01fb7d121cf8a26
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186265
> > Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> > Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32326}
>
> Bug: webrtc:10333
> Change-Id: Iad5e7063f63b84762959ee5b412f5f14a7b2cd06
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186943
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32332}

Bug: webrtc:10333
Change-Id: If2244ee9a3d56a0cfa9b602e7bdf448dc6340147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187356
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32367}
This commit is contained in:
Jakob Ivarsson
2020-10-09 13:41:06 +02:00
committed by Commit Bot
parent 9577be3693
commit 80fb978990
12 changed files with 284 additions and 623 deletions

View File

@ -804,8 +804,10 @@ TEST_P(NetEqImplTestSampleRateParameter,
EXPECT_EQ(NetEq::kOK, neteq_->GetAudio(&output, &muted));
}
// Insert one more packet.
insert_packet();
// Insert a few packets to avoid postpone decoding after expand.
for (size_t i = 0; i < 5; ++i) {
insert_packet();
}
// Pull audio until the newly inserted packet is decoded and the PLC ends.
while (output.speech_type_ != AudioFrame::kNormalSpeech) {
@ -881,8 +883,10 @@ TEST_P(NetEqImplTestSampleRateParameter, AudioInterruptionLogged) {
EXPECT_NE(AudioFrame::kNormalSpeech, output.speech_type_);
}
// Insert one more packet.
insert_packet();
// Insert a few packets to avoid postpone decoding after expand.
for (size_t i = 0; i < 5; ++i) {
insert_packet();
}
// Pull audio until the newly inserted packet is decoded and the PLC ends.
while (output.speech_type_ != AudioFrame::kNormalSpeech) {
@ -1299,7 +1303,7 @@ TEST_F(NetEqImplTest, DecodingError) {
SdpAudioFormat("L16", 8000, 1)));
// Insert packets.
for (int i = 0; i < 6; ++i) {
for (int i = 0; i < 20; ++i) {
rtp_header.sequenceNumber += 1;
rtp_header.timestamp += kFrameLengthSamples;
EXPECT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header, payload));