Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include "webrtc/video/overuse_frame_detector.h" | 28 #include "webrtc/video/overuse_frame_detector.h" |
| 29 #include "webrtc/video/send_statistics_proxy.h" | 29 #include "webrtc/video/send_statistics_proxy.h" |
| 30 #include "webrtc/video_frame.h" | 30 #include "webrtc/video_frame.h" |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 using DegradationPreference = VideoSendStream::DegradationPreference; | 34 using DegradationPreference = VideoSendStream::DegradationPreference; |
| 35 | 35 |
| 36 // Time interval for logging frame counts. | 36 // Time interval for logging frame counts. |
| 37 const int64_t kFrameLogIntervalMs = 60000; | 37 const int64_t kFrameLogIntervalMs = 60000; |
| 38 | |
| 38 // We will never ask for a resolution lower than this. | 39 // We will never ask for a resolution lower than this. |
| 39 #if defined(WEBRTC_ANDROID) | |
| 40 // TODO(kthelgason): Lower this limit when better testing | 40 // TODO(kthelgason): Lower this limit when better testing |
| 41 // on MediaCodec and fallback implementations are in place. | 41 // on MediaCodec and fallback implementations are in place. |
|
magjed_webrtc
2017/02/22 14:12:45
Add reference to issue 7206 in the TODO comment.
| |
| 42 const int kMinPixelsPerFrame = 320 * 180; | 42 const int kMinPixelsPerFrame = 320 * 180; |
| 43 #else | |
| 44 const int kMinPixelsPerFrame = 120 * 90; | |
| 45 #endif | |
| 46 | 43 |
| 47 // The maximum number of frames to drop at beginning of stream | 44 // The maximum number of frames to drop at beginning of stream |
| 48 // to try and achieve desired bitrate. | 45 // to try and achieve desired bitrate. |
| 49 const int kMaxInitialFramedrop = 4; | 46 const int kMaxInitialFramedrop = 4; |
| 50 | 47 |
| 51 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle | 48 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle |
| 52 // pipelining encoders better (multiple input frames before something comes | 49 // pipelining encoders better (multiple input frames before something comes |
| 53 // out). This should effectively turn off CPU adaptations for systems that | 50 // out). This should effectively turn off CPU adaptations for systems that |
| 54 // remotely cope with the load right now. | 51 // remotely cope with the load right now. |
| 55 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { | 52 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 810 --scale_counter_[reason]; | 807 --scale_counter_[reason]; |
| 811 source_proxy_->RequestHigherResolutionThan(current_pixel_count); | 808 source_proxy_->RequestHigherResolutionThan(current_pixel_count); |
| 812 LOG(LS_INFO) << "Scaling up resolution."; | 809 LOG(LS_INFO) << "Scaling up resolution."; |
| 813 for (size_t i = 0; i < kScaleReasonSize; ++i) { | 810 for (size_t i = 0; i < kScaleReasonSize; ++i) { |
| 814 LOG(LS_INFO) << "Scaled " << scale_counter_[i] | 811 LOG(LS_INFO) << "Scaled " << scale_counter_[i] |
| 815 << " times for reason: " << (i ? "cpu" : "quality"); | 812 << " times for reason: " << (i ? "cpu" : "quality"); |
| 816 } | 813 } |
| 817 } | 814 } |
| 818 | 815 |
| 819 } // namespace webrtc | 816 } // namespace webrtc |
| OLD | NEW |