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

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

Issue 1119163005: Return EOS when selected_range_ is NULL in SourceBufferStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review nitpicks Created 5 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
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 // SourceBufferStream is a data structure that stores media Buffers in ranges. 5 // SourceBufferStream is a data structure that stores media Buffers in ranges.
6 // Buffers can be appended out of presentation order. Buffers are retrieved by 6 // Buffers can be appended out of presentation order. Buffers are retrieved by
7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are 7 // seeking to the desired start point and calling GetNextBuffer(). Buffers are
8 // returned in sequential presentation order. 8 // returned in sequential presentation order.
9 9
10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 10 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Searches |ranges_| for the first keyframe timestamp that is >= |timestamp|. 269 // Searches |ranges_| for the first keyframe timestamp that is >= |timestamp|.
270 // If |ranges_| doesn't contain a GOP that covers |timestamp| or doesn't 270 // If |ranges_| doesn't contain a GOP that covers |timestamp| or doesn't
271 // have a keyframe after |timestamp| then kNoTimestamp() is returned. 271 // have a keyframe after |timestamp| then kNoTimestamp() is returned.
272 DecodeTimestamp FindKeyframeAfterTimestamp(const DecodeTimestamp timestamp); 272 DecodeTimestamp FindKeyframeAfterTimestamp(const DecodeTimestamp timestamp);
273 273
274 // Returns "VIDEO" for a video SourceBufferStream, "AUDIO" for an audio 274 // Returns "VIDEO" for a video SourceBufferStream, "AUDIO" for an audio
275 // stream, and "TEXT" for a text stream. 275 // stream, and "TEXT" for a text stream.
276 std::string GetStreamTypeName() const; 276 std::string GetStreamTypeName() const;
277 277
278 // Returns true if we don't have any ranges or the last range is selected 278 // Returns true if we don't have any ranges or the last range is selected
279 // or there is a pending seek beyond any existing ranges. 279 // or there is a pending seek beyond any existing ranges.
wolenetz 2015/05/13 18:23:02 nit ping :) : Please update this comment per my ni
280 bool IsEndSelected() const; 280 bool IsEndOfStreamReached() const;
281 281
282 // Deletes the range pointed to by |*itr| and removes it from |ranges_|. 282 // Deletes the range pointed to by |*itr| and removes it from |ranges_|.
283 // If |*itr| points to |selected_range_|, then |selected_range_| is set to 283 // If |*itr| points to |selected_range_|, then |selected_range_| is set to
284 // NULL. After the range is removed, |*itr| is to the range after the one that 284 // NULL. After the range is removed, |*itr| is to the range after the one that
285 // was removed or to |ranges_.end()| if the last range was removed. 285 // was removed or to |ranges_.end()| if the last range was removed.
286 void DeleteAndRemoveRange(RangeList::iterator* itr); 286 void DeleteAndRemoveRange(RangeList::iterator* itr);
287 287
288 // Helper function used by Remove() and PrepareRangesForNextAppend() to 288 // Helper function used by Remove() and PrepareRangesForNextAppend() to
289 // remove buffers and ranges between |start| and |end|. 289 // remove buffers and ranges between |start| and |end|.
290 // |exclude_start| - If set to true, buffers with timestamps that 290 // |exclude_start| - If set to true, buffers with timestamps that
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 // Indicates that splice frame generation is enabled. 416 // Indicates that splice frame generation is enabled.
417 const bool splice_frames_enabled_; 417 const bool splice_frames_enabled_;
418 418
419 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); 419 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream);
420 }; 420 };
421 421
422 } // namespace media 422 } // namespace media
423 423
424 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 424 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/source_buffer_stream.cc » ('j') | media/filters/source_buffer_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698