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" | |
26 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "testing/perf/perf_test.h" | 26 #include "testing/perf/perf_test.h" |
28 | 27 |
29 namespace media { | 28 namespace media { |
30 | 29 |
31 static const int kBenchmarkIterations = 100; | 30 static const int kBenchmarkIterations = 100; |
32 | 31 |
33 class DemuxerHostImpl : public media::DemuxerHost { | 32 class DemuxerHostImpl : public media::DemuxerHost { |
34 public: | 33 public: |
35 DemuxerHostImpl() {} | 34 DemuxerHostImpl() {} |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // http://crbug.com/399002 | 232 // http://crbug.com/399002 |
234 #define MAYBE_Demuxer DISABLED_Demuxer | 233 #define MAYBE_Demuxer DISABLED_Demuxer |
235 #else | 234 #else |
236 #define MAYBE_Demuxer Demuxer | 235 #define MAYBE_Demuxer Demuxer |
237 #endif | 236 #endif |
238 TEST(DemuxerPerfTest, MAYBE_Demuxer) { | 237 TEST(DemuxerPerfTest, MAYBE_Demuxer) { |
239 RunDemuxerBenchmark("bear.ogv"); | 238 RunDemuxerBenchmark("bear.ogv"); |
240 RunDemuxerBenchmark("bear-640x360.webm"); | 239 RunDemuxerBenchmark("bear-640x360.webm"); |
241 RunDemuxerBenchmark("sfx_s16le.wav"); | 240 RunDemuxerBenchmark("sfx_s16le.wav"); |
242 RunDemuxerBenchmark("bear.flac"); | 241 RunDemuxerBenchmark("bear.flac"); |
243 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 242 #if defined(USE_PROPRIETARY_CODECS) |
244 RunDemuxerBenchmark("bear-1280x720.mp4"); | 243 RunDemuxerBenchmark("bear-1280x720.mp4"); |
245 RunDemuxerBenchmark("sfx.mp3"); | 244 RunDemuxerBenchmark("sfx.mp3"); |
246 #endif | 245 #endif |
247 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 246 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
248 RunDemuxerBenchmark("bear.avi"); | 247 RunDemuxerBenchmark("bear.avi"); |
249 #endif | 248 #endif |
250 } | 249 } |
251 | 250 |
252 } // namespace media | 251 } // namespace media |
OLD | NEW |