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

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

Issue 2655033002: Prioritize video packets when sending padding or preemptive retransmits. (Closed)
Patch Set: Created 3 years, 11 months 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
« no previous file with comments | « no previous file | webrtc/modules/pacing/packet_router_unittest.cc » ('j') | webrtc/video/video_send_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/packet_router.cc
diff --git a/webrtc/modules/pacing/packet_router.cc b/webrtc/modules/pacing/packet_router.cc
index af1d5595be9193f491058ab3b179a9161cfd5bec..0b9635508b1f59928185c29b5899a1f372a84ad2 100644
--- a/webrtc/modules/pacing/packet_router.cc
+++ b/webrtc/modules/pacing/packet_router.cc
@@ -30,7 +30,13 @@ void PacketRouter::AddRtpModule(RtpRtcp* rtp_module) {
rtc::CritScope cs(&modules_crit_);
RTC_DCHECK(std::find(rtp_modules_.begin(), rtp_modules_.end(), rtp_module) ==
rtp_modules_.end());
- rtp_modules_.push_back(rtp_module);
+ // Put modules which can use regular payload packets (over rtx) instead of
+ // padding first as it's less of a waste
+ if ((rtp_module->RtxSendStatus() & kRtxRedundantPayloads) > 0) {
+ rtp_modules_.push_front(rtp_module);
+ } else {
+ rtp_modules_.push_back(rtp_module);
+ }
}
void PacketRouter::RemoveRtpModule(RtpRtcp* rtp_module) {
« no previous file with comments | « no previous file | webrtc/modules/pacing/packet_router_unittest.cc » ('j') | webrtc/video/video_send_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698