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

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

Issue 110693007: Fix various operations in ChunkDemuxer that were not being applied to text tracks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 6 years, 11 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/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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void MarkEndOfStream(PipelineStatus status); 130 void MarkEndOfStream(PipelineStatus status);
131 void UnmarkEndOfStream(); 131 void UnmarkEndOfStream();
132 132
133 // Set the append window start and end values for the source buffer 133 // Set the append window start and end values for the source buffer
134 // associated with |id|. 134 // associated with |id|.
135 void SetAppendWindowStart(const std::string& id, base::TimeDelta start); 135 void SetAppendWindowStart(const std::string& id, base::TimeDelta start);
136 void SetAppendWindowEnd(const std::string& id, base::TimeDelta end); 136 void SetAppendWindowEnd(const std::string& id, base::TimeDelta end);
137 137
138 void Shutdown(); 138 void Shutdown();
139 139
140 // Sets the memory limit on each stream. |memory_limit| is the
141 // maximum number of bytes each stream is allowed to hold in its buffer.
140 void SetMemoryLimitsForTesting(int memory_limit); 142 void SetMemoryLimitsForTesting(int memory_limit);
141 143
142 // Returns the ranges representing the buffered data in the demuxer. 144 // Returns the ranges representing the buffered data in the demuxer.
143 // TODO(wolenetz): Remove this method once MediaSourceDelegate no longer 145 // TODO(wolenetz): Remove this method once MediaSourceDelegate no longer
144 // requires it for doing hack browser seeks to I-frame on Android. See 146 // requires it for doing hack browser seeks to I-frame on Android. See
145 // http://crbug.com/304234. 147 // http://crbug.com/304234.
146 Ranges<base::TimeDelta> GetBufferedRanges() const; 148 Ranges<base::TimeDelta> GetBufferedRanges() const;
147 149
148 private: 150 private:
149 enum State { 151 enum State {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 213
212 // Aborts pending reads on all DemuxerStreams. 214 // Aborts pending reads on all DemuxerStreams.
213 void AbortPendingReads(); 215 void AbortPendingReads();
214 216
215 // Completes any pending reads if it is possible to do so. 217 // Completes any pending reads if it is possible to do so.
216 void CompletePendingReadsIfPossible(); 218 void CompletePendingReadsIfPossible();
217 219
218 // Seeks all SourceBufferStreams to |seek_time|. 220 // Seeks all SourceBufferStreams to |seek_time|.
219 void SeekAllSources(base::TimeDelta seek_time); 221 void SeekAllSources(base::TimeDelta seek_time);
220 222
223 // Shuts down all DemuxerStreams by calling Shutdown() on
224 // all objects in |source_state_map_|.
225 void ShutdownAllStreams();
226
221 mutable base::Lock lock_; 227 mutable base::Lock lock_;
222 State state_; 228 State state_;
223 bool cancel_next_seek_; 229 bool cancel_next_seek_;
224 230
225 DemuxerHost* host_; 231 DemuxerHost* host_;
226 base::Closure open_cb_; 232 base::Closure open_cb_;
227 NeedKeyCB need_key_cb_; 233 NeedKeyCB need_key_cb_;
228 bool enable_text_; 234 bool enable_text_;
229 // Callback used to report error strings that can help the web developer 235 // Callback used to report error strings that can help the web developer
230 // figure out what is wrong with the content. 236 // figure out what is wrong with the content.
(...skipping 29 matching lines...) Expand all
260 // removed with RemoveID() but can not be re-added (yet). 266 // removed with RemoveID() but can not be re-added (yet).
261 std::string source_id_audio_; 267 std::string source_id_audio_;
262 std::string source_id_video_; 268 std::string source_id_video_;
263 269
264 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 270 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
265 }; 271 };
266 272
267 } // namespace media 273 } // namespace media
268 274
269 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 275 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698