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

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

Issue 2740783006: Support removing b=AS bandwidth constraints. (Closed)
Patch Set: add back useful todo change Created 3 years, 9 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/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 6723b1b89fd466fa4b5332eabfd5c3f20215612a..2280f1b32309aa1d76803505c18d994d119a07cf 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -715,8 +715,10 @@ bool WebRtcVideoChannel2::GetChangedSendParameters(
// Handle max bitrate.
if (params.max_bandwidth_bps != send_params_.max_bandwidth_bps &&
- params.max_bandwidth_bps >= 0) {
- // 0 uncaps max bitrate (-1).
+ params.max_bandwidth_bps >= -1) {
+ // 0 or -1 uncaps max bitrate.
+ // TODO(pbos): Reconsider how 0 should be treated. It is not mentioned as a
+ // special value and might very well be used for stopping sending.
changed_params->max_bandwidth_bps = rtc::Optional<int>(
params.max_bandwidth_bps == 0 ? -1 : params.max_bandwidth_bps);
}
@@ -760,6 +762,13 @@ bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) {
}
if (changed_params.codec || changed_params.max_bandwidth_bps) {
+ if (params.max_bandwidth_bps == -1) {
+ // Removing b=AS: does (currently) not take presedence over codec max
+ // bitrate. This is to make an as minimal as possible change to be able to
+ // effectively remove b=AS in SDP. This should be reconsidered (codec max
+ // bitrate should probably not affect global call max bitrate).
Taylor Brandstetter 2017/03/10 18:42:08 nit: I think this comment would be unclear to some
pbos-webrtc 2017/03/10 18:52:09 Done. (But with my ldap.)
+ bitrate_config_.max_bitrate_bps = -1;
+ }
if (send_codec_) {
// TODO(holmer): Changing the codec parameters shouldn't necessarily mean
// that we change the min/max of bandwidth estimation. Reevaluate this.
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698