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

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

Issue 1727243002: Unify media track info reporting on a demuxer level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tracks-impl-in-media
Patch Set: rebase Created 4 years, 9 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // Registers a new |id| to use for AppendData() calls. |type| indicates 214 // Registers a new |id| to use for AppendData() calls. |type| indicates
215 // the MIME type for the data that we intend to append for this ID. 215 // the MIME type for the data that we intend to append for this ID.
216 // kOk is returned if the demuxer has enough resources to support another ID 216 // kOk is returned if the demuxer has enough resources to support another ID
217 // and supports the format indicated by |type|. 217 // and supports the format indicated by |type|.
218 // kNotSupported is returned if |type| is not a supported format. 218 // kNotSupported is returned if |type| is not a supported format.
219 // kReachedIdLimit is returned if the demuxer cannot handle another ID right 219 // kReachedIdLimit is returned if the demuxer cannot handle another ID right
220 // now. 220 // now.
221 Status AddId(const std::string& id, const std::string& type, 221 Status AddId(const std::string& id, const std::string& type,
222 std::vector<std::string>& codecs); 222 std::vector<std::string>& codecs);
223 223
224 // Notifies a caller via |tracks_updated_cb| that the set of media tracks
225 // for a given |id| has changed.
226 void SetTracksWatcher(const std::string& id,
227 const MediaTracksUpdatedCB& tracks_updated_cb);
228
224 // Removed an ID & associated resources that were previously added with 229 // Removed an ID & associated resources that were previously added with
225 // AddId(). 230 // AddId().
226 void RemoveId(const std::string& id); 231 void RemoveId(const std::string& id);
227 232
228 // Gets the currently buffered ranges for the specified ID. 233 // Gets the currently buffered ranges for the specified ID.
229 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const; 234 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const;
230 235
231 // Appends media data to the source buffer associated with |id|, applying 236 // Appends media data to the source buffer associated with |id|, applying
232 // and possibly updating |*timestamp_offset| during coded frame processing. 237 // and possibly updating |*timestamp_offset| during coded frame processing.
233 // |append_window_start| and |append_window_end| correspond to the MSE spec's 238 // |append_window_start| and |append_window_end| correspond to the MSE spec's
234 // similarly named source buffer attributes that are used in coded frame 239 // similarly named source buffer attributes that are used in coded frame
235 // processing. 240 // processing.
236 // |init_segment_received_cb| is run for each newly successfully parsed 241 void AppendData(const std::string& id,
237 // initialization segment. 242 const uint8_t* data,
238 void AppendData( 243 size_t length,
239 const std::string& id, 244 base::TimeDelta append_window_start,
240 const uint8_t* data, 245 base::TimeDelta append_window_end,
241 size_t length, 246 base::TimeDelta* timestamp_offset);
242 base::TimeDelta append_window_start,
243 base::TimeDelta append_window_end,
244 base::TimeDelta* timestamp_offset,
245 const MediaSourceState::InitSegmentReceivedCB& init_segment_received_cb);
246 247
247 // Aborts parsing the current segment and reset the parser to a state where 248 // Aborts parsing the current segment and reset the parser to a state where
248 // it can accept a new segment. 249 // it can accept a new segment.
249 // Some pending frames can be emitted during that process. These frames are 250 // Some pending frames can be emitted during that process. These frames are
250 // applied |timestamp_offset|. 251 // applied |timestamp_offset|.
251 void ResetParserState(const std::string& id, 252 void ResetParserState(const std::string& id,
252 base::TimeDelta append_window_start, 253 base::TimeDelta append_window_start,
253 base::TimeDelta append_window_end, 254 base::TimeDelta append_window_end,
254 base::TimeDelta* timestamp_offset); 255 base::TimeDelta* timestamp_offset);
255 256
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 422
422 // Indicates that splice frame generation is enabled. 423 // Indicates that splice frame generation is enabled.
423 const bool splice_frames_enabled_; 424 const bool splice_frames_enabled_;
424 425
425 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 426 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
426 }; 427 };
427 428
428 } // namespace media 429 } // namespace media
429 430
430 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 431 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698