| 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/buffers.h" | 7 #include "media/base/buffers.h" |
| 8 #include "media/base/stream_parser_buffer.h" | 8 #include "media/base/stream_parser_buffer.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| 11 | 11 |
| 12 StreamParser::InitParameters::InitParameters(base::TimeDelta duration) | 12 StreamParser::InitParameters::InitParameters(base::TimeDelta duration) |
| 13 : duration(duration), | 13 : duration(duration), |
| 14 auto_update_timestamp_offset(false), | 14 auto_update_timestamp_offset(false), |
| 15 liveness(Demuxer::LIVENESS_UNKNOWN) { | 15 liveness(DemuxerStream::LIVENESS_UNKNOWN) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 StreamParser::StreamParser() {} | 18 StreamParser::StreamParser() {} |
| 19 | 19 |
| 20 StreamParser::~StreamParser() {} | 20 StreamParser::~StreamParser() {} |
| 21 | 21 |
| 22 static bool MergeBufferQueuesInternal( | 22 static bool MergeBufferQueuesInternal( |
| 23 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, | 23 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, |
| 24 StreamParser::BufferQueue* merged_buffers) { | 24 StreamParser::BufferQueue* merged_buffers) { |
| 25 // Instead of std::merge usage, this method implements a custom merge because: | 25 // Instead of std::merge usage, this method implements a custom merge because: |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 map_itr++) { | 128 map_itr++) { |
| 129 if (!map_itr->second.empty()) | 129 if (!map_itr->second.empty()) |
| 130 buffer_queues.push_back(&(map_itr->second)); | 130 buffer_queues.push_back(&(map_itr->second)); |
| 131 } | 131 } |
| 132 | 132 |
| 133 // Do the merge. | 133 // Do the merge. |
| 134 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); | 134 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace media | 137 } // namespace media |
| OLD | NEW |