Fix for NetEq simulations containing large gaps and multiple SSRCs.
This CL fixes 2 issues that affect NetEq simulations. - When using event logs with multiple SSRCs, it does not make sense to use more than a single SSRC. If the user does not provide an SSRC filter, we should use the first SSRC we find and no others. - It is possible for event logs to have a gap in the middle, and sometimes we don't store/mark the gap properly. If is possible to detect gaps by looking at the wallclock time delta between getAudio events. These should be 10 ms nominally, so values greater than 1000 should never happen and indicate an error. Bug: webrtc:11855 Change-Id: Idc3b8a7902be4159da48b063ef5c5c82fd484071 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181940 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31960}
This commit is contained in:
@ -267,8 +267,12 @@ NetEqTest::SimulationStepResult NetEqTest::RunToNextGetAudio() {
|
||||
prev_lifetime_stats_ = lifetime_stats;
|
||||
const bool no_more_packets_to_decode =
|
||||
!input_->NextPacketTime() && !operations_state.next_packet_available;
|
||||
result.is_simulation_finished =
|
||||
no_more_packets_to_decode || input_->ended();
|
||||
// End the simulation if the gap is too large. This indicates an issue
|
||||
// with the event log file.
|
||||
const bool simulation_step_too_large = result.simulation_step_ms > 1000;
|
||||
result.is_simulation_finished = simulation_step_too_large ||
|
||||
no_more_packets_to_decode ||
|
||||
input_->ended();
|
||||
prev_ops_state_ = operations_state;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -138,6 +138,11 @@ bool RtcEventLogSource::Initialize(const ParsedRtcEventLog& parsed_log,
|
||||
continue;
|
||||
}
|
||||
event_processor.AddEvents(rtp_packets.incoming_packets, handle_rtp_packet);
|
||||
// If no SSRC filter has been set, use the first SSRC only. The simulator
|
||||
// does not work properly with interleaved packets from multiple SSRCs.
|
||||
if (!ssrc_filter.has_value()) {
|
||||
ssrc_filter = rtp_packets.ssrc;
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& audio_playouts : parsed_log.audio_playout_events()) {
|
||||
|
||||
Reference in New Issue
Block a user