| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
| 6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
| 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
| 8 // Win/EGL. | 8 // Win/EGL. |
| 9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
| 10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); | 1259 EXPECT_GE(client->num_decoded_frames(), video_file->num_frames); |
| 1260 else | 1260 else |
| 1261 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); | 1261 EXPECT_EQ(client->num_decoded_frames(), video_file->num_frames); |
| 1262 } | 1262 } |
| 1263 if (reset_point == END_OF_STREAM_RESET) { | 1263 if (reset_point == END_OF_STREAM_RESET) { |
| 1264 EXPECT_EQ(video_file->num_fragments, client->num_skipped_fragments() + | 1264 EXPECT_EQ(video_file->num_fragments, client->num_skipped_fragments() + |
| 1265 client->num_queued_fragments()); | 1265 client->num_queued_fragments()); |
| 1266 EXPECT_EQ(client->num_done_bitstream_buffers(), | 1266 EXPECT_EQ(client->num_done_bitstream_buffers(), |
| 1267 client->num_queued_fragments()); | 1267 client->num_queued_fragments()); |
| 1268 } | 1268 } |
| 1269 LOG(INFO) << "Decoder " << i << " fps: " << client->frames_per_second(); | 1269 VLOG(0) << "Decoder " << i << " fps: " << client->frames_per_second(); |
| 1270 if (!render_as_thumbnails) { | 1270 if (!render_as_thumbnails) { |
| 1271 int min_fps = suppress_rendering ? | 1271 int min_fps = suppress_rendering ? |
| 1272 video_file->min_fps_no_render : video_file->min_fps_render; | 1272 video_file->min_fps_no_render : video_file->min_fps_render; |
| 1273 if (min_fps > 0 && !test_reuse_delay) | 1273 if (min_fps > 0 && !test_reuse_delay) |
| 1274 EXPECT_GT(client->frames_per_second(), min_fps); | 1274 EXPECT_GT(client->frames_per_second(), min_fps); |
| 1275 } | 1275 } |
| 1276 } | 1276 } |
| 1277 | 1277 |
| 1278 if (render_as_thumbnails) { | 1278 if (render_as_thumbnails) { |
| 1279 std::vector<unsigned char> rgb; | 1279 std::vector<unsigned char> rgb; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 g_rendering_fps, | 1446 g_rendering_fps, |
| 1447 true, | 1447 true, |
| 1448 std::numeric_limits<int>::max(), | 1448 std::numeric_limits<int>::max(), |
| 1449 kWebRtcDecodeCallsPerSecond); | 1449 kWebRtcDecodeCallsPerSecond); |
| 1450 CreateAndStartDecoder(client, note); | 1450 CreateAndStartDecoder(client, note); |
| 1451 WaitUntilDecodeFinish(note); | 1451 WaitUntilDecodeFinish(note); |
| 1452 | 1452 |
| 1453 int decode_time_median = client->decode_time_median(); | 1453 int decode_time_median = client->decode_time_median(); |
| 1454 std::string output_string = | 1454 std::string output_string = |
| 1455 base::StringPrintf("Decode time median: %d ms", decode_time_median); | 1455 base::StringPrintf("Decode time median: %d ms", decode_time_median); |
| 1456 LOG(INFO) << output_string; | 1456 VLOG(0) << output_string; |
| 1457 ASSERT_GT(decode_time_median, 0); | 1457 ASSERT_GT(decode_time_median, 0); |
| 1458 | 1458 |
| 1459 if (g_output_log != NULL) | 1459 if (g_output_log != NULL) |
| 1460 OutputLogFile(g_output_log, output_string); | 1460 OutputLogFile(g_output_log, output_string); |
| 1461 | 1461 |
| 1462 rendering_loop_proxy_->DeleteSoon(FROM_HERE, client); | 1462 rendering_loop_proxy_->DeleteSoon(FROM_HERE, client); |
| 1463 rendering_loop_proxy_->DeleteSoon(FROM_HERE, note); | 1463 rendering_loop_proxy_->DeleteSoon(FROM_HERE, note); |
| 1464 WaitUntilIdle(); | 1464 WaitUntilIdle(); |
| 1465 }; | 1465 }; |
| 1466 | 1466 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 } | 1513 } |
| 1514 if (it->first == "v" || it->first == "vmodule") | 1514 if (it->first == "v" || it->first == "vmodule") |
| 1515 continue; | 1515 continue; |
| 1516 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1516 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 base::ShadowingAtExitManager at_exit_manager; | 1519 base::ShadowingAtExitManager at_exit_manager; |
| 1520 | 1520 |
| 1521 return RUN_ALL_TESTS(); | 1521 return RUN_ALL_TESTS(); |
| 1522 } | 1522 } |
| OLD | NEW |