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

Side by Side Diff: webrtc/video/vie_encoder.h

Issue 2630333002: Drop frames until specified bitrate is achieved. (Closed)
Patch Set: Turn off quality scaling for screensharing in tests Created 3 years, 10 months 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 | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/vie_encoder.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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 VideoRotation rotation; 143 VideoRotation rotation;
144 bool is_texture; 144 bool is_texture;
145 int pixel_count() const { return width * height; } 145 int pixel_count() const { return width * height; }
146 }; 146 };
147 147
148 void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config, 148 void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config,
149 size_t max_data_payload_length, 149 size_t max_data_payload_length,
150 bool nack_enabled); 150 bool nack_enabled);
151 void ReconfigureEncoder(); 151 void ReconfigureEncoder();
152 152
153 void ConfigureQualityScaler();
154
153 // Implements VideoSinkInterface. 155 // Implements VideoSinkInterface.
154 void OnFrame(const VideoFrame& video_frame) override; 156 void OnFrame(const VideoFrame& video_frame) override;
155 157
156 // Implements VideoSendStatisticsCallback. 158 // Implements VideoSendStatisticsCallback.
157 void SendStatistics(uint32_t bit_rate, 159 void SendStatistics(uint32_t bit_rate,
158 uint32_t frame_rate) override; 160 uint32_t frame_rate) override;
159 161
160 void EncodeVideoFrame(const VideoFrame& frame, 162 void EncodeVideoFrame(const VideoFrame& frame,
161 int64_t time_when_posted_in_ms); 163 int64_t time_when_posted_in_ms);
162 164
163 // Implements EncodedImageCallback. 165 // Implements EncodedImageCallback.
164 EncodedImageCallback::Result OnEncodedImage( 166 EncodedImageCallback::Result OnEncodedImage(
165 const EncodedImage& encoded_image, 167 const EncodedImage& encoded_image,
166 const CodecSpecificInfo* codec_specific_info, 168 const CodecSpecificInfo* codec_specific_info,
167 const RTPFragmentationHeader* fragmentation) override; 169 const RTPFragmentationHeader* fragmentation) override;
168 170
169 void OnDroppedFrame() override; 171 void OnDroppedFrame() override;
170 172
171 bool EncoderPaused() const; 173 bool EncoderPaused() const;
172 void TraceFrameDropStart(); 174 void TraceFrameDropStart();
173 void TraceFrameDropEnd(); 175 void TraceFrameDropEnd();
174 176
175 rtc::Event shutdown_event_; 177 rtc::Event shutdown_event_;
176 178
177 const uint32_t number_of_cores_; 179 const uint32_t number_of_cores_;
180 // Counts how many frames we've dropped in the initial rampup phase.
181 int initial_rampup_;
178 182
179 const std::unique_ptr<VideoSourceProxy> source_proxy_; 183 const std::unique_ptr<VideoSourceProxy> source_proxy_;
180 EncoderSink* sink_; 184 EncoderSink* sink_;
181 const VideoSendStream::Config::EncoderSettings settings_; 185 const VideoSendStream::Config::EncoderSettings settings_;
182 const VideoCodecType codec_type_; 186 const VideoCodecType codec_type_;
183 187
184 vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_); 188 vcm::VideoSender video_sender_ ACCESS_ON(&encoder_queue_);
185 OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_); 189 OveruseFrameDetector overuse_detector_ ACCESS_ON(&encoder_queue_);
186 std::unique_ptr<QualityScaler> quality_scaler_ ACCESS_ON(&encoder_queue_); 190 std::unique_ptr<QualityScaler> quality_scaler_ ACCESS_ON(&encoder_queue_);
187 191
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // All public methods are proxied to |encoder_queue_|. It must must be 244 // All public methods are proxied to |encoder_queue_|. It must must be
241 // destroyed first to make sure no tasks are run that use other members. 245 // destroyed first to make sure no tasks are run that use other members.
242 rtc::TaskQueue encoder_queue_; 246 rtc::TaskQueue encoder_queue_;
243 247
244 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); 248 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder);
245 }; 249 };
246 250
247 } // namespace webrtc 251 } // namespace webrtc
248 252
249 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ 253 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | webrtc/video/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698