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

Unified Diff: media/filters/chunk_demuxer.h

Issue 791723003: Use of the playback time in the MSE garbage collection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index 6e8bdf95c7cde7cd6e767cf9c7b862f0ec0ec1fc..2c6bf8420414dba90131dcd973ec5cbf96103def 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -89,6 +89,9 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
bool SupportsConfigChanges() override;
VideoRotation video_rotation() override;
+ // Update the media time used by the MSE garbage collection algorithm.
+ void NotifyMediaTimeUpdate(DecodeTimestamp time);
+
// Returns the text track configuration. It is an error to call this method
// if type() != TEXT.
TextTrackConfig text_track_config();
@@ -163,6 +166,11 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
bool splice_frames_enabled);
~ChunkDemuxer() override;
+ // Set the media time provider.
+ // TODO(damienv): should truly be part of the constructor.
+ void SetMediaTimeProvider(
+ const base::Callback<base::TimeDelta(void)>& get_media_time_cb);
+
// Demuxer implementation.
void Initialize(DemuxerHost* host,
const PipelineStatusCB& cb,
@@ -376,6 +384,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
scoped_ptr<ChunkDemuxerStream> audio_;
scoped_ptr<ChunkDemuxerStream> video_;
+ base::Callback<base::TimeDelta(void)> get_media_time_cb_;
+
base::TimeDelta duration_;
// The duration passed to the last SetDuration(). If
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698