Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: media/base/android/access_unit_queue.cc

Issue 1287423004: MediaCodecPlayer implementation (stage 5 - reconfiguration) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-cleanuptest
Patch Set: Deleted better Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | media/base/android/demuxer_stream_player_params.h » ('j') | media/base/android/test_data_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698