| 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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 | 1328 |
| 1329 EXPECT_EQ(1, map_it->second.counter[FRAME_PLAYOUT]); | 1329 EXPECT_EQ(1, map_it->second.counter[FRAME_PLAYOUT]); |
| 1330 expected_event_count_for_frame += | 1330 expected_event_count_for_frame += |
| 1331 map_it->second.counter[FRAME_PLAYOUT]; | 1331 map_it->second.counter[FRAME_PLAYOUT]; |
| 1332 | 1332 |
| 1333 EXPECT_EQ(1, map_it->second.counter[FRAME_DECODED]); | 1333 EXPECT_EQ(1, map_it->second.counter[FRAME_DECODED]); |
| 1334 expected_event_count_for_frame += | 1334 expected_event_count_for_frame += |
| 1335 map_it->second.counter[FRAME_DECODED]; | 1335 map_it->second.counter[FRAME_DECODED]; |
| 1336 | 1336 |
| 1337 EXPECT_GT(map_it->second.counter[FRAME_ACK_SENT], 0); | 1337 EXPECT_GT(map_it->second.counter[FRAME_ACK_SENT], 0); |
| 1338 EXPECT_GT(map_it->second.counter[FRAME_ACK_RECEIVED], 0); |
| 1338 expected_event_count_for_frame += map_it->second.counter[FRAME_ACK_SENT]; | 1339 expected_event_count_for_frame += map_it->second.counter[FRAME_ACK_SENT]; |
| 1340 expected_event_count_for_frame += |
| 1341 map_it->second.counter[FRAME_ACK_RECEIVED]; |
| 1339 | 1342 |
| 1340 // Verify that there were no other events logged with respect to this frame. | 1343 // Verify that there were no other events logged with respect to this frame. |
| 1341 // (i.e. Total event count = expected event count) | 1344 // (i.e. Total event count = expected event count) |
| 1342 EXPECT_EQ(total_event_count_for_frame, expected_event_count_for_frame); | 1345 EXPECT_EQ(total_event_count_for_frame, expected_event_count_for_frame); |
| 1343 } | 1346 } |
| 1344 } | 1347 } |
| 1345 | 1348 |
| 1346 TEST_F(End2EndTest, BasicFakeSoftwareVideo) { | 1349 TEST_F(End2EndTest, BasicFakeSoftwareVideo) { |
| 1347 Configure(transport::kFakeSoftwareVideo, transport::kPcm16, 32000, false, 1); | 1350 Configure(transport::kFakeSoftwareVideo, transport::kPcm16, 32000, false, 1); |
| 1348 Create(); | 1351 Create(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 EXPECT_LT((video_ticks_.back().second - test_end).InMilliseconds(), 1000); | 1436 EXPECT_LT((video_ticks_.back().second - test_end).InMilliseconds(), 1000); |
| 1434 } | 1437 } |
| 1435 | 1438 |
| 1436 // TODO(pwestin): Add repeatable packet loss test. | 1439 // TODO(pwestin): Add repeatable packet loss test. |
| 1437 // TODO(pwestin): Add test for misaligned send get calls. | 1440 // TODO(pwestin): Add test for misaligned send get calls. |
| 1438 // TODO(pwestin): Add more tests that does not resample. | 1441 // TODO(pwestin): Add more tests that does not resample. |
| 1439 // TODO(pwestin): Add test when we have starvation for our RunTask. | 1442 // TODO(pwestin): Add test when we have starvation for our RunTask. |
| 1440 | 1443 |
| 1441 } // namespace cast | 1444 } // namespace cast |
| 1442 } // namespace media | 1445 } // namespace media |
| OLD | NEW |