OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/access_unit_queue.h" | 5 #include "media/base/android/access_unit_queue.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "media/base/demuxer_stream.h" | 9 #include "media/base/demuxer_stream.h" |
10 | 10 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 return info; | 182 return info; |
183 } | 183 } |
184 | 184 |
185 void AccessUnitQueue::SetHistorySizeForTesting(size_t history_chunks_amount) { | 185 void AccessUnitQueue::SetHistorySizeForTesting(size_t history_chunks_amount) { |
186 history_chunks_amount_ = history_chunks_amount; | 186 history_chunks_amount_ = history_chunks_amount; |
187 } | 187 } |
188 | 188 |
189 int AccessUnitQueue::GetUnconsumedAccessUnitLength() const { | 189 int AccessUnitQueue::GetUnconsumedAccessUnitLength() const { |
190 int result = 0; | 190 int result = 0; |
191 DataChunkQueue::const_iterator chunk; | 191 DataChunkQueue::const_iterator chunk; |
192 for (chunk = current_chunk_; chunk != chunks_.end(); ++chunk) | 192 for (chunk = current_chunk_; chunk != chunks_.end(); ++chunk) { |
193 result += (*chunk)->access_units.size(); | 193 result += (*chunk)->access_units.size(); |
194 | 194 |
195 // Do not count configuration changes. | |
196 if (!(*chunk)->demuxer_configs.empty()) { | |
197 DCHECK((*chunk)->demuxer_configs.size() == 1); | |
qinmin
2015/08/21 18:37:53
doesn't this impacts GetInfo() call above?
so if t
Tima Vaisburd
2015/08/25 22:57:30
Yes, it's a bug. I added another length, |data_len
| |
198 --result; | |
199 } | |
200 } | |
201 | |
195 result -= index_in_chunk_; | 202 result -= index_in_chunk_; |
196 return result; | 203 return result; |
197 } | 204 } |
198 | 205 |
199 } // namespace media | 206 } // namespace media |
OLD | NEW |