Add new_request flag to SendFullIntraRequest

This allows one to request the same sequence number again
in the case of resending an FIR to the a sender before the
sender has time to send a key-frame.

Bug: webrtc:11171
Change-Id: Idd8e8120ccbcc194cefb8d0cf3f7cc64e7f76aa5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161236
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30006}
This commit is contained in:
Evan Shrubsole
2019-12-04 13:50:28 +01:00
committed by Commit Bot
parent 17f82cfc68
commit 577b88dae7
6 changed files with 96 additions and 15 deletions

View File

@ -200,15 +200,19 @@ void RtcpTransceiverImpl::SendPictureLossIndication(uint32_t ssrc) {
}
void RtcpTransceiverImpl::SendFullIntraRequest(
rtc::ArrayView<const uint32_t> ssrcs) {
rtc::ArrayView<const uint32_t> ssrcs,
bool new_request) {
RTC_DCHECK(!ssrcs.empty());
if (!ready_to_send_)
return;
rtcp::Fir fir;
fir.SetSenderSsrc(config_.feedback_ssrc);
for (uint32_t media_ssrc : ssrcs)
fir.AddRequestTo(media_ssrc,
remote_senders_[media_ssrc].fir_sequence_number++);
for (uint32_t media_ssrc : ssrcs) {
uint8_t& command_seq_num = remote_senders_[media_ssrc].fir_sequence_number;
if (new_request)
command_seq_num += 1;
fir.AddRequestTo(media_ssrc, command_seq_num);
}
SendImmediateFeedback(fir);
}