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

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

Issue 222783007: Consider text tracks in the frame processor for new media segments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
OLDNEW
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/filters/source_buffer_stream.h" 5 #include "media/filters/source_buffer_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 } 441 }
442 442
443 bool SourceBufferStream::Append(const BufferQueue& buffers) { 443 bool SourceBufferStream::Append(const BufferQueue& buffers) {
444 TRACE_EVENT2("media", "SourceBufferStream::Append", 444 TRACE_EVENT2("media", "SourceBufferStream::Append",
445 "stream type", GetStreamTypeName(), 445 "stream type", GetStreamTypeName(),
446 "buffers to append", buffers.size()); 446 "buffers to append", buffers.size());
447 447
448 DCHECK(!buffers.empty()); 448 DCHECK(!buffers.empty());
449 DCHECK(media_segment_start_time_ != kNoTimestamp()); 449 DCHECK(media_segment_start_time_ != kNoTimestamp());
450 DCHECK(media_segment_start_time_ <= buffers.front()->timestamp());
acolwell GONE FROM CHROMIUM 2014/04/03 00:26:52 I was wrong. This should be using GetDecodeTimesta
DaleCurtis 2014/04/08 20:42:30 Ah, good call, this fixed the issue.
450 DCHECK(!end_of_stream_); 451 DCHECK(!end_of_stream_);
451 452
452 // New media segments must begin with a keyframe. 453 // New media segments must begin with a keyframe.
453 if (new_media_segment_ && !buffers.front()->IsKeyframe()) { 454 if (new_media_segment_ && !buffers.front()->IsKeyframe()) {
454 MEDIA_LOG(log_cb_) << "Media segment did not begin with keyframe."; 455 MEDIA_LOG(log_cb_) << "Media segment did not begin with keyframe.";
455 return false; 456 return false;
456 } 457 }
457 458
458 // Buffers within a media segment should be monotonically increasing. 459 // Buffers within a media segment should be monotonically increasing.
459 if (!IsMonotonicallyIncreasing(buffers)) 460 if (!IsMonotonicallyIncreasing(buffers))
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 if (buffer->end_of_stream() || buffer->timestamp() >= end) 2176 if (buffer->end_of_stream() || buffer->timestamp() >= end)
2176 break; 2177 break;
2177 if (buffer->timestamp() + buffer->duration() <= start) 2178 if (buffer->timestamp() + buffer->duration() <= start)
2178 continue; 2179 continue;
2179 buffers->push_back(buffer); 2180 buffers->push_back(buffer);
2180 } 2181 }
2181 return previous_size < buffers->size(); 2182 return previous_size < buffers->size();
2182 } 2183 }
2183 2184
2184 } // namespace media 2185 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698