Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(817)

Unified Diff: webrtc/modules/pacing/packet_router.cc

Issue 2491293002: Make FlexFEC packets paceable through RTPSender. (Closed)
Patch Set: EXPECT -> ASSERT Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/pacing/packet_router.cc
diff --git a/webrtc/modules/pacing/packet_router.cc b/webrtc/modules/pacing/packet_router.cc
index de8c2cee5a13c106501ccc4f47e1656866c2c57f..85d9ec0ab7bdec585a04fca19cce0a9d32d41821 100644
--- a/webrtc/modules/pacing/packet_router.cc
+++ b/webrtc/modules/pacing/packet_router.cc
@@ -48,7 +48,11 @@ bool PacketRouter::TimeToSendPacket(uint32_t ssrc,
RTC_DCHECK(pacer_thread_checker_.CalledOnValidThread());
rtc::CritScope cs(&modules_crit_);
for (auto* rtp_module : rtp_modules_) {
- if (rtp_module->SendingMedia() && ssrc == rtp_module->SSRC()) {
+ if (!rtp_module->SendingMedia())
brandtr 2016/11/11 10:28:16 Centralizing this check to the RTP module.
+ continue;
+ uint32_t media_ssrc = rtp_module->SSRC();
+ rtc::Optional<uint32_t> flexfec_ssrc = rtp_module->FlexfecSsrc();
+ if (ssrc == media_ssrc || (flexfec_ssrc && ssrc == flexfec_ssrc)) {
danilchap 2016/11/10 16:15:13 no need to check if optional is not nullopt before
brandtr 2016/11/11 10:28:16 Ah, ok. I didn't understand the declarations in ba
return rtp_module->TimeToSendPacket(ssrc, sequence_number,
capture_timestamp, retransmission,
probe_cluster_id);
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/include/flexfec_sender.h » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698