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

Unified Diff: media/filters/source_buffer_stream.h

Issue 10952034: Remove lingering frames of old data when appending a new segment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: response to CR Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_stream.h
diff --git a/media/filters/source_buffer_stream.h b/media/filters/source_buffer_stream.h
index b2e70b031a3ad260560bb88940188c5617a072d4..803f87724fef2635df5152661af6bcdd31f70cee 100644
--- a/media/filters/source_buffer_stream.h
+++ b/media/filters/source_buffer_stream.h
@@ -155,6 +155,25 @@ class MEDIA_EXPORT SourceBufferStream {
void MergeWithAdjacentRangeIfNecessary(
const RangeList::iterator& range_with_new_buffers_itr);
+ // Deletes the buffers between |start_timestamp|, |end_timestamp| from
+ // |range|. Deletes between [start,end] if |is_range_exclusive| is true, or
+ // (start,end) if |is_range_exclusive| is false.
+ // Buffers are deleted in GOPs, so this method may delete buffers past
+ // |end_timestamp| if the keyframe a buffer depends on was deleted.
+ // Returns true if the |next_buffer_index_| is reset, and places the buffers
+ // removed from the range starting at |next_buffer_index_| in
+ // |deleted_buffers|.
+ bool DeleteBetween(SourceBufferRange* range,
+ base::TimeDelta start_timestamp,
+ base::TimeDelta end_timestamp,
+ bool is_range_exclusive,
+ BufferQueue* deleted_buffers);
+
+ // Returns true if |second_timestamp| is the timestamp of the next buffer in
+ // sequence after |first_timestamp|, false otherwise.
+ bool AreAdjacentInSequence(
+ base::TimeDelta first_timestamp, base::TimeDelta second_timestamp) const;
+
// Helper method that returns the timestamp for the next buffer that
// |selected_range_| will return from GetNextBuffer() call, or kNoTimestamp()
// if in between seeking (i.e. |selected_range_| is null).
« no previous file with comments | « no previous file | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698