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/filters/ffmpeg_demuxer.h" | 13 #include "media/filters/ffmpeg_demuxer.h" |
14 #include "media/filters/file_data_source.h" | 14 #include "media/filters/file_data_source.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "testing/perf/perf_test.h" | 16 #include "testing/perf/perf_test.h" |
17 | 17 |
18 namespace media { | 18 namespace media { |
19 | 19 |
20 static const int kBenchmarkIterations = 500; | 20 static const int kBenchmarkIterations = 500; |
21 | 21 |
22 class DemuxerHostImpl : public media::DemuxerHost { | 22 class DemuxerHostImpl : public media::DemuxerHost { |
23 public: | 23 public: |
24 DemuxerHostImpl() {} | 24 DemuxerHostImpl() {} |
25 virtual ~DemuxerHostImpl() {} | 25 virtual ~DemuxerHostImpl() {} |
26 | 26 |
27 // DataSourceHost implementation. | 27 // DemuxerHost implementation. |
28 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE {} | |
29 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE {} | |
30 virtual void AddBufferedTimeRange(base::TimeDelta start, | 28 virtual void AddBufferedTimeRange(base::TimeDelta start, |
31 base::TimeDelta end) OVERRIDE {} | 29 base::TimeDelta end) OVERRIDE {} |
32 | |
33 // DemuxerHost implementation. | |
34 virtual void SetDuration(base::TimeDelta duration) OVERRIDE {} | 30 virtual void SetDuration(base::TimeDelta duration) OVERRIDE {} |
35 virtual void OnDemuxerError(media::PipelineStatus error) OVERRIDE {} | 31 virtual void OnDemuxerError(media::PipelineStatus error) OVERRIDE {} |
36 virtual void AddTextStream(media::DemuxerStream* text_stream, | 32 virtual void AddTextStream(media::DemuxerStream* text_stream, |
37 const media::TextTrackConfig& config) OVERRIDE {} | 33 const media::TextTrackConfig& config) OVERRIDE {} |
38 virtual void RemoveTextStream(media::DemuxerStream* text_stream) OVERRIDE {} | 34 virtual void RemoveTextStream(media::DemuxerStream* text_stream) OVERRIDE {} |
39 | 35 |
40 private: | 36 private: |
41 DISALLOW_COPY_AND_ASSIGN(DemuxerHostImpl); | 37 DISALLOW_COPY_AND_ASSIGN(DemuxerHostImpl); |
42 }; | 38 }; |
43 | 39 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 #endif | 217 #endif |
222 #if defined(OS_CHROMEOS) | 218 #if defined(OS_CHROMEOS) |
223 RunDemuxerBenchmark("bear.flac"); | 219 RunDemuxerBenchmark("bear.flac"); |
224 #endif | 220 #endif |
225 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 221 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
226 RunDemuxerBenchmark("bear.avi"); | 222 RunDemuxerBenchmark("bear.avi"); |
227 #endif | 223 #endif |
228 } | 224 } |
229 | 225 |
230 } // namespace media | 226 } // namespace media |
OLD | NEW |