Implement packet discard rate in NetEq.
BUG=webrtc:7903 Change-Id: I819c9362671ca0b02c602d53e4dc39afdd8ec465 Reviewed-on: https://chromium-review.googlesource.com/555311 Commit-Queue: Minyue Li <minyue@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18899}
This commit is contained in:
committed by
Commit Bot
parent
889d9654f7
commit
fae474c9cd
@ -20,6 +20,7 @@
|
||||
namespace webrtc {
|
||||
|
||||
class DecoderDatabase;
|
||||
class StatisticsCalculator;
|
||||
class TickTimer;
|
||||
|
||||
// This is the actual buffer holding the packets before decoding.
|
||||
@ -92,22 +93,24 @@ class PacketBuffer {
|
||||
// Discards the first packet in the buffer. The packet is deleted.
|
||||
// Returns PacketBuffer::kBufferEmpty if the buffer is empty,
|
||||
// PacketBuffer::kOK otherwise.
|
||||
virtual int DiscardNextPacket();
|
||||
virtual int DiscardNextPacket(StatisticsCalculator* stats);
|
||||
|
||||
// Discards all packets that are (strictly) older than timestamp_limit,
|
||||
// but newer than timestamp_limit - horizon_samples. Setting horizon_samples
|
||||
// to zero implies that the horizon is set to half the timestamp range. That
|
||||
// is, if a packet is more than 2^31 timestamps into the future compared with
|
||||
// timestamp_limit (including wrap-around), it is considered old.
|
||||
// Returns number of packets discarded.
|
||||
virtual int DiscardOldPackets(uint32_t timestamp_limit,
|
||||
uint32_t horizon_samples);
|
||||
virtual void DiscardOldPackets(uint32_t timestamp_limit,
|
||||
uint32_t horizon_samples,
|
||||
StatisticsCalculator* stats);
|
||||
|
||||
// Discards all packets that are (strictly) older than timestamp_limit.
|
||||
virtual int DiscardAllOldPackets(uint32_t timestamp_limit);
|
||||
virtual void DiscardAllOldPackets(uint32_t timestamp_limit,
|
||||
StatisticsCalculator* stats);
|
||||
|
||||
// Removes all packets with a specific payload type from the buffer.
|
||||
virtual void DiscardPacketsWithPayloadType(uint8_t payload_type);
|
||||
virtual void DiscardPacketsWithPayloadType(uint8_t payload_type,
|
||||
StatisticsCalculator* stats);
|
||||
|
||||
// Returns the number of packets in the buffer, including duplicates and
|
||||
// redundant packets.
|
||||
|
||||
Reference in New Issue
Block a user