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}
This commit is contained in:

committed by
Commit Bot

parent
76d3e7a8d1
commit
f8e62fcb14
@ -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));
|
||||
|
Reference in New Issue
Block a user