OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 */ |
11 | 11 |
12 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/encoder.h" | 12 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/encoder.h" |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #if defined(WEBRTC_IOS) | 18 #if defined(WEBRTC_IOS) |
19 #import "Common/RTCUIApplicationStatusObserver.h" | 19 #import "Common/RTCUIApplicationStatusObserver.h" |
20 #import "WebRTC/UIDevice+RTCDevice.h" | 20 #import "WebRTC/UIDevice+RTCDevice.h" |
21 #endif | 21 #endif |
22 #import "WebRTC/RTCVideoFrameBuffer.h" | 22 #import "WebRTC/RTCVideoFrameBuffer.h" |
23 #include "libyuv/convert_from.h" | 23 #include "libyuv/convert_from.h" |
24 #include "webrtc/base/checks.h" | |
25 #include "webrtc/base/logging.h" | |
26 #include "webrtc/common_video/h264/profile_level_id.h" | 24 #include "webrtc/common_video/h264/profile_level_id.h" |
| 25 #include "webrtc/rtc_base/checks.h" |
| 26 #include "webrtc/rtc_base/logging.h" |
27 #include "webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.h" | 27 #include "webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.h" |
28 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h" | 28 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/nalu_rewriter.h" |
29 #include "webrtc/system_wrappers/include/clock.h" | 29 #include "webrtc/system_wrappers/include/clock.h" |
30 | 30 |
31 namespace internal { | 31 namespace internal { |
32 | 32 |
33 // The ratio between kVTCompressionPropertyKey_DataRateLimits and | 33 // The ratio between kVTCompressionPropertyKey_DataRateLimits and |
34 // kVTCompressionPropertyKey_AverageBitRate. The data rate limit is set higher | 34 // kVTCompressionPropertyKey_AverageBitRate. The data rate limit is set higher |
35 // than the average bit rate to avoid undershooting the target. | 35 // than the average bit rate to avoid undershooting the target. |
36 const float kLimitToAverageBitRateFactor = 1.5f; | 36 const float kLimitToAverageBitRateFactor = 1.5f; |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 } | 756 } |
757 bitrate_adjuster_.Update(frame._length); | 757 bitrate_adjuster_.Update(frame._length); |
758 } | 758 } |
759 | 759 |
760 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings() | 760 VideoEncoder::ScalingSettings H264VideoToolboxEncoder::GetScalingSettings() |
761 const { | 761 const { |
762 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold, | 762 return VideoEncoder::ScalingSettings(true, internal::kLowH264QpThreshold, |
763 internal::kHighH264QpThreshold); | 763 internal::kHighH264QpThreshold); |
764 } | 764 } |
765 } // namespace webrtc | 765 } // namespace webrtc |
OLD | NEW |