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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "media/base/media.h" | 18 #include "media/base/media.h" |
19 #include "media/base/media_log.h" | 19 #include "media/base/media_log.h" |
20 #include "media/base/media_tracks.h" | 20 #include "media/base/media_tracks.h" |
21 #include "media/base/test_data_util.h" | 21 #include "media/base/test_data_util.h" |
22 #include "media/base/timestamp_constants.h" | 22 #include "media/base/timestamp_constants.h" |
23 #include "media/filters/ffmpeg_demuxer.h" | 23 #include "media/filters/ffmpeg_demuxer.h" |
24 #include "media/filters/file_data_source.h" | 24 #include "media/filters/file_data_source.h" |
| 25 #include "media/media_features.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
26 #include "testing/perf/perf_test.h" | 27 #include "testing/perf/perf_test.h" |
27 | 28 |
28 namespace media { | 29 namespace media { |
29 | 30 |
30 static const int kBenchmarkIterations = 100; | 31 static const int kBenchmarkIterations = 100; |
31 | 32 |
32 class DemuxerHostImpl : public media::DemuxerHost { | 33 class DemuxerHostImpl : public media::DemuxerHost { |
33 public: | 34 public: |
34 DemuxerHostImpl() {} | 35 DemuxerHostImpl() {} |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // http://crbug.com/399002 | 233 // http://crbug.com/399002 |
233 #define MAYBE_Demuxer DISABLED_Demuxer | 234 #define MAYBE_Demuxer DISABLED_Demuxer |
234 #else | 235 #else |
235 #define MAYBE_Demuxer Demuxer | 236 #define MAYBE_Demuxer Demuxer |
236 #endif | 237 #endif |
237 TEST(DemuxerPerfTest, MAYBE_Demuxer) { | 238 TEST(DemuxerPerfTest, MAYBE_Demuxer) { |
238 RunDemuxerBenchmark("bear.ogv"); | 239 RunDemuxerBenchmark("bear.ogv"); |
239 RunDemuxerBenchmark("bear-640x360.webm"); | 240 RunDemuxerBenchmark("bear-640x360.webm"); |
240 RunDemuxerBenchmark("sfx_s16le.wav"); | 241 RunDemuxerBenchmark("sfx_s16le.wav"); |
241 RunDemuxerBenchmark("bear.flac"); | 242 RunDemuxerBenchmark("bear.flac"); |
242 #if defined(USE_PROPRIETARY_CODECS) | 243 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
243 RunDemuxerBenchmark("bear-1280x720.mp4"); | 244 RunDemuxerBenchmark("bear-1280x720.mp4"); |
244 RunDemuxerBenchmark("sfx.mp3"); | 245 RunDemuxerBenchmark("sfx.mp3"); |
245 #endif | 246 #endif |
246 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 247 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
247 RunDemuxerBenchmark("bear.avi"); | 248 RunDemuxerBenchmark("bear.avi"); |
248 #endif | 249 #endif |
249 } | 250 } |
250 | 251 |
251 } // namespace media | 252 } // namespace media |
OLD | NEW |