| 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" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 std::vector<bool> end_of_stream_; | 96 std::vector<bool> end_of_stream_; |
| 97 std::vector<base::TimeDelta> last_read_timestamp_; | 97 std::vector<base::TimeDelta> last_read_timestamp_; |
| 98 std::vector<int> counts_; | 98 std::vector<int> counts_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(StreamReader); | 100 DISALLOW_COPY_AND_ASSIGN(StreamReader); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 StreamReader::StreamReader(media::Demuxer* demuxer, | 103 StreamReader::StreamReader(media::Demuxer* demuxer, |
| 104 bool enable_bitstream_converter) { | 104 bool enable_bitstream_converter) { |
| 105 std::vector<media::DemuxerStream*> streams = demuxer->GetAllStreams(); | 105 std::vector<media::DemuxerStream*> streams = demuxer->GetAllStreams(); |
| 106 for (auto* stream : streams) { | 106 for (const auto& stream : streams) { |
| 107 streams_.push_back(stream); | 107 streams_.push_back(stream); |
| 108 end_of_stream_.push_back(false); | 108 end_of_stream_.push_back(false); |
| 109 last_read_timestamp_.push_back(media::kNoTimestamp); | 109 last_read_timestamp_.push_back(media::kNoTimestamp); |
| 110 counts_.push_back(0); | 110 counts_.push_back(0); |
| 111 if (enable_bitstream_converter && stream->type() == DemuxerStream::VIDEO) | 111 if (enable_bitstream_converter && stream->type() == DemuxerStream::VIDEO) |
| 112 stream->EnableBitstreamConverter(); | 112 stream->EnableBitstreamConverter(); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 StreamReader::~StreamReader() {} | 116 StreamReader::~StreamReader() {} |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 233 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
| 234 RunDemuxerBenchmark("bear-1280x720.mp4"); | 234 RunDemuxerBenchmark("bear-1280x720.mp4"); |
| 235 RunDemuxerBenchmark("sfx.mp3"); | 235 RunDemuxerBenchmark("sfx.mp3"); |
| 236 #endif | 236 #endif |
| 237 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) | 237 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && defined(OS_CHROMEOS) |
| 238 RunDemuxerBenchmark("bear.avi"); | 238 RunDemuxerBenchmark("bear.avi"); |
| 239 #endif | 239 #endif |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace media | 242 } // namespace media |
| OLD | NEW |