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

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

Issue 712593003: Move key frame flag from StreamParserBuffer to DecoderBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 6 years, 1 month 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
« no previous file with comments | « media/filters/frame_processor.cc ('k') | media/filters/source_buffer_range.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RANGE_H_ 5 #ifndef MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_
6 #define MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ 6 #define MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // Returns true if this range's buffered timespan completely overlaps the 188 // Returns true if this range's buffered timespan completely overlaps the
189 // buffered timespan of |range|. 189 // buffered timespan of |range|.
190 bool CompletelyOverlaps(const SourceBufferRange& range) const; 190 bool CompletelyOverlaps(const SourceBufferRange& range) const;
191 191
192 // Returns true if the end of this range contains buffers that overlaps with 192 // Returns true if the end of this range contains buffers that overlaps with
193 // the beginning of |range|. 193 // the beginning of |range|.
194 bool EndOverlaps(const SourceBufferRange& range) const; 194 bool EndOverlaps(const SourceBufferRange& range) const;
195 195
196 // Returns true if |timestamp| is the timestamp of the next buffer in 196 // Returns true if |timestamp| is the timestamp of the next buffer in
197 // sequence after |buffers_.back()|, false otherwise. 197 // sequence after |buffers_.back()|, false otherwise.
198 bool IsNextInSequence(DecodeTimestamp timestamp, bool is_keyframe) const; 198 bool IsNextInSequence(DecodeTimestamp timestamp, bool is_key_frame) const;
199 199
200 // Adds all buffers which overlap [start, end) to the end of |buffers|. If 200 // Adds all buffers which overlap [start, end) to the end of |buffers|. If
201 // no buffers exist in the range returns false, true otherwise. 201 // no buffers exist in the range returns false, true otherwise.
202 bool GetBuffersInRange(DecodeTimestamp start, DecodeTimestamp end, 202 bool GetBuffersInRange(DecodeTimestamp start, DecodeTimestamp end,
203 BufferQueue* buffers); 203 BufferQueue* buffers);
204 204
205 int size_in_bytes() const { return size_in_bytes_; } 205 int size_in_bytes() const { return size_in_bytes_; }
206 206
207 private: 207 private:
208 typedef std::map<DecodeTimestamp, int> KeyframeMap; 208 typedef std::map<DecodeTimestamp, int> KeyframeMap;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // Stores the amount of memory taken up by the data in |buffers_|. 281 // Stores the amount of memory taken up by the data in |buffers_|.
282 int size_in_bytes_; 282 int size_in_bytes_;
283 283
284 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange); 284 DISALLOW_COPY_AND_ASSIGN(SourceBufferRange);
285 }; 285 };
286 286
287 } // namespace media 287 } // namespace media
288 288
289 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_ 289 #endif // MEDIA_FILTERS_SOURCE_BUFFER_RANGE_H_
OLDNEW
« no previous file with comments | « media/filters/frame_processor.cc ('k') | media/filters/source_buffer_range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698