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 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 if (stream_ == NULL) | 2075 if (stream_ == NULL) |
2076 return info; | 2076 return info; |
2077 | 2077 |
2078 stats = stream_->GetStats(); | 2078 stats = stream_->GetStats(); |
2079 } | 2079 } |
2080 info.adapt_changes = number_of_cpu_adapt_changes_; | 2080 info.adapt_changes = number_of_cpu_adapt_changes_; |
2081 info.adapt_reason = cpu_restricted_counter_ <= 0 | 2081 info.adapt_reason = cpu_restricted_counter_ <= 0 |
2082 ? CoordinatedVideoAdapter::ADAPTREASON_NONE | 2082 ? CoordinatedVideoAdapter::ADAPTREASON_NONE |
2083 : CoordinatedVideoAdapter::ADAPTREASON_CPU; | 2083 : CoordinatedVideoAdapter::ADAPTREASON_CPU; |
2084 | 2084 |
2085 if (capturer_) { | |
2086 VideoFormat last_captured_frame_format; | |
2087 capturer_->GetStats(&last_captured_frame_format); | |
2088 info.input_frame_width = last_captured_frame_format.width; | |
2089 info.input_frame_height = last_captured_frame_format.height; | |
2090 } | |
2091 | |
2092 // Get bandwidth limitation info from stream_->GetStats(). | 2085 // Get bandwidth limitation info from stream_->GetStats(). |
2093 // Input resolution (output from video_adapter) can be further scaled down or | 2086 // Input resolution (output from video_adapter) can be further scaled down or |
2094 // higher video layer(s) can be dropped due to bitrate constraints. | 2087 // higher video layer(s) can be dropped due to bitrate constraints. |
2095 // Note, adapt_changes only include changes from the video_adapter. | 2088 // Note, adapt_changes only include changes from the video_adapter. |
2096 if (stats.bw_limited_resolution) | 2089 if (stats.bw_limited_resolution) |
2097 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; | 2090 info.adapt_reason |= CoordinatedVideoAdapter::ADAPTREASON_BANDWIDTH; |
2098 | 2091 |
2099 info.encoder_implementation_name = stats.encoder_implementation_name; | 2092 info.encoder_implementation_name = stats.encoder_implementation_name; |
2100 info.ssrc_groups = ssrc_groups_; | 2093 info.ssrc_groups = ssrc_groups_; |
2101 info.framerate_input = stats.input_frame_rate; | 2094 info.framerate_input = stats.input_frame_rate; |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2586 rtx_mapping[video_codecs[i].codec.id] != | 2579 rtx_mapping[video_codecs[i].codec.id] != |
2587 fec_settings.red_payload_type) { | 2580 fec_settings.red_payload_type) { |
2588 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2581 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2589 } | 2582 } |
2590 } | 2583 } |
2591 | 2584 |
2592 return video_codecs; | 2585 return video_codecs; |
2593 } | 2586 } |
2594 | 2587 |
2595 } // namespace cricket | 2588 } // namespace cricket |
OLD | NEW |