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

Side by Side Diff: webrtc/video/vie_encoder_unittest.cc

Issue 2474433008: Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (Closed)
Patch Set: Rebase Created 4 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 | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_encoder.h » ('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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 rtc::CritScope lock(&crit_); 201 rtc::CritScope lock(&crit_);
202 return number_of_reconfigurations_; 202 return number_of_reconfigurations_;
203 } 203 }
204 204
205 int last_min_transmit_bitrate() { 205 int last_min_transmit_bitrate() {
206 rtc::CritScope lock(&crit_); 206 rtc::CritScope lock(&crit_);
207 return min_transmit_bitrate_bps_; 207 return min_transmit_bitrate_bps_;
208 } 208 }
209 209
210 private: 210 private:
211 Result OnEncodedImage( 211 int32_t Encoded(const EncodedImage& encoded_image,
212 const EncodedImage& encoded_image, 212 const CodecSpecificInfo* codec_specific_info,
213 const CodecSpecificInfo* codec_specific_info, 213 const RTPFragmentationHeader* fragmentation) override {
214 const RTPFragmentationHeader* fragmentation) override {
215 rtc::CritScope lock(&crit_); 214 rtc::CritScope lock(&crit_);
216 EXPECT_TRUE(expect_frames_); 215 EXPECT_TRUE(expect_frames_);
217 timestamp_ = encoded_image._timeStamp; 216 timestamp_ = encoded_image._timeStamp;
218 encoded_frame_event_.Set(); 217 encoded_frame_event_.Set();
219 return Result(Result::OK, timestamp_); 218 return 0;
220 } 219 }
221 220
222 void OnEncoderConfigurationChanged(std::vector<VideoStream> streams, 221 void OnEncoderConfigurationChanged(std::vector<VideoStream> streams,
223 int min_transmit_bitrate_bps) override { 222 int min_transmit_bitrate_bps) override {
224 rtc::CriticalSection crit_; 223 rtc::CriticalSection crit_;
225 ++number_of_reconfigurations_; 224 ++number_of_reconfigurations_;
226 min_transmit_bitrate_bps_ = min_transmit_bitrate_bps; 225 min_transmit_bitrate_bps_ = min_transmit_bitrate_bps;
227 } 226 }
228 227
229 rtc::CriticalSection crit_; 228 rtc::CriticalSection crit_;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 vie_encoder_->Stop(); 619 vie_encoder_->Stop();
621 620
622 stats_proxy_.reset(); 621 stats_proxy_.reset();
623 EXPECT_EQ(1, 622 EXPECT_EQ(1,
624 metrics::NumSamples("WebRTC.Video.CpuLimitedResolutionInPercent")); 623 metrics::NumSamples("WebRTC.Video.CpuLimitedResolutionInPercent"));
625 EXPECT_EQ( 624 EXPECT_EQ(
626 1, metrics::NumEvents("WebRTC.Video.CpuLimitedResolutionInPercent", 50)); 625 1, metrics::NumEvents("WebRTC.Video.CpuLimitedResolutionInPercent", 50));
627 } 626 }
628 627
629 } // namespace webrtc 628 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698