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::StreamParameters::StreamParameters() |
| 13 : duration(kInfiniteDuration()), |
| 14 auto_update_timestamp_offset(false) { |
| 15 } |
| 16 |
12 StreamParser::StreamParser() {} | 17 StreamParser::StreamParser() {} |
13 | 18 |
14 StreamParser::~StreamParser() {} | 19 StreamParser::~StreamParser() {} |
15 | 20 |
16 static bool MergeBufferQueuesInternal( | 21 static bool MergeBufferQueuesInternal( |
17 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, | 22 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, |
18 StreamParser::BufferQueue* merged_buffers) { | 23 StreamParser::BufferQueue* merged_buffers) { |
19 // Instead of std::merge usage, this method implements a custom merge because: | 24 // Instead of std::merge usage, this method implements a custom merge because: |
20 // 1) |buffer_queues| may contain N queues, | 25 // 1) |buffer_queues| may contain N queues, |
21 // 2) we must detect and return false if any of the queues in |buffer_queues| | 26 // 2) we must detect and return false if any of the queues in |buffer_queues| |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 map_itr++) { | 127 map_itr++) { |
123 if (!map_itr->second.empty()) | 128 if (!map_itr->second.empty()) |
124 buffer_queues.push_back(&(map_itr->second)); | 129 buffer_queues.push_back(&(map_itr->second)); |
125 } | 130 } |
126 | 131 |
127 // Do the merge. | 132 // Do the merge. |
128 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); | 133 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); |
129 } | 134 } |
130 | 135 |
131 } // namespace media | 136 } // namespace media |
OLD | NEW |