| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 case kVideoCodecRED: | 128 case kVideoCodecRED: |
| 129 case kVideoCodecULPFEC: | 129 case kVideoCodecULPFEC: |
| 130 case kVideoCodecUnknown: | 130 case kVideoCodecUnknown: |
| 131 RTC_NOTREACHED(); | 131 RTC_NOTREACHED(); |
| 132 return false; | 132 return false; |
| 133 } | 133 } |
| 134 RTC_NOTREACHED(); | 134 RTC_NOTREACHED(); |
| 135 return false; | 135 return false; |
| 136 } | 136 } |
| 137 | 137 |
| 138 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle |
| 139 // pipelining encoders better (multiple input frames before something comes |
| 140 // out). This should effectively turn off CPU adaptations for systems that |
| 141 // remotely cope with the load right now. |
| 138 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { | 142 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { |
| 139 CpuOveruseOptions options; | 143 CpuOveruseOptions options; |
| 140 if (full_overuse_time) { | 144 if (full_overuse_time) { |
| 141 options.low_encode_usage_threshold_percent = 100; | 145 options.low_encode_usage_threshold_percent = 150; |
| 142 options.high_encode_usage_threshold_percent = 120; | 146 options.high_encode_usage_threshold_percent = 200; |
| 143 } | 147 } |
| 144 return options; | 148 return options; |
| 145 } | 149 } |
| 146 } // namespace | 150 } // namespace |
| 147 | 151 |
| 148 namespace internal { | 152 namespace internal { |
| 149 VideoSendStream::VideoSendStream( | 153 VideoSendStream::VideoSendStream( |
| 150 int num_cpu_cores, | 154 int num_cpu_cores, |
| 151 ProcessThread* module_process_thread, | 155 ProcessThread* module_process_thread, |
| 152 CallStats* call_stats, | 156 CallStats* call_stats, |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 return false; | 617 return false; |
| 614 } | 618 } |
| 615 | 619 |
| 616 // Restart the media flow | 620 // Restart the media flow |
| 617 vie_encoder_.Restart(); | 621 vie_encoder_.Restart(); |
| 618 | 622 |
| 619 return true; | 623 return true; |
| 620 } | 624 } |
| 621 } // namespace internal | 625 } // namespace internal |
| 622 } // namespace webrtc | 626 } // namespace webrtc |
| OLD | NEW |