Distinguish between missing packet and send failure.

This CL introduces three-value enum, in order to be able to distinguish
between send success, send failure, and invalid states such as missing
packet or invalid ssrc.

The behavior is unchanged in this CL, a follow-up will change the pacer
to not consume media budget on invalid states.

Bug: webrtc:8052,webrtc:8975
Change-Id: I1c9e2226f995356daa538d3d3cf44945f35e0133
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135165
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27923}
This commit is contained in:
Erik Språng
2019-05-10 08:29:01 -07:00
committed by Commit Bot
parent d7c7d0ed88
commit d28796209b
17 changed files with 215 additions and 171 deletions

View File

@ -133,11 +133,12 @@ class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
int payload_type,
bool force_sender_report) override;
bool TimeToSendPacket(uint32_t ssrc,
uint16_t sequence_number,
int64_t capture_time_ms,
bool retransmission,
const PacedPacketInfo& pacing_info) override;
RtpPacketSendResult TimeToSendPacket(
uint32_t ssrc,
uint16_t sequence_number,
int64_t capture_time_ms,
bool retransmission,
const PacedPacketInfo& pacing_info) override;
// Returns the number of padding bytes actually sent, which can be more or
// less than |bytes|.