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

Side by Side Diff: webrtc/modules/video_coding/video_sender_unittest.cc

Issue 1917323002: Remove remaining quality-analysis (QM). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 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/modules/video_coding/video_sender.cc ('k') | webrtc/modules/video_processing/BUILD.gn » ('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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 vector<FrameData> frame_data_; 173 vector<FrameData> frame_data_;
174 }; 174 };
175 175
176 class TestVideoSender : public ::testing::Test { 176 class TestVideoSender : public ::testing::Test {
177 protected: 177 protected:
178 // Note: simulated clock starts at 1 seconds, since parts of webrtc use 0 as 178 // Note: simulated clock starts at 1 seconds, since parts of webrtc use 0 as
179 // a special case (e.g. frame rate in media optimization). 179 // a special case (e.g. frame rate in media optimization).
180 TestVideoSender() : clock_(1000), encoded_frame_callback_(&clock_) {} 180 TestVideoSender() : clock_(1000), encoded_frame_callback_(&clock_) {}
181 181
182 void SetUp() override { 182 void SetUp() override {
183 sender_.reset(new VideoSender(&clock_, &encoded_frame_callback_, nullptr, 183 sender_.reset(
184 nullptr, nullptr)); 184 new VideoSender(&clock_, &encoded_frame_callback_, nullptr, nullptr));
185 } 185 }
186 186
187 void AddFrame() { 187 void AddFrame() {
188 assert(generator_.get()); 188 assert(generator_.get());
189 sender_->AddVideoFrame(*generator_->NextFrame(), NULL, NULL); 189 sender_->AddVideoFrame(*generator_->NextFrame(), NULL);
190 } 190 }
191 191
192 SimulatedClock clock_; 192 SimulatedClock clock_;
193 EncodedImageCallbackImpl encoded_frame_callback_; 193 EncodedImageCallbackImpl encoded_frame_callback_;
194 // Used by subclassing tests, need to outlive sender_. 194 // Used by subclassing tests, need to outlive sender_.
195 std::unique_ptr<VideoEncoder> encoder_; 195 std::unique_ptr<VideoEncoder> encoder_;
196 std::unique_ptr<VideoSender> sender_; 196 std::unique_ptr<VideoSender> sender_;
197 std::unique_ptr<FrameGenerator> generator_; 197 std::unique_ptr<FrameGenerator> generator_;
198 }; 198 };
199 199
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 } 495 }
496 { 496 {
497 // TODO(andresp): Find out why this fails with framerate = 7.5 497 // TODO(andresp): Find out why this fails with framerate = 7.5
498 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}}; 498 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}};
499 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected)); 499 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected));
500 } 500 }
501 } 501 }
502 } // namespace 502 } // namespace
503 } // namespace vcm 503 } // namespace vcm
504 } // namespace webrtc 504 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_sender.cc ('k') | webrtc/modules/video_processing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698