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

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

Issue 2122743003: Fix stats for encoder target bitrate when target rate is zero. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed bad logging. Created 4 years, 5 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/video/end_to_end_tests.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) 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( 183 sender_.reset(new VideoSender(&clock_, &encoded_frame_callback_, nullptr));
184 new VideoSender(&clock_, &encoded_frame_callback_, nullptr, nullptr));
185 } 184 }
186 185
187 void AddFrame() { 186 void AddFrame() {
188 assert(generator_.get()); 187 assert(generator_.get());
189 sender_->AddVideoFrame(*generator_->NextFrame(), NULL); 188 sender_->AddVideoFrame(*generator_->NextFrame(), NULL);
190 } 189 }
191 190
192 SimulatedClock clock_; 191 SimulatedClock clock_;
193 EncodedImageCallbackImpl encoded_frame_callback_; 192 EncodedImageCallbackImpl encoded_frame_callback_;
194 // Used by subclassing tests, need to outlive sender_. 193 // Used by subclassing tests, need to outlive sender_.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 506 }
508 { 507 {
509 // TODO(andresp): Find out why this fails with framerate = 7.5 508 // TODO(andresp): Find out why this fails with framerate = 7.5
510 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}}; 509 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}};
511 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected)); 510 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected));
512 } 511 }
513 } 512 }
514 } // namespace 513 } // namespace
515 } // namespace vcm 514 } // namespace vcm
516 } // namespace webrtc 515 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_sender.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698