| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This test generate synthetic data. For audio it's a sinusoid waveform with | 5 // This test generate synthetic data. For audio it's a sinusoid waveform with |
| 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern | 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern |
| 7 // that is shifting by one pixel per frame, each pixels neighbors right and down | 7 // that is shifting by one pixel per frame, each pixels neighbors right and down |
| 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap | 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap |
| 9 // frequently within the image. Visually this will create diagonally color bands | 9 // frequently within the image. Visually this will create diagonally color bands |
| 10 // that moves across the screen | 10 // that moves across the screen |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 317 |
| 318 private: | 318 private: |
| 319 friend class base::RefCountedThreadSafe<TestReceiverVideoCallback>; | 319 friend class base::RefCountedThreadSafe<TestReceiverVideoCallback>; |
| 320 | 320 |
| 321 int num_called_; | 321 int num_called_; |
| 322 std::list<ExpectedVideoFrame> expected_frame_; | 322 std::list<ExpectedVideoFrame> expected_frame_; |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 CastLoggingConfig EnableCastLoggingConfig() { | 325 CastLoggingConfig EnableCastLoggingConfig() { |
| 326 CastLoggingConfig config; | 326 CastLoggingConfig config; |
| 327 config.enable_data_collection = true; | 327 config.enable_raw_data_collection = true; |
| 328 config.enable_stats_data_collection = true; |
| 328 return config; | 329 return config; |
| 329 } | 330 } |
| 330 // The actual test class, generate synthetic data for both audio and video and | 331 // The actual test class, generate synthetic data for both audio and video and |
| 331 // send those through the sender and receiver and analyzes the result. | 332 // send those through the sender and receiver and analyzes the result. |
| 332 class End2EndTest : public ::testing::Test { | 333 class End2EndTest : public ::testing::Test { |
| 333 protected: | 334 protected: |
| 334 End2EndTest() | 335 End2EndTest() |
| 335 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), | 336 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), |
| 336 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, | 337 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, |
| 337 task_runner_, task_runner_, task_runner_, task_runner_, | 338 task_runner_, task_runner_, task_runner_, task_runner_, |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 } | 1055 } |
| 1055 | 1056 |
| 1056 | 1057 |
| 1057 // TODO(pwestin): Add repeatable packet loss test. | 1058 // TODO(pwestin): Add repeatable packet loss test. |
| 1058 // TODO(pwestin): Add test for misaligned send get calls. | 1059 // TODO(pwestin): Add test for misaligned send get calls. |
| 1059 // TODO(pwestin): Add more tests that does not resample. | 1060 // TODO(pwestin): Add more tests that does not resample. |
| 1060 // TODO(pwestin): Add test when we have starvation for our RunTask. | 1061 // TODO(pwestin): Add test when we have starvation for our RunTask. |
| 1061 | 1062 |
| 1062 } // namespace cast | 1063 } // namespace cast |
| 1063 } // namespace media | 1064 } // namespace media |
| OLD | NEW |