| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "media/base/stream_parser.h" | 5 #include "media/base/stream_parser.h" |
| 6 | 6 |
| 7 #include "media/base/stream_parser_buffer.h" | 7 #include "media/base/stream_parser_buffer.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| 11 StreamParser::InitParameters::InitParameters(base::TimeDelta duration) | 11 StreamParser::InitParameters::InitParameters(base::TimeDelta duration) |
| 12 : duration(duration), | 12 : duration(duration), |
| 13 auto_update_timestamp_offset(false), | 13 auto_update_timestamp_offset(false), |
| 14 liveness(DemuxerStream::LIVENESS_UNKNOWN) { | 14 liveness(DemuxerStream::LIVENESS_UNKNOWN), |
| 15 } | 15 detected_audio_track_count(0), |
| 16 detected_video_track_count(0), |
| 17 detected_text_track_count(0) {} |
| 16 | 18 |
| 17 StreamParser::StreamParser() {} | 19 StreamParser::StreamParser() {} |
| 18 | 20 |
| 19 StreamParser::~StreamParser() {} | 21 StreamParser::~StreamParser() {} |
| 20 | 22 |
| 21 static bool MergeBufferQueuesInternal( | 23 static bool MergeBufferQueuesInternal( |
| 22 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, | 24 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, |
| 23 StreamParser::BufferQueue* merged_buffers) { | 25 StreamParser::BufferQueue* merged_buffers) { |
| 24 // Instead of std::merge usage, this method implements a custom merge because: | 26 // Instead of std::merge usage, this method implements a custom merge because: |
| 25 // 1) |buffer_queues| may contain N queues, | 27 // 1) |buffer_queues| may contain N queues, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 map_itr++) { | 129 map_itr++) { |
| 128 if (!map_itr->second.empty()) | 130 if (!map_itr->second.empty()) |
| 129 buffer_queues.push_back(&(map_itr->second)); | 131 buffer_queues.push_back(&(map_itr->second)); |
| 130 } | 132 } |
| 131 | 133 |
| 132 // Do the merge. | 134 // Do the merge. |
| 133 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); | 135 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); |
| 134 } | 136 } |
| 135 | 137 |
| 136 } // namespace media | 138 } // namespace media |
| OLD | NEW |