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

Side by Side Diff: webrtc/modules/video_coding/video_sender.cc

Issue 1972183004: Reland "Remove ViEEncoder::SetNetworkStatus" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 rtc::CritScope cs(&encoder_crit_); 221 rtc::CritScope cs(&encoder_crit_);
222 if (_encoder) { 222 if (_encoder) {
223 SetEncoderParameters(encoder_params); 223 SetEncoderParameters(encoder_params);
224 } 224 }
225 } 225 }
226 226
227 return VCM_OK; 227 return VCM_OK;
228 } 228 }
229 229
230 void VideoSender::SetEncoderParameters(EncoderParameters params) { 230 void VideoSender::SetEncoderParameters(EncoderParameters params) {
231 // |target_bitrate == 0 | means that the network is down or the send pacer is
232 // full.
233 // TODO(perkj): Consider setting |target_bitrate| == 0 to the encoders.
234 // especially if |encoder_has_internal_source_ | == true.
stefan-webrtc 2016/05/13 12:33:55 Especially
perkj_webrtc 2016/05/13 13:03:28 Done.
231 if (params.target_bitrate == 0) 235 if (params.target_bitrate == 0)
232 return; 236 return;
233 237
234 if (params.input_frame_rate == 0) { 238 if (params.input_frame_rate == 0) {
235 // No frame rate estimate available, use default. 239 // No frame rate estimate available, use default.
236 params.input_frame_rate = current_codec_.maxFramerate; 240 params.input_frame_rate = current_codec_.maxFramerate;
237 } 241 }
238 if (_encoder != nullptr) 242 if (_encoder != nullptr)
239 _encoder->SetEncoderParameters(params); 243 _encoder->SetEncoderParameters(params);
240 } 244 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // 10 kbps. 382 // 10 kbps.
379 int window_bps = std::max(threshold_bps / 10, 10000); 383 int window_bps = std::max(threshold_bps / 10, 10000);
380 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); 384 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps);
381 } 385 }
382 386
383 bool VideoSender::VideoSuspended() const { 387 bool VideoSender::VideoSuspended() const {
384 return _mediaOpt.IsVideoSuspended(); 388 return _mediaOpt.IsVideoSuspended();
385 } 389 }
386 } // namespace vcm 390 } // namespace vcm
387 } // namespace webrtc 391 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698