| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |