Bug 1261900: P3. Re-add MediaDataDemuxer::GetEvictionOffset() API. r=gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 22 Apr 2016 15:48:38 +1000
changeset 356313 e2bcc90143d2ea92947b6fbfbe3d1a2648b05871
parent 356312 99c70883427cbcf5f9c85bb3f267ad31bb5497c8
child 356314 de1d346e443bdcc06eb77a99a685ba5da80bdd7e
push id16492
push userbmo:jyavenard@mozilla.com
push dateTue, 26 Apr 2016 06:48:07 +0000
reviewersgerald
bugs1261900, 1204419
milestone49.0a1
Bug 1261900: P3. Re-add MediaDataDemuxer::GetEvictionOffset() API. r=gerald API was removed in bug 1204419. MozReview-Commit-ID: Hr9SgVsG0vl
dom/media/MediaDataDemuxer.h
--- a/dom/media/MediaDataDemuxer.h
+++ b/dom/media/MediaDataDemuxer.h
@@ -196,16 +196,23 @@ public:
 
   virtual TrackInfo::TrackType GetType() const
   {
     return GetInfo()->GetType();
   }
 
   virtual media::TimeIntervals GetBuffered() = 0;
 
+  // By default, it is assumed that the entire resource can be evicted once
+  // all samples have been demuxed.
+  virtual int64_t GetEvictionOffset(const media::TimeUnit& aTime)
+  {
+    return INT64_MAX;
+  }
+
   // If the MediaTrackDemuxer and MediaDataDemuxer hold cross references.
   // BreakCycles must be overridden.
   virtual void BreakCycles()
   {
   }
 
 protected:
   virtual ~MediaTrackDemuxer() {}