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

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

Issue 2102323002: MSE: Experimental support for new abort and duration behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « media/blink/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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Returns false iff buffer is still full after running eviction. 68 // Returns false iff buffer is still full after running eviction.
69 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction 69 // https://w3c.github.io/media-source/#sourcebuffer-coded-frame-eviction
70 bool EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize); 70 bool EvictCodedFrames(DecodeTimestamp media_time, size_t newDataSize);
71 71
72 // Signal to the stream that duration has changed to |duration|. 72 // Signal to the stream that duration has changed to |duration|.
73 void OnSetDuration(base::TimeDelta duration); 73 void OnSetDuration(base::TimeDelta duration);
74 74
75 // Returns the range of buffered data in this stream, capped at |duration|. 75 // Returns the range of buffered data in this stream, capped at |duration|.
76 Ranges<base::TimeDelta> GetBufferedRanges(base::TimeDelta duration) const; 76 Ranges<base::TimeDelta> GetBufferedRanges(base::TimeDelta duration) const;
77 77
78 // Returns the highest PTS of the buffered data.
79 // Returns base::TimeDelta() if the stream has no buffered data.
80 base::TimeDelta GetHighestPresentationTimestamp() const;
81
78 // Returns the duration of the buffered data. 82 // Returns the duration of the buffered data.
79 // Returns base::TimeDelta() if the stream has no buffered data. 83 // Returns base::TimeDelta() if the stream has no buffered data.
80 base::TimeDelta GetBufferedDuration() const; 84 base::TimeDelta GetBufferedDuration() const;
81 85
82 // Returns the size of the buffered data in bytes. 86 // Returns the size of the buffered data in bytes.
83 size_t GetBufferedSize() const; 87 size_t GetBufferedSize() const;
84 88
85 // Signal to the stream that buffers handed in through subsequent calls to 89 // Signal to the stream that buffers handed in through subsequent calls to
86 // Append() belong to a coded frame group that starts at |start_timestamp|. 90 // Append() belong to a coded frame group that starts at |start_timestamp|.
87 void OnStartOfCodedFrameGroup(DecodeTimestamp start_timestamp); 91 void OnStartOfCodedFrameGroup(DecodeTimestamp start_timestamp);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void SetTracksWatcher(const std::string& id, 219 void SetTracksWatcher(const std::string& id,
216 const MediaTracksUpdatedCB& tracks_updated_cb); 220 const MediaTracksUpdatedCB& tracks_updated_cb);
217 221
218 // Removed an ID & associated resources that were previously added with 222 // Removed an ID & associated resources that were previously added with
219 // AddId(). 223 // AddId().
220 void RemoveId(const std::string& id); 224 void RemoveId(const std::string& id);
221 225
222 // Gets the currently buffered ranges for the specified ID. 226 // Gets the currently buffered ranges for the specified ID.
223 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const; 227 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const;
224 228
229 // Gets the highest buffered PTS for the specified |id|. If there is nothing
230 // buffered, returns base::TimeDelta().
231 base::TimeDelta GetHighestPresentationTimestamp(const std::string& id) const;
232
225 // Appends media data to the source buffer associated with |id|, applying 233 // Appends media data to the source buffer associated with |id|, applying
226 // and possibly updating |*timestamp_offset| during coded frame processing. 234 // and possibly updating |*timestamp_offset| during coded frame processing.
227 // |append_window_start| and |append_window_end| correspond to the MSE spec's 235 // |append_window_start| and |append_window_end| correspond to the MSE spec's
228 // similarly named source buffer attributes that are used in coded frame 236 // similarly named source buffer attributes that are used in coded frame
229 // processing. Returns true on success, false if the caller needs to run the 237 // processing. Returns true on success, false if the caller needs to run the
230 // append error algorithm with decode error parameter set to true. 238 // append error algorithm with decode error parameter set to true.
231 bool AppendData(const std::string& id, 239 bool AppendData(const std::string& id,
232 const uint8_t* data, 240 const uint8_t* data,
233 size_t length, 241 size_t length,
234 base::TimeDelta append_window_start, 242 base::TimeDelta append_window_start,
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 int detected_audio_track_count_; 432 int detected_audio_track_count_;
425 int detected_video_track_count_; 433 int detected_video_track_count_;
426 int detected_text_track_count_; 434 int detected_text_track_count_;
427 435
428 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 436 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
429 }; 437 };
430 438
431 } // namespace media 439 } // namespace media
432 440
433 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 441 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/blink/websourcebuffer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698