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" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 }; | 42 }; |
43 | 43 |
44 static void QuitLoopWithStatus(base::MessageLoop* message_loop, | 44 static void QuitLoopWithStatus(base::MessageLoop* message_loop, |
45 media::PipelineStatus status) { | 45 media::PipelineStatus status) { |
46 CHECK_EQ(status, media::PIPELINE_OK); | 46 CHECK_EQ(status, media::PIPELINE_OK); |
47 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); | 47 message_loop->PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
48 } | 48 } |
49 | 49 |
50 static void NeedKey(const std::string& type, | 50 static void NeedKey(const std::string& type, |
51 const std::vector<uint8>& init_data) { | 51 const std::vector<uint8>& init_data) { |
52 LOG(INFO) << "File is encrypted."; | 52 VLOG(0) << "File is encrypted."; |
53 } | 53 } |
54 | 54 |
55 typedef std::vector<media::DemuxerStream* > Streams; | 55 typedef std::vector<media::DemuxerStream* > Streams; |
56 | 56 |
57 // Simulates playback reading requirements by reading from each stream | 57 // Simulates playback reading requirements by reading from each stream |
58 // present in |demuxer| in as-close-to-monotonically-increasing timestamp order. | 58 // present in |demuxer| in as-close-to-monotonically-increasing timestamp order. |
59 class StreamReader { | 59 class StreamReader { |
60 public: | 60 public: |
61 StreamReader(media::Demuxer* demuxer, bool enable_bitstream_converter); | 61 StreamReader(media::Demuxer* demuxer, bool enable_bitstream_converter); |
62 ~StreamReader(); | 62 ~StreamReader(); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 #endif | 221 #endif |
222 #if defined(OS_CHROMEOS) | 222 #if defined(OS_CHROMEOS) |
223 RunDemuxerBenchmark("bear.flac"); | 223 RunDemuxerBenchmark("bear.flac"); |
224 #endif | 224 #endif |
225 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 225 #if defined(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
226 RunDemuxerBenchmark("bear.avi"); | 226 RunDemuxerBenchmark("bear.avi"); |
227 #endif | 227 #endif |
228 } | 228 } |
229 | 229 |
230 } // namespace media | 230 } // namespace media |
OLD | NEW |