| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 void ViEEncoder::OnBitrateUpdated(uint32_t bitrate_bps, | 426 void ViEEncoder::OnBitrateUpdated(uint32_t bitrate_bps, |
| 427 uint8_t fraction_lost, | 427 uint8_t fraction_lost, |
| 428 int64_t round_trip_time_ms) { | 428 int64_t round_trip_time_ms) { |
| 429 LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps | 429 LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps |
| 430 << " packet loss " << static_cast<int>(fraction_lost) | 430 << " packet loss " << static_cast<int>(fraction_lost) |
| 431 << " rtt " << round_trip_time_ms; | 431 << " rtt " << round_trip_time_ms; |
| 432 video_sender_.SetChannelParameters(bitrate_bps, fraction_lost, | 432 video_sender_.SetChannelParameters(bitrate_bps, fraction_lost, |
| 433 round_trip_time_ms); | 433 round_trip_time_ms); |
| 434 bool video_is_suspended = video_sender_.VideoSuspended(); | 434 bool video_is_suspended = video_sender_.VideoSuspended(); |
| 435 bool video_suspension_changed; | 435 bool video_suspension_changed; |
| 436 |
| 436 { | 437 { |
| 437 rtc::CritScope lock(&data_cs_); | 438 rtc::CritScope lock(&data_cs_); |
| 438 last_observed_bitrate_bps_ = bitrate_bps; | 439 last_observed_bitrate_bps_ = bitrate_bps; |
| 439 video_suspension_changed = video_suspended_ != video_is_suspended; | 440 video_suspension_changed = video_suspended_ != video_is_suspended; |
| 440 video_suspended_ = video_is_suspended; | 441 video_suspended_ = video_is_suspended; |
| 441 } | 442 } |
| 442 | 443 |
| 443 if (!video_suspension_changed) | 444 if (!video_suspension_changed) |
| 444 return; | 445 return; |
| 445 // Video suspend-state changed, inform codec observer. | 446 // Video suspend-state changed, inform codec observer. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 457 } | 458 } |
| 458 | 459 |
| 459 int32_t QMVideoSettingsCallback::SetVideoQMSettings( | 460 int32_t QMVideoSettingsCallback::SetVideoQMSettings( |
| 460 const uint32_t frame_rate, | 461 const uint32_t frame_rate, |
| 461 const uint32_t width, | 462 const uint32_t width, |
| 462 const uint32_t height) { | 463 const uint32_t height) { |
| 463 return vp_->SetTargetResolution(width, height, frame_rate); | 464 return vp_->SetTargetResolution(width, height, frame_rate); |
| 464 } | 465 } |
| 465 | 466 |
| 466 } // namespace webrtc | 467 } // namespace webrtc |
| OLD | NEW |