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

Side by Side Diff: media/base/audio_discard_helper.cc

Issue 1954633002: MEDIA_LOG for large encoded timestamp gaps in decoder stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: New strategy, only check gaps after meeting initial (offset) expectations. Created 4 years, 7 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
« no previous file with comments | « no previous file | media/filters/decoder_stream.h » ('j') | media/filters/decoder_stream.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/audio_discard_helper.h" 5 #include "media/base/audio_discard_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "media/base/audio_buffer.h" 10 #include "media/base/audio_buffer.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // If everything would be discarded, indicate a new buffer is required. 222 // If everything would be discarded, indicate a new buffer is required.
223 if (end_frames_to_discard == decoded_frames) 223 if (end_frames_to_discard == decoded_frames)
224 return false; 224 return false;
225 225
226 decoded_buffer->TrimEnd(end_frames_to_discard); 226 decoded_buffer->TrimEnd(end_frames_to_discard);
227 } 227 }
228 } else { 228 } else {
229 DCHECK(current_discard_padding.second.is_zero()); 229 DCHECK(current_discard_padding.second.is_zero());
230 } 230 }
231 231
232 DVLOG(3) << __FUNCTION__ << " ts: " << timestamp_helper_.GetTimestamp()
233 << " frames: " << decoded_buffer->frame_count();
234
232 // Assign timestamp to the buffer. 235 // Assign timestamp to the buffer.
233 decoded_buffer->set_timestamp(timestamp_helper_.GetTimestamp()); 236 decoded_buffer->set_timestamp(timestamp_helper_.GetTimestamp());
234 timestamp_helper_.AddFrames(decoded_buffer->frame_count()); 237 timestamp_helper_.AddFrames(decoded_buffer->frame_count());
235 return true; 238 return true;
236 } 239 }
237 240
238 } // namespace media 241 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/decoder_stream.h » ('j') | media/filters/decoder_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698