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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc

Issue 3009363002: Only use BBRs pacer if the unit test is running BBR. (Closed)
Patch Set: Created 3 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc b/webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc
index 33209cab267debfaa9f4033fa1ce3139d52a533e..1eed3809d758455ea86346c210c1695afdc26ff6 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/packet_sender.cc
@@ -159,9 +159,10 @@ PacedVideoSender::PacedVideoSender(PacketProcessorListener* listener,
VideoSource* source,
BandwidthEstimatorType estimator)
: VideoSender(listener, source, estimator),
- // Ugly hack to use BBR's pacer.
- // TODO(gnish): Make pacer choice dependant on the algorithm being used.
- pacer_(new BbrPacedSender(&clock_, this, nullptr)) {
+ pacer_(
+ estimator == kBbrEstimator
+ ? static_cast<Pacer*>(new BbrPacedSender(&clock_, this, nullptr))
+ : static_cast<Pacer*>(new PacedSender(&clock_, this, nullptr))) {
modules_.push_back(pacer_.get());
pacer_->SetEstimatedBitrate(source->bits_per_second());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698