Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: webrtc/modules/video_coding/main/source/media_optimization.h

Issue 1428473002: Utilize bitrate above codec max to protect video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/main/source/media_optimization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 VCMQMSettingsCallback* qmsettings_callback) 114 VCMQMSettingsCallback* qmsettings_callback)
115 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 115 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
116 116
117 // Checks if we should make a QM change. Return true if yes, false otherwise. 117 // Checks if we should make a QM change. Return true if yes, false otherwise.
118 bool CheckStatusForQMchange() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 118 bool CheckStatusForQMchange() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
119 119
120 void ProcessIncomingFrameRate(int64_t now) 120 void ProcessIncomingFrameRate(int64_t now)
121 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 121 EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
122 122
123 // Checks conditions for suspending the video. The method compares 123 // Checks conditions for suspending the video. The method compares
124 // |target_bit_rate_| with the threshold values for suspension, and changes 124 // |video_target_bitrate_| with the threshold values for suspension, and
125 // the state of |video_suspended_| accordingly. 125 // changes the state of |video_suspended_| accordingly.
126 void CheckSuspendConditions() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_); 126 void CheckSuspendConditions() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
127 127
128 void SetEncodingDataInternal(VideoCodecType send_codec_type, 128 void SetEncodingDataInternal(VideoCodecType send_codec_type,
129 int32_t max_bit_rate, 129 int32_t max_bit_rate,
130 uint32_t frame_rate, 130 uint32_t frame_rate,
131 uint32_t bit_rate, 131 uint32_t bit_rate,
132 uint16_t width, 132 uint16_t width,
133 uint16_t height, 133 uint16_t height,
134 int num_temporal_layers, 134 int num_temporal_layers,
135 int32_t mtu) 135 int32_t mtu)
(...skipping 12 matching lines...) Expand all
148 uint16_t codec_width_ GUARDED_BY(crit_sect_); 148 uint16_t codec_width_ GUARDED_BY(crit_sect_);
149 uint16_t codec_height_ GUARDED_BY(crit_sect_); 149 uint16_t codec_height_ GUARDED_BY(crit_sect_);
150 float user_frame_rate_ GUARDED_BY(crit_sect_); 150 float user_frame_rate_ GUARDED_BY(crit_sect_);
151 rtc::scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_); 151 rtc::scoped_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
152 rtc::scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_ 152 rtc::scoped_ptr<VCMLossProtectionLogic> loss_prot_logic_
153 GUARDED_BY(crit_sect_); 153 GUARDED_BY(crit_sect_);
154 uint8_t fraction_lost_ GUARDED_BY(crit_sect_); 154 uint8_t fraction_lost_ GUARDED_BY(crit_sect_);
155 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_); 155 uint32_t send_statistics_[4] GUARDED_BY(crit_sect_);
156 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_); 156 uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_);
157 int32_t max_payload_size_ GUARDED_BY(crit_sect_); 157 int32_t max_payload_size_ GUARDED_BY(crit_sect_);
158 int target_bit_rate_ GUARDED_BY(crit_sect_); 158 int video_target_bitrate_ GUARDED_BY(crit_sect_);
159 float incoming_frame_rate_ GUARDED_BY(crit_sect_); 159 float incoming_frame_rate_ GUARDED_BY(crit_sect_);
160 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_); 160 int64_t incoming_frame_times_[kFrameCountHistorySize] GUARDED_BY(crit_sect_);
161 bool enable_qm_ GUARDED_BY(crit_sect_); 161 bool enable_qm_ GUARDED_BY(crit_sect_);
162 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_); 162 std::list<EncodedFrameSample> encoded_frame_samples_ GUARDED_BY(crit_sect_);
163 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_); 163 uint32_t avg_sent_bit_rate_bps_ GUARDED_BY(crit_sect_);
164 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_); 164 uint32_t avg_sent_framerate_ GUARDED_BY(crit_sect_);
165 uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_); 165 uint32_t key_frame_cnt_ GUARDED_BY(crit_sect_);
166 uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_); 166 uint32_t delta_frame_cnt_ GUARDED_BY(crit_sect_);
167 rtc::scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_); 167 rtc::scoped_ptr<VCMContentMetricsProcessing> content_ GUARDED_BY(crit_sect_);
168 rtc::scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_); 168 rtc::scoped_ptr<VCMQmResolution> qm_resolution_ GUARDED_BY(crit_sect_);
169 int64_t last_qm_update_time_ GUARDED_BY(crit_sect_); 169 int64_t last_qm_update_time_ GUARDED_BY(crit_sect_);
170 int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered. 170 int64_t last_change_time_ GUARDED_BY(crit_sect_); // Content/user triggered.
171 int num_layers_ GUARDED_BY(crit_sect_); 171 int num_layers_ GUARDED_BY(crit_sect_);
172 bool suspension_enabled_ GUARDED_BY(crit_sect_); 172 bool suspension_enabled_ GUARDED_BY(crit_sect_);
173 bool video_suspended_ GUARDED_BY(crit_sect_); 173 bool video_suspended_ GUARDED_BY(crit_sect_);
174 int suspension_threshold_bps_ GUARDED_BY(crit_sect_); 174 int suspension_threshold_bps_ GUARDED_BY(crit_sect_);
175 int suspension_window_bps_ GUARDED_BY(crit_sect_); 175 int suspension_window_bps_ GUARDED_BY(crit_sect_);
176 }; 176 };
177 } // namespace media_optimization 177 } // namespace media_optimization
178 } // namespace webrtc 178 } // namespace webrtc
179 179
180 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_MEDIA_OPTIMIZATION_H_ 180 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_MEDIA_OPTIMIZATION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/main/source/media_optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698