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 */ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 int32_t width, | 63 int32_t width, |
64 int32_t height, | 64 int32_t height, |
65 int64_t render_time_ms, | 65 int64_t render_time_ms, |
66 uint32_t timestamp, | 66 uint32_t timestamp, |
67 VideoRotation rotation); | 67 VideoRotation rotation); |
68 | 68 |
69 private: | 69 private: |
70 int ResetCompressionSession(); | 70 int ResetCompressionSession(); |
71 void ConfigureCompressionSession(); | 71 void ConfigureCompressionSession(); |
72 void DestroyCompressionSession(); | 72 void DestroyCompressionSession(); |
73 const VideoFrame& GetScaledFrameOnEncode(const VideoFrame& frame); | 73 rtc::scoped_refptr<VideoFrameBuffer> GetScaledBufferOnEncode( |
| 74 const rtc::scoped_refptr<VideoFrameBuffer>& frame); |
74 void SetBitrateBps(uint32_t bitrate_bps); | 75 void SetBitrateBps(uint32_t bitrate_bps); |
75 void SetEncoderBitrateBps(uint32_t bitrate_bps); | 76 void SetEncoderBitrateBps(uint32_t bitrate_bps); |
76 | 77 |
77 EncodedImageCallback* callback_; | 78 EncodedImageCallback* callback_; |
78 VTCompressionSessionRef compression_session_; | 79 VTCompressionSessionRef compression_session_; |
79 BitrateAdjuster bitrate_adjuster_; | 80 BitrateAdjuster bitrate_adjuster_; |
80 uint32_t target_bitrate_bps_; | 81 uint32_t target_bitrate_bps_; |
81 uint32_t encoder_bitrate_bps_; | 82 uint32_t encoder_bitrate_bps_; |
82 int32_t width_; | 83 int32_t width_; |
83 int32_t height_; | 84 int32_t height_; |
84 | 85 |
85 rtc::CriticalSection quality_scaler_crit_; | 86 rtc::CriticalSection quality_scaler_crit_; |
86 QualityScaler quality_scaler_ GUARDED_BY(quality_scaler_crit_); | 87 QualityScaler quality_scaler_ GUARDED_BY(quality_scaler_crit_); |
87 H264BitstreamParser h264_bitstream_parser_; | 88 H264BitstreamParser h264_bitstream_parser_; |
88 }; // H264VideoToolboxEncoder | 89 }; // H264VideoToolboxEncoder |
89 | 90 |
90 } // namespace webrtc | 91 } // namespace webrtc |
91 | 92 |
92 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) | 93 #endif // defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) |
93 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_ | 94 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_H264_H264_VIDEO_TOOLBOX_ENCODER_H_ |
OLD | NEW |