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. |
| 42 // See https://bugs.chromium.org/p/webrtc/issues/detail?id=7206 |
42 const int kMinPixelsPerFrame = 320 * 180; | 43 const int kMinPixelsPerFrame = 320 * 180; |
43 #else | |
44 const int kMinPixelsPerFrame = 120 * 90; | |
45 #endif | |
46 | 44 |
47 // The maximum number of frames to drop at beginning of stream | 45 // The maximum number of frames to drop at beginning of stream |
48 // to try and achieve desired bitrate. | 46 // to try and achieve desired bitrate. |
49 const int kMaxInitialFramedrop = 4; | 47 const int kMaxInitialFramedrop = 4; |
50 | 48 |
51 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle | 49 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle |
52 // pipelining encoders better (multiple input frames before something comes | 50 // pipelining encoders better (multiple input frames before something comes |
53 // out). This should effectively turn off CPU adaptations for systems that | 51 // out). This should effectively turn off CPU adaptations for systems that |
54 // remotely cope with the load right now. | 52 // remotely cope with the load right now. |
55 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { | 53 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 --scale_counter_[reason]; | 808 --scale_counter_[reason]; |
811 source_proxy_->RequestHigherResolutionThan(current_pixel_count); | 809 source_proxy_->RequestHigherResolutionThan(current_pixel_count); |
812 LOG(LS_INFO) << "Scaling up resolution."; | 810 LOG(LS_INFO) << "Scaling up resolution."; |
813 for (size_t i = 0; i < kScaleReasonSize; ++i) { | 811 for (size_t i = 0; i < kScaleReasonSize; ++i) { |
814 LOG(LS_INFO) << "Scaled " << scale_counter_[i] | 812 LOG(LS_INFO) << "Scaled " << scale_counter_[i] |
815 << " times for reason: " << (i ? "cpu" : "quality"); | 813 << " times for reason: " << (i ? "cpu" : "quality"); |
816 } | 814 } |
817 } | 815 } |
818 | 816 |
819 } // namespace webrtc | 817 } // namespace webrtc |
OLD | NEW |