OLD | NEW |
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 encoder_params = encoder_params_; | 306 encoder_params = encoder_params_; |
307 encoder_params_.updated = false; | 307 encoder_params_.updated = false; |
308 } | 308 } |
309 rtc::CritScope lock(&send_crit_); | 309 rtc::CritScope lock(&send_crit_); |
310 SetEncoderParameters(encoder_params); | 310 SetEncoderParameters(encoder_params); |
311 if (_encoder == nullptr) { | 311 if (_encoder == nullptr) { |
312 return VCM_UNINITIALIZED; | 312 return VCM_UNINITIALIZED; |
313 } | 313 } |
314 // TODO(holmer): Add support for dropping frames per stream. Currently we | 314 // TODO(holmer): Add support for dropping frames per stream. Currently we |
315 // only have one frame dropper for all streams. | 315 // only have one frame dropper for all streams. |
316 if (_nextFrameTypes[0] == kFrameEmpty) { | 316 if (_nextFrameTypes[0] == kEmptyFrame) { |
317 return VCM_OK; | 317 return VCM_OK; |
318 } | 318 } |
319 if (_mediaOpt.DropFrame()) { | 319 if (_mediaOpt.DropFrame()) { |
320 _encoder->OnDroppedFrame(); | 320 _encoder->OnDroppedFrame(); |
321 return VCM_OK; | 321 return VCM_OK; |
322 } | 322 } |
323 _mediaOpt.UpdateContentData(contentMetrics); | 323 _mediaOpt.UpdateContentData(contentMetrics); |
324 // TODO(pbos): Make sure setting send codec is synchronized with video | 324 // TODO(pbos): Make sure setting send codec is synchronized with video |
325 // processing so frame size always matches. | 325 // processing so frame size always matches. |
326 if (!_codecDataBase.MatchesCurrentResolution(videoFrame.width(), | 326 if (!_codecDataBase.MatchesCurrentResolution(videoFrame.width(), |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 int window_bps = std::max(threshold_bps / 10, 10000); | 387 int window_bps = std::max(threshold_bps / 10, 10000); |
388 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); | 388 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); |
389 } | 389 } |
390 | 390 |
391 bool VideoSender::VideoSuspended() const { | 391 bool VideoSender::VideoSuspended() const { |
392 rtc::CritScope lock(&send_crit_); | 392 rtc::CritScope lock(&send_crit_); |
393 return _mediaOpt.IsVideoSuspended(); | 393 return _mediaOpt.IsVideoSuspended(); |
394 } | 394 } |
395 } // namespace vcm | 395 } // namespace vcm |
396 } // namespace webrtc | 396 } // namespace webrtc |
OLD | NEW |