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

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

Issue 1281113002: MSE: Warn when keyframe after track_buffer is significantly in future (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed DCHECK, added tests, need to fix log resulting from one of new tests 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 (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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 // Pointer to the seeked-to Range. This is the range from which 368 // Pointer to the seeked-to Range. This is the range from which
369 // GetNextBuffer() calls are fulfilled after the |track_buffer_| has been 369 // GetNextBuffer() calls are fulfilled after the |track_buffer_| has been
370 // emptied. 370 // emptied.
371 SourceBufferRange* selected_range_; 371 SourceBufferRange* selected_range_;
372 372
373 // Queue of the next buffers to be returned from calls to GetNextBuffer(). If 373 // Queue of the next buffers to be returned from calls to GetNextBuffer(). If
374 // |track_buffer_| is empty, return buffers from |selected_range_|. 374 // |track_buffer_| is empty, return buffers from |selected_range_|.
375 BufferQueue track_buffer_; 375 BufferQueue track_buffer_;
376 376
377 // If there has been no intervening Seek, this will be true if the last
378 // emitted buffer emptied |track_buffer_|.
379 bool just_exhausted_track_buffer_;
380
377 // The start time of the current media segment being appended. 381 // The start time of the current media segment being appended.
378 DecodeTimestamp media_segment_start_time_; 382 DecodeTimestamp media_segment_start_time_;
379 383
380 // Points to the range containing the current media segment being appended. 384 // Points to the range containing the current media segment being appended.
381 RangeList::iterator range_for_next_append_; 385 RangeList::iterator range_for_next_append_;
382 386
383 // True when the next call to Append() begins a new media segment. 387 // True when the next call to Append() begins a new media segment.
384 bool new_media_segment_; 388 bool new_media_segment_;
385 389
386 // The timestamp of the last buffer appended to the media segment, set to 390 // The timestamp of the last buffer appended to the media segment, set to
(...skipping 26 matching lines...) Expand all
413 // Indicates which of the splice buffers in |splice_buffer_| should be 417 // Indicates which of the splice buffers in |splice_buffer_| should be
414 // handled out next. 418 // handled out next.
415 size_t splice_buffers_index_; 419 size_t splice_buffers_index_;
416 420
417 // Indicates that all buffers before |pending_buffer_| have been handed out. 421 // Indicates that all buffers before |pending_buffer_| have been handed out.
418 bool pending_buffers_complete_; 422 bool pending_buffers_complete_;
419 423
420 // Indicates that splice frame generation is enabled. 424 // Indicates that splice frame generation is enabled.
421 const bool splice_frames_enabled_; 425 const bool splice_frames_enabled_;
422 426
423 // To prevent log spam, count the number of splice generation warnings and 427 // To prevent log spam, count the number of warnings and successes logged.
424 // successes logged.
425 int num_splice_generation_warning_logs_; 428 int num_splice_generation_warning_logs_;
426 int num_splice_generation_success_logs_; 429 int num_splice_generation_success_logs_;
430 int num_track_buffer_gap_warning_logs_;
427 431
428 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); 432 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream);
429 }; 433 };
430 434
431 } // namespace media 435 } // namespace media
432 436
433 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 437 #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