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

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

Issue 256583006: Fix possible buffer emission during an abort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comments. Created 6 years, 7 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
« no previous file with comments | « content/renderer/media/websourcebuffer_impl.cc ('k') | media/filters/chunk_demuxer.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_CHUNK_DEMUXER_H_ 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // |append_window_start| and |append_window_end| correspond to the MSE spec's 213 // |append_window_start| and |append_window_end| correspond to the MSE spec's
214 // similarly named source buffer attributes that are used in coded frame 214 // similarly named source buffer attributes that are used in coded frame
215 // processing. 215 // processing.
216 void AppendData(const std::string& id, const uint8* data, size_t length, 216 void AppendData(const std::string& id, const uint8* data, size_t length,
217 base::TimeDelta append_window_start, 217 base::TimeDelta append_window_start,
218 base::TimeDelta append_window_end, 218 base::TimeDelta append_window_end,
219 base::TimeDelta* timestamp_offset); 219 base::TimeDelta* timestamp_offset);
220 220
221 // Aborts parsing the current segment and reset the parser to a state where 221 // Aborts parsing the current segment and reset the parser to a state where
222 // it can accept a new segment. 222 // it can accept a new segment.
223 void Abort(const std::string& id); 223 // Some pending frames can be emitted during that process. These frames are
224 // applied |timestamp_offset|.
225 void Abort(const std::string& id,
226 base::TimeDelta append_window_start,
227 base::TimeDelta append_window_end,
228 base::TimeDelta* timestamp_offset);
224 229
225 // Remove buffers between |start| and |end| for the source buffer 230 // Remove buffers between |start| and |end| for the source buffer
226 // associated with |id|. 231 // associated with |id|.
227 void Remove(const std::string& id, base::TimeDelta start, 232 void Remove(const std::string& id, base::TimeDelta start,
228 base::TimeDelta end); 233 base::TimeDelta end);
229 234
230 // Returns the current presentation duration. 235 // Returns the current presentation duration.
231 double GetDuration(); 236 double GetDuration();
232 double GetDuration_Locked(); 237 double GetDuration_Locked();
233 238
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 383
379 // Indicates that splice frame generation is enabled. 384 // Indicates that splice frame generation is enabled.
380 const bool splice_frames_enabled_; 385 const bool splice_frames_enabled_;
381 386
382 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 387 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
383 }; 388 };
384 389
385 } // namespace media 390 } // namespace media
386 391
387 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 392 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/websourcebuffer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698