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

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

Issue 2650393002: Improve bitrate probing for the audio-only case. (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 | « webrtc/modules/pacing/alr_detector_unittest.cc ('k') | webrtc/modules/pacing/bitrate_prober_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/bitrate_prober.cc
diff --git a/webrtc/modules/pacing/bitrate_prober.cc b/webrtc/modules/pacing/bitrate_prober.cc
index bdf48fda1de5a793fb68f3545a16ba842f184c60..9d89df12436c73c066df3e77283c5c2ac13c55bf 100644
--- a/webrtc/modules/pacing/bitrate_prober.cc
+++ b/webrtc/modules/pacing/bitrate_prober.cc
@@ -64,9 +64,10 @@ bool BitrateProber::IsProbing() const {
void BitrateProber::OnIncomingPacket(size_t packet_size) {
// Don't initialize probing unless we have something large enough to start
// probing.
- if (probing_state_ == ProbingState::kInactive &&
- !clusters_.empty() &&
- packet_size >= PacedSender::kMinProbePacketSize) {
+ const size_t kMinProbePacketSize = 200;
philipel 2017/01/25 13:39:37 Move to anonymous namespace.
+ if (probing_state_ == ProbingState::kInactive && !clusters_.empty() &&
+ packet_size >=
+ std::min<size_t>(RecommendedMinProbeSize(), kMinProbePacketSize)) {
// Send next probe right away.
next_probe_time_ms_ = -1;
probing_state_ = ProbingState::kActive;
@@ -136,7 +137,7 @@ int BitrateProber::CurrentClusterId() const {
// feasible.
size_t BitrateProber::RecommendedMinProbeSize() const {
RTC_DCHECK(!clusters_.empty());
- return clusters_.front().bitrate_bps * 2 * kMinProbeDeltaMs / (8 * 1000);
+ return clusters_.front().bitrate_bps * 3 * kMinProbeDeltaMs / (8 * 1000);
}
void BitrateProber::ProbeSent(int64_t now_ms, size_t bytes) {
« no previous file with comments | « webrtc/modules/pacing/alr_detector_unittest.cc ('k') | webrtc/modules/pacing/bitrate_prober_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698