Save delays in history for 2 seconds instead of fixed 100 packets.
Storing a fixed amount of packets does not work well with DTX since the history could include up to 20 seconds of packets which can potentially be negative in the event of clock drift or delay shifts. Bug: webrtc:10333 Change-Id: Ifb8543b7e999e17845cb0e4171066862941f370e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149832 Reviewed-by: Minyue Li <minyue@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28942}
This commit is contained in:

committed by
Commit Bot

parent
4e615d590a
commit
74154e65e8
@ -151,7 +151,9 @@ class DelayManager {
|
||||
int MaxBufferTimeQ75() const;
|
||||
|
||||
// Updates |delay_history_|.
|
||||
void UpdateDelayHistory(int iat_delay);
|
||||
void UpdateDelayHistory(int iat_delay_ms,
|
||||
uint32_t timestamp,
|
||||
int sample_rate_hz);
|
||||
|
||||
// Calculate relative packet arrival delay from |delay_history_|.
|
||||
int CalculateRelativePacketArrivalDelay() const;
|
||||
@ -203,7 +205,13 @@ class DelayManager {
|
||||
const bool frame_length_change_experiment_;
|
||||
const bool enable_rtx_handling_;
|
||||
int num_reordered_packets_ = 0; // Number of consecutive reordered packets.
|
||||
std::deque<int> delay_history_;
|
||||
|
||||
struct PacketDelay {
|
||||
int iat_delay_ms;
|
||||
uint32_t timestamp;
|
||||
};
|
||||
std::deque<PacketDelay> delay_history_;
|
||||
|
||||
// When current buffer level is more than
|
||||
// |deceleration_target_level_offset_ms_| below the target level, NetEq will
|
||||
// impose deceleration to increase the buffer level. The value is in Q8, and
|
||||
|
Reference in New Issue
Block a user