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

Side by Side Diff: media/filters/frame_processor.cc

Issue 310483005: MSE: Test append window discontinuity detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix lint error Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »
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/filters/frame_processor.h" 5 #include "media/filters/frame_processor.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "media/base/buffers.h" 8 #include "media/base/buffers.h"
9 #include "media/base/stream_parser_buffer.h" 9 #include "media/base/stream_parser_buffer.h"
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (decode_timestamp > presentation_timestamp) { 119 if (decode_timestamp > presentation_timestamp) {
120 // TODO(wolenetz): Determine whether DTS>PTS should really be allowed. See 120 // TODO(wolenetz): Determine whether DTS>PTS should really be allowed. See
121 // http://crbug.com/354518. 121 // http://crbug.com/354518.
122 DVLOG(2) << __FUNCTION__ << ": WARNING: Frame DTS(" 122 DVLOG(2) << __FUNCTION__ << ": WARNING: Frame DTS("
123 << decode_timestamp.InSecondsF() << ") > PTS(" 123 << decode_timestamp.InSecondsF() << ") > PTS("
124 << presentation_timestamp.InSecondsF() << ")"; 124 << presentation_timestamp.InSecondsF() << ")";
125 } 125 }
126 126
127 // TODO(acolwell/wolenetz): All stream parsers must emit valid (positive) 127 // TODO(acolwell/wolenetz): All stream parsers must emit valid (positive)
128 // frame durations. For now, we allow non-negative frame duration. 128 // frame durations. For now, we allow non-negative frame duration.
129 // Until frame durations are trusted, SourceBufferStream inter-buffer
130 // distance fudging may merge otherwise discontinuous ranges.
129 // See http://crbug.com/351166. 131 // See http://crbug.com/351166.
130 if (frame_duration == kNoTimestamp()) { 132 if (frame_duration == kNoTimestamp()) {
131 DVLOG(2) << __FUNCTION__ << ": Frame missing duration (kNoTimestamp())"; 133 DVLOG(2) << __FUNCTION__ << ": Frame missing duration (kNoTimestamp())";
132 return false; 134 return false;
133 } 135 }
134 if (frame_duration < base::TimeDelta()) { 136 if (frame_duration < base::TimeDelta()) {
135 DVLOG(2) << __FUNCTION__ << ": Frame duration negative: " 137 DVLOG(2) << __FUNCTION__ << ": Frame duration negative: "
136 << frame_duration.InSecondsF(); 138 << frame_duration.InSecondsF();
137 return false; 139 return false;
138 } 140 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 371 }
370 372
371 void FrameProcessor::SetAllTrackBuffersNeedRandomAccessPoint() { 373 void FrameProcessor::SetAllTrackBuffersNeedRandomAccessPoint() {
372 for (TrackBufferMap::iterator itr = track_buffers_.begin(); 374 for (TrackBufferMap::iterator itr = track_buffers_.begin();
373 itr != track_buffers_.end(); ++itr) { 375 itr != track_buffers_.end(); ++itr) {
374 itr->second->set_needs_random_access_point(true); 376 itr->second->set_needs_random_access_point(true);
375 } 377 }
376 } 378 }
377 379
378 } // namespace media 380 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698