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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2532433002: Add overhead to audio bwe min, max. (Closed)
Patch Set: Added a todo. Created 4 years 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/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index 96f9ed70d403c6c464cc9b015f83190630a0b331..b91529cb567106a869fd89a49ab3de7ce54360ad 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -1420,8 +1420,23 @@ class WebRtcVoiceMediaChannel::WebRtcAudioSendStream
"Enabled") {
// TODO(mflodman): Keep testing this and set proper values.
// Note: This is an early experiment currently only supported by Opus.
- config_.min_bitrate_bps = kOpusMinBitrateBps;
- config_.max_bitrate_bps = kOpusBitrateFbBps;
+ if (webrtc::field_trial::FindFullName(
+ "WebRTC-SendSideBwe-WithOverhead") == "Enabled") {
+ // TODO(michaelt): We should let the audio encoder decide which max/min
+ // bitrate he would prefer.
minyue-webrtc 2017/01/10 22:16:19 he -> it
+
+ // OverheadPerPacket(58) = Ipv4(20B) + UDP(8B) + SRTP(10B) + RTP(12)
+ // + RTP_ext(8);
+ // kMaxOverheadBps = OverheadPerPacket * 8 * 1000ms / frame_length(20ms)
the sun 2017/01/09 15:03:55 nit: make the order min max throughout the block.
michaelt 2017/01/09 15:56:57 Done.
+ // kMinOverheadBps = OverheadPerPacket * 8 * 1000ms / frame_length(60ms)
+ constexpr int kMaxOverheadBps = 23200;
+ constexpr int kMinOverheadBps = 7733;
+ config_.min_bitrate_bps = kOpusMinBitrateBps + kMinOverheadBps;
+ config_.max_bitrate_bps = kOpusBitrateFbBps + kMaxOverheadBps;
+ } else {
+ config_.min_bitrate_bps = kOpusMinBitrateBps;
+ config_.max_bitrate_bps = kOpusBitrateFbBps;
+ }
}
stream_ = call_->CreateAudioSendStream(config_);
RTC_CHECK(stream_);
« 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