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