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

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

Issue 10736021: Reland r145965 - Make sure previous seek points in SourceBufferStream are ignored during overlaps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix asan Created 8 years, 5 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 | « no previous file | 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 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 5 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
6 #define MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 6 #define MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <utility> 10 #include <utility>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 RangeList::iterator FindExistingRangeFor(base::TimeDelta start_timestamp); 148 RangeList::iterator FindExistingRangeFor(base::TimeDelta start_timestamp);
149 149
150 // Inserts |new_range| into |ranges_| preserving sorted order. Returns an 150 // Inserts |new_range| into |ranges_| preserving sorted order. Returns an
151 // iterator in |ranges_| that points to |new_range|. 151 // iterator in |ranges_| that points to |new_range|.
152 RangeList::iterator AddToRanges(SourceBufferRange* new_range); 152 RangeList::iterator AddToRanges(SourceBufferRange* new_range);
153 153
154 // Returns an iterator that points to the place in |ranges_| where 154 // Returns an iterator that points to the place in |ranges_| where
155 // |selected_range_| lives. 155 // |selected_range_| lives.
156 RangeList::iterator GetSelectedRangeItr(); 156 RangeList::iterator GetSelectedRangeItr();
157 157
158 // Sets the |selected_range_| to |range| and resets the next buffer position
159 // for the previous |selected_range_|.
160 void SetSelectedRange(SourceBufferRange* range);
161
158 // Returns true if the timestamps of |buffers| are monotonically increasing 162 // Returns true if the timestamps of |buffers| are monotonically increasing
159 // since the previous append to the media segment, false otherwise. 163 // since the previous append to the media segment, false otherwise.
160 bool IsMonotonicallyIncreasing(const BufferQueue& buffers); 164 bool IsMonotonicallyIncreasing(const BufferQueue& buffers);
161 165
166 // Returns true if |selected_range_| is the only range in |ranges_| that
167 // HasNextBufferPosition().
168 bool OnlySelectedRangeIsSeeked() const;
169
162 // Measures the distances between buffer timestamps and tracks the max. 170 // Measures the distances between buffer timestamps and tracks the max.
163 void UpdateMaxInterbufferDistance(const BufferQueue& buffers); 171 void UpdateMaxInterbufferDistance(const BufferQueue& buffers);
164 172
165 // List of disjoint buffered ranges, ordered by start time. 173 // List of disjoint buffered ranges, ordered by start time.
166 RangeList ranges_; 174 RangeList ranges_;
167 175
168 AudioDecoderConfig audio_config_; 176 AudioDecoderConfig audio_config_;
169 VideoDecoderConfig video_config_; 177 VideoDecoderConfig video_config_;
170 178
171 // True if more data needs to be appended before the Seek() can complete, 179 // True if more data needs to be appended before the Seek() can complete,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 211
204 // Stores the largest distance between two adjacent buffers in this stream. 212 // Stores the largest distance between two adjacent buffers in this stream.
205 base::TimeDelta max_interbuffer_distance_; 213 base::TimeDelta max_interbuffer_distance_;
206 214
207 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream); 215 DISALLOW_COPY_AND_ASSIGN(SourceBufferStream);
208 }; 216 };
209 217
210 } // namespace media 218 } // namespace media
211 219
212 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_ 220 #endif // MEDIA_FILTERS_SOURCE_BUFFER_STREAM_H_
OLDNEW
« 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