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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 { | 332 { |
333 // Change all keyframe requests to encode delta frames the next time. | 333 // Change all keyframe requests to encode delta frames the next time. |
334 rtc::CritScope lock(¶ms_crit_); | 334 rtc::CritScope lock(¶ms_crit_); |
335 for (size_t i = 0; i < next_frame_types_.size(); ++i) { | 335 for (size_t i = 0; i < next_frame_types_.size(); ++i) { |
336 // Check for equality (same requested as before encoding) to not | 336 // Check for equality (same requested as before encoding) to not |
337 // accidentally drop a keyframe request while encoding. | 337 // accidentally drop a keyframe request while encoding. |
338 if (next_frame_types[i] == next_frame_types_[i]) | 338 if (next_frame_types[i] == next_frame_types_[i]) |
339 next_frame_types_[i] = kVideoFrameDelta; | 339 next_frame_types_[i] = kVideoFrameDelta; |
340 } | 340 } |
341 } | 341 } |
342 if (qm_settings_callback_) | |
343 qm_settings_callback_->SetTargetFramerate(_encoder->GetTargetFramerate()); | |
344 return VCM_OK; | 342 return VCM_OK; |
345 } | 343 } |
346 | 344 |
347 int32_t VideoSender::IntraFrameRequest(int stream_index) { | 345 int32_t VideoSender::IntraFrameRequest(int stream_index) { |
348 { | 346 { |
349 rtc::CritScope lock(¶ms_crit_); | 347 rtc::CritScope lock(¶ms_crit_); |
350 if (stream_index < 0 || | 348 if (stream_index < 0 || |
351 static_cast<size_t>(stream_index) >= next_frame_types_.size()) { | 349 static_cast<size_t>(stream_index) >= next_frame_types_.size()) { |
352 return -1; | 350 return -1; |
353 } | 351 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // 10 kbps. | 392 // 10 kbps. |
395 int window_bps = std::max(threshold_bps / 10, 10000); | 393 int window_bps = std::max(threshold_bps / 10, 10000); |
396 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); | 394 _mediaOpt.SuspendBelowMinBitrate(threshold_bps, window_bps); |
397 } | 395 } |
398 | 396 |
399 bool VideoSender::VideoSuspended() const { | 397 bool VideoSender::VideoSuspended() const { |
400 return _mediaOpt.IsVideoSuspended(); | 398 return _mediaOpt.IsVideoSuspended(); |
401 } | 399 } |
402 } // namespace vcm | 400 } // namespace vcm |
403 } // namespace webrtc | 401 } // namespace webrtc |
OLD | NEW |