| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2010 return info; | 2010 return info; |
| 2011 | 2011 |
| 2012 stats = stream_->GetStats(); | 2012 stats = stream_->GetStats(); |
| 2013 } | 2013 } |
| 2014 info.adapt_changes = number_of_cpu_adapt_changes_; | 2014 info.adapt_changes = number_of_cpu_adapt_changes_; |
| 2015 info.adapt_reason = cpu_restricted_counter_ <= 0 | 2015 info.adapt_reason = cpu_restricted_counter_ <= 0 |
| 2016 ? CoordinatedVideoAdapter::ADAPTREASON_NONE | 2016 ? CoordinatedVideoAdapter::ADAPTREASON_NONE |
| 2017 : CoordinatedVideoAdapter::ADAPTREASON_CPU; | 2017 : CoordinatedVideoAdapter::ADAPTREASON_CPU; |
| 2018 | 2018 |
| 2019 if (capturer_) { | 2019 if (capturer_) { |
| 2020 if (!capturer_->IsMuted()) { | |
| 2021 VideoFormat last_captured_frame_format; | 2020 VideoFormat last_captured_frame_format; |
| 2022 capturer_->GetStats(&info.adapt_frame_drops, &info.effects_frame_drops, | 2021 capturer_->GetStats(&info.adapt_frame_drops, &info.effects_frame_drops, |
| 2023 &info.capturer_frame_time, | 2022 &info.capturer_frame_time, |
| 2024 &last_captured_frame_format); | 2023 &last_captured_frame_format); |
| 2025 info.input_frame_width = last_captured_frame_format.width; | 2024 info.input_frame_width = last_captured_frame_format.width; |
| 2026 info.input_frame_height = last_captured_frame_format.height; | 2025 info.input_frame_height = last_captured_frame_format.height; |
| 2027 } | |
| 2028 } | 2026 } |
| 2029 | 2027 |
| 2030 // Get bandwidth limitation info from stream_->GetStats(). | 2028 // Get bandwidth limitation info from stream_->GetStats(). |
| 2031 // Input resolution (output from video_adapter) can be further scaled down or | 2029 // Input resolution (output from video_adapter) can be further scaled down or |
| 2032 // higher video layer(s) can be dropped due to bitrate constraints. | 2030 // higher video layer(s) can be dropped due to bitrate constraints. |
| 2033 // Note, adapt_changes only include changes from the video_adapter. | 2031 // Note, adapt_changes only include changes from the video_adapter. |
| 2034 if (stats.bw_limited_resolution) | 2032 if (stats.bw_limited_resolution) |
| 2035 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; | 2033 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; |
| 2036 | 2034 |
| 2037 info.encoder_implementation_name = stats.encoder_implementation_name; | 2035 info.encoder_implementation_name = stats.encoder_implementation_name; |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 rtx_mapping[video_codecs[i].codec.id] != | 2534 rtx_mapping[video_codecs[i].codec.id] != |
| 2537 fec_settings.red_payload_type) { | 2535 fec_settings.red_payload_type) { |
| 2538 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2536 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2539 } | 2537 } |
| 2540 } | 2538 } |
| 2541 | 2539 |
| 2542 return video_codecs; | 2540 return video_codecs; |
| 2543 } | 2541 } |
| 2544 | 2542 |
| 2545 } // namespace cricket | 2543 } // namespace cricket |
| OLD | NEW |