| 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 #include "media/base/test_data_util.h" | 5 #include "media/base/test_data_util.h" |
| 6 #include "media/test/pipeline_integration_test_base.h" | 6 #include "media/test/pipeline_integration_test_base.h" |
| 7 #include "testing/perf/perf_test.h" | 7 #include "testing/perf/perf_test.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| 11 static const int kBenchmarkIterationsAudio = 200; | 11 static const int kBenchmarkIterationsAudio = 200; |
| 12 static const int kBenchmarkIterationsVideo = 20; | 12 static const int kBenchmarkIterationsVideo = 100; |
| 13 | 13 |
| 14 static void RunPlaybackBenchmark(const std::string& filename, | 14 static void RunPlaybackBenchmark(const std::string& filename, |
| 15 const std::string& name, | 15 const std::string& name, |
| 16 int iterations, | 16 int iterations, |
| 17 bool audio_only) { | 17 bool audio_only) { |
| 18 double time_seconds = 0.0; | 18 double time_seconds = 0.0; |
| 19 | 19 |
| 20 for (int i = 0; i < iterations; ++i) { | 20 for (int i = 0; i < iterations; ++i) { |
| 21 PipelineIntegrationTestBase pipeline; | 21 PipelineIntegrationTestBase pipeline; |
| 22 | 22 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 "clockless_video_playback_theora"); | 80 "clockless_video_playback_theora"); |
| 81 } | 81 } |
| 82 | 82 |
| 83 #if defined(USE_PROPRIETARY_CODECS) | 83 #if defined(USE_PROPRIETARY_CODECS) |
| 84 TEST(PipelineIntegrationPerfTest, MP4PlaybackBenchmark) { | 84 TEST(PipelineIntegrationPerfTest, MP4PlaybackBenchmark) { |
| 85 RunVideoPlaybackBenchmark("bear_silent.mp4", "clockless_video_playback_mp4"); | 85 RunVideoPlaybackBenchmark("bear_silent.mp4", "clockless_video_playback_mp4"); |
| 86 } | 86 } |
| 87 #endif | 87 #endif |
| 88 | 88 |
| 89 } // namespace media | 89 } // namespace media |
| OLD | NEW |