| 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 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 | 2007 |
| 2008 stats = stream_->GetStats(); | 2008 stats = stream_->GetStats(); |
| 2009 } | 2009 } |
| 2010 info.adapt_changes = number_of_cpu_adapt_changes_; | 2010 info.adapt_changes = number_of_cpu_adapt_changes_; |
| 2011 info.adapt_reason = cpu_restricted_counter_ <= 0 | 2011 info.adapt_reason = cpu_restricted_counter_ <= 0 |
| 2012 ? CoordinatedVideoAdapter::ADAPTREASON_NONE | 2012 ? CoordinatedVideoAdapter::ADAPTREASON_NONE |
| 2013 : CoordinatedVideoAdapter::ADAPTREASON_CPU; | 2013 : CoordinatedVideoAdapter::ADAPTREASON_CPU; |
| 2014 | 2014 |
| 2015 if (capturer_) { | 2015 if (capturer_) { |
| 2016 VideoFormat last_captured_frame_format; | 2016 VideoFormat last_captured_frame_format; |
| 2017 capturer_->GetStats(&info.adapt_frame_drops, &info.effects_frame_drops, | 2017 capturer_->GetStats(&last_captured_frame_format); |
| 2018 &info.capturer_frame_time, | |
| 2019 &last_captured_frame_format); | |
| 2020 info.input_frame_width = last_captured_frame_format.width; | 2018 info.input_frame_width = last_captured_frame_format.width; |
| 2021 info.input_frame_height = last_captured_frame_format.height; | 2019 info.input_frame_height = last_captured_frame_format.height; |
| 2022 } | 2020 } |
| 2023 | 2021 |
| 2024 // Get bandwidth limitation info from stream_->GetStats(). | 2022 // Get bandwidth limitation info from stream_->GetStats(). |
| 2025 // Input resolution (output from video_adapter) can be further scaled down or | 2023 // Input resolution (output from video_adapter) can be further scaled down or |
| 2026 // higher video layer(s) can be dropped due to bitrate constraints. | 2024 // higher video layer(s) can be dropped due to bitrate constraints. |
| 2027 // Note, adapt_changes only include changes from the video_adapter. | 2025 // Note, adapt_changes only include changes from the video_adapter. |
| 2028 if (stats.bw_limited_resolution) | 2026 if (stats.bw_limited_resolution) |
| 2029 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; | 2027 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2531 rtx_mapping[video_codecs[i].codec.id] != | 2529 rtx_mapping[video_codecs[i].codec.id] != |
| 2532 fec_settings.red_payload_type) { | 2530 fec_settings.red_payload_type) { |
| 2533 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2531 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2534 } | 2532 } |
| 2535 } | 2533 } |
| 2536 | 2534 |
| 2537 return video_codecs; | 2535 return video_codecs; |
| 2538 } | 2536 } |
| 2539 | 2537 |
| 2540 } // namespace cricket | 2538 } // namespace cricket |
| OLD | NEW |