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

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

Issue 10832151: Add kSeekToStartFudgeRoom to SourceBufferStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase ToT Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/source_buffer_stream.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 (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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 RangeList::iterator AddToRanges(SourceBufferRange* new_range); 167 RangeList::iterator AddToRanges(SourceBufferRange* new_range);
168 168
169 // Returns an iterator that points to the place in |ranges_| where 169 // Returns an iterator that points to the place in |ranges_| where
170 // |selected_range_| lives. 170 // |selected_range_| lives.
171 RangeList::iterator GetSelectedRangeItr(); 171 RangeList::iterator GetSelectedRangeItr();
172 172
173 // Sets the |selected_range_| to |range| and resets the next buffer position 173 // Sets the |selected_range_| to |range| and resets the next buffer position
174 // for the previous |selected_range_|. 174 // for the previous |selected_range_|.
175 void SetSelectedRange(SourceBufferRange* range); 175 void SetSelectedRange(SourceBufferRange* range);
176 176
177 // Returns true if |timestamp| occurs before the start timestamp of the first 177 // Returns true if |seek_timestamp| refers to the beginning of the first range
178 // range in |ranges_|, false otherwise or if |ranges_| is empty. 178 // in |ranges_|, false otherwise or if |ranges_| is empty.
179 bool IsBeforeFirstRange(base::TimeDelta timestamp) const; 179 bool ShouldSeekToStartOfBuffered(base::TimeDelta seek_timestamp) const;
180 180
181 // Returns true if the timestamps of |buffers| are monotonically increasing 181 // Returns true if the timestamps of |buffers| are monotonically increasing
182 // since the previous append to the media segment, false otherwise. 182 // since the previous append to the media segment, false otherwise.
183 bool IsMonotonicallyIncreasing(const BufferQueue& buffers) const; 183 bool IsMonotonicallyIncreasing(const BufferQueue& buffers) const;
184 184
185 // Returns true if |selected_range_| is the only range in |ranges_| that 185 // Returns true if |selected_range_| is the only range in |ranges_| that
186 // HasNextBufferPosition(). 186 // HasNextBufferPosition().
187 bool OnlySelectedRangeIsSeeked() const; 187 bool OnlySelectedRangeIsSeeked() const;
188 188
189 // Measures the distances between buffer timestamps and tracks the max. 189 // Measures the distances between buffer timestamps and tracks the max.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 // Stores the largest distance between two adjacent buffers in this stream. 252 // Stores the largest distance between two adjacent buffers in this stream.
253 base::TimeDelta max_interbuffer_distance_; 253 base::TimeDelta max_interbuffer_distance_;
254 254
255 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); 255 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream);
256 }; 256 };
257 257
258 } // namespace media 258 } // namespace media
259 259
260 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 260 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698