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 |
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ |
12 #define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ | 12 #define WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
| 15 #include <memory> |
15 | 16 |
16 #include "webrtc/base/scoped_ptr.h" | |
17 #include "webrtc/modules/include/module_common_types.h" | 17 #include "webrtc/modules/include/module_common_types.h" |
18 #include "webrtc/modules/video_coding/include/video_coding.h" | 18 #include "webrtc/modules/video_coding/include/video_coding.h" |
19 #include "webrtc/modules/video_coding/media_opt_util.h" | 19 #include "webrtc/modules/video_coding/media_opt_util.h" |
20 #include "webrtc/modules/video_coding/qm_select.h" | 20 #include "webrtc/modules/video_coding/qm_select.h" |
21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | 21 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 // Forward declarations. | 25 // Forward declarations. |
26 class Clock; | 26 class Clock; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 uint16_t height, | 127 uint16_t height, |
128 int num_temporal_layers, | 128 int num_temporal_layers, |
129 int32_t mtu) | 129 int32_t mtu) |
130 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 130 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
131 | 131 |
132 uint32_t InputFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 132 uint32_t InputFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
133 | 133 |
134 uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); | 134 uint32_t SentFrameRateInternal() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); |
135 | 135 |
136 // Protect all members. | 136 // Protect all members. |
137 rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; | 137 std::unique_ptr<CriticalSectionWrapper> crit_sect_; |
138 | 138 |
139 Clock* clock_ GUARDED_BY(crit_sect_); | 139 Clock* clock_ GUARDED_BY(crit_sect_); |
140 int32_t max_bit_rate_ GUARDED_BY(crit_sect_); | 140 int32_t max_bit_rate_ GUARDED_BY(crit_sect_); |
141 VideoCodecType send_codec_type_ GUARDED_BY(crit_sect_); | 141 VideoCodecType send_codec_type_ GUARDED_BY(crit_sect_); |
142 uint16_t codec_width_ GUARDED_BY(crit_sect_); | 142 uint16_t codec_width_ GUARDED_BY(crit_sect_); |
143 uint16_t codec_height_ GUARDED_BY(crit_sect_); | 143 uint16_t codec_height_ GUARDED_BY(crit_sect_); |
144 float user_frame_rate_ GUARDED_BY(crit_sect_); | 144 float user_frame_rate_ GUARDED_BY(crit_sect_); |
145 rtc::scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_); | 145 std::unique_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_); |
146 rtc::scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_ | 146 std::unique_ptr<VCMLossProtectionLogic> loss_prot_logic_ |
147 GUARDED_BY(crit_sect_); | 147 GUARDED_BY(crit_sect_); |
148 uint8_t fraction_lost_ GUARDED_BY(crit_sect_); | 148 uint8_t fraction_lost_ GUARDED_BY(crit_sect_); |
149 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); | 149 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); |
150 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); | 150 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); |
151 int32_t max_payload_size_ GUARDED_BY(crit_sect_); | 151 int32_t max_payload_size_ GUARDED_BY(crit_sect_); |
152 int video_target_bitrate_ GUARDED_BY(crit_sect_); | 152 int video_target_bitrate_ GUARDED_BY(crit_sect_); |
153 float incoming_frame_rate_ GUARDED_BY(crit_sect_); | 153 float incoming_frame_rate_ GUARDED_BY(crit_sect_); |
154 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); | 154 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); |
155 bool enable_qm_ GUARDED_BY(crit_sect_); | 155 bool enable_qm_ GUARDED_BY(crit_sect_); |
156 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_); | 156 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_); |
157 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); | 157 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); |
158 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); | 158 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); |
159 uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_); | 159 uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_); |
160 uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_); | 160 uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_); |
161 rtc::scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_); | 161 std::unique_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_); |
162 rtc::scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_); | 162 std::unique_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_); |
163 int64_t last_qm_update_time_ GUARDED_BY(crit_sect_); | 163 int64_t last_qm_update_time_ GUARDED_BY(crit_sect_); |
164 int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered. | 164 int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered. |
165 int num_layers_ GUARDED_BY(crit_sect_); | 165 int num_layers_ GUARDED_BY(crit_sect_); |
166 bool suspension_enabled_ GUARDED_BY(crit_sect_); | 166 bool suspension_enabled_ GUARDED_BY(crit_sect_); |
167 bool video_suspended_ GUARDED_BY(crit_sect_); | 167 bool video_suspended_ GUARDED_BY(crit_sect_); |
168 int suspension_threshold_bps_ GUARDED_BY(crit_sect_); | 168 int suspension_threshold_bps_ GUARDED_BY(crit_sect_); |
169 int suspension_window_bps_ GUARDED_BY(crit_sect_); | 169 int suspension_window_bps_ GUARDED_BY(crit_sect_); |
170 }; | 170 }; |
171 } // namespace media_optimization | 171 } // namespace media_optimization |
172 } // namespace webrtc | 172 } // namespace webrtc |
173 | 173 |
174 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ | 174 #endif // WEBRTC_MODULES_VIDEO_CODING_MEDIA_OPTIMIZATION_H_ |
OLD | NEW |