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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/media.h" | 10 #include "media/base/media.h" |
11 #include "media/base/media_log.h" | 11 #include "media/base/media_log.h" |
12 #include "media/base/test_data_util.h" | 12 #include "media/base/test_data_util.h" |
13 #include "media/base/timestamp_constants.h" | 13 #include "media/base/timestamp_constants.h" |
14 #include "media/filters/ffmpeg_demuxer.h" | 14 #include "media/filters/ffmpeg_demuxer.h" |
15 #include "media/filters/file_data_source.h" | 15 #include "media/filters/file_data_source.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "testing/perf/perf_test.h" | 17 #include "testing/perf/perf_test.h" |
18 | 18 |
19 namespace media { | 19 namespace media { |
20 | 20 |
21 static const int kBenchmarkIterations = 100; | 21 static const int kBenchmarkIterations = 100; |
22 | 22 |
23 class DemuxerHostImpl : public media::DemuxerHost { | 23 class DemuxerHostImpl : public media::DemuxerHost { |
24 public: | 24 public: |
25 DemuxerHostImpl() {} | 25 DemuxerHostImpl() {} |
26 ~DemuxerHostImpl() override {} | 26 ~DemuxerHostImpl() override {} |
27 | 27 |
28 // DemuxerHost implementation. | 28 // DemuxerHost implementation. |
29 void AddBufferedTimeRange(base::TimeDelta start, | 29 void OnBufferedTimeRangesChanged( |
30 base::TimeDelta end) override {} | 30 const Ranges<base::TimeDelta>& ranges) override {} |
31 void SetDuration(base::TimeDelta duration) override {} | 31 void SetDuration(base::TimeDelta duration) override {} |
32 void OnDemuxerError(media::PipelineStatus error) override {} | 32 void OnDemuxerError(media::PipelineStatus error) override {} |
33 void AddTextStream(media::DemuxerStream* text_stream, | 33 void AddTextStream(media::DemuxerStream* text_stream, |
34 const media::TextTrackConfig& config) override {} | 34 const media::TextTrackConfig& config) override {} |
35 void RemoveTextStream(media::DemuxerStream* text_stream) override {} | 35 void RemoveTextStream(media::DemuxerStream* text_stream) override {} |
36 | 36 |
37 private: | 37 private: |
38 DISALLOW_COPY_AND_ASSIGN(DemuxerHostImpl); | 38 DISALLOW_COPY_AND_ASSIGN(DemuxerHostImpl); |
39 }; | 39 }; |
40 | 40 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 #endif | 223 #endif |
224 #if defined(OS_CHROMEOS) | 224 #if defined(OS_CHROMEOS) |
225 RunDemuxerBenchmark("bear.flac"); | 225 RunDemuxerBenchmark("bear.flac"); |
226 #endif | 226 #endif |
227 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 227 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
228 RunDemuxerBenchmark("bear.avi"); | 228 RunDemuxerBenchmark("bear.avi"); |
229 #endif | 229 #endif |
230 } | 230 } |
231 | 231 |
232 } // namespace media | 232 } // namespace media |
OLD | NEW |