Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 14 Sep 2015 18:06:00 +1000
changeset 295354 d4e39e6d93ebf32ca05555577c2805c21c7f4e42
parent 295353 a6291c14c06d756591d6127448def033de5a5eee
child 295355 fc94443249c0129494ec3f8b1b7a9dc83966e31c
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1204419
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce
dom/media/MP3Demuxer.cpp
dom/media/MP3Demuxer.h
dom/media/MediaDataDemuxer.h
dom/media/fmp4/MP4Demuxer.cpp
dom/media/fmp4/MP4Demuxer.h
dom/media/mediasource/MediaSourceDemuxer.cpp
dom/media/mediasource/MediaSourceDemuxer.h
dom/media/webm/WebMDemuxer.cpp
dom/media/webm/WebMDemuxer.h
--- a/dom/media/MP3Demuxer.cpp
+++ b/dom/media/MP3Demuxer.cpp
@@ -334,21 +334,16 @@ TimeIntervals
 MP3TrackDemuxer::GetBuffered() {
   // TODO: bug 1169485.
   MP3DEMUXER_LOG("MP3TrackDemuxer::GetBuffered()");
   NS_WARNING("Unimplemented function GetBuffered");
   return TimeIntervals();
 }
 
 int64_t
-MP3TrackDemuxer::GetEvictionOffset(TimeUnit aTime) {
-  return 0;
-}
-
-int64_t
 MP3TrackDemuxer::StreamLength() const {
   return mSource.GetLength();
 }
 
 TimeUnit
 MP3TrackDemuxer::Duration() const {
   if (!mNumParsedFrames) {
     return TimeUnit::FromMicroseconds(-1);
--- a/dom/media/MP3Demuxer.h
+++ b/dom/media/MP3Demuxer.h
@@ -350,17 +350,16 @@ public:
   UniquePtr<TrackInfo> GetInfo() const override;
   nsRefPtr<SeekPromise> Seek(media::TimeUnit aTime) override;
   nsRefPtr<SamplesPromise> GetSamples(int32_t aNumSamples = 1) override;
   void Reset() override;
   nsRefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(
     media::TimeUnit aTimeThreshold) override;
   int64_t GetResourceOffset() const override;
   media::TimeIntervals GetBuffered() override;
-  int64_t GetEvictionOffset(media::TimeUnit aTime) override;
 
 private:
   // Destructor.
   ~MP3TrackDemuxer() {}
 
   // Fast approximate seeking to given time.
   media::TimeUnit FastSeek(media::TimeUnit aTime);
 
--- a/dom/media/MediaDataDemuxer.h
+++ b/dom/media/MediaDataDemuxer.h
@@ -202,18 +202,16 @@ public:
 
   virtual TrackInfo::TrackType GetType() const
   {
     return GetInfo()->GetType();
   }
 
   virtual media::TimeIntervals GetBuffered() = 0;
 
-  virtual int64_t GetEvictionOffset(media::TimeUnit aTime) = 0;
-
   // If the MediaTrackDemuxer and MediaDataDemuxer hold cross references.
   // BreakCycles must be overridden.
   virtual void BreakCycles()
   {
   }
 
 protected:
   virtual ~MediaTrackDemuxer() {}
--- a/dom/media/fmp4/MP4Demuxer.cpp
+++ b/dom/media/fmp4/MP4Demuxer.cpp
@@ -377,25 +377,16 @@ MP4TrackDemuxer::SkipToNextRandomAccessP
   if (found) {
     return SkipAccessPointPromise::CreateAndResolve(parsed, __func__);
   } else {
     SkipFailureHolder failure(DemuxerFailureReason::END_OF_STREAM, parsed);
     return SkipAccessPointPromise::CreateAndReject(Move(failure), __func__);
   }
 }
 
-int64_t
-MP4TrackDemuxer::GetEvictionOffset(media::TimeUnit aTime)
-{
-  EnsureUpToDateIndex();
-  MonitorAutoLock mon(mMonitor);
-  uint64_t offset = mIndex->GetEvictionOffset(aTime.ToMicroseconds());
-  return int64_t(offset == std::numeric_limits<uint64_t>::max() ? 0 : offset);
-}
-
 media::TimeIntervals
 MP4TrackDemuxer::GetBuffered()
 {
   EnsureUpToDateIndex();
   AutoPinned<MediaResource> resource(mParent->mResource);
   nsTArray<MediaByteRange> byteRanges;
   nsresult rv = resource->GetCachedRanges(byteRanges);
 
--- a/dom/media/fmp4/MP4Demuxer.h
+++ b/dom/media/fmp4/MP4Demuxer.h
@@ -72,18 +72,16 @@ public:
   virtual void Reset() override;
 
   virtual nsresult GetNextRandomAccessPoint(media::TimeUnit* aTime) override;
 
   nsRefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold) override;
 
   virtual media::TimeIntervals GetBuffered() override;
 
-  virtual int64_t GetEvictionOffset(media::TimeUnit aTime) override;
-
   virtual void BreakCycles() override;
 
 private:
   friend class MP4Demuxer;
   void NotifyDataArrived();
   void UpdateSamples(nsTArray<nsRefPtr<MediaRawData>>& aSamples);
   void EnsureUpToDateIndex();
   void SetNextKeyFrameTime();
--- a/dom/media/mediasource/MediaSourceDemuxer.cpp
+++ b/dom/media/mediasource/MediaSourceDemuxer.cpp
@@ -312,23 +312,16 @@ MediaSourceTrackDemuxer::GetNextRandomAc
 nsRefPtr<MediaSourceTrackDemuxer::SkipAccessPointPromise>
 MediaSourceTrackDemuxer::SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold)
 {
   return InvokeAsync(mParent->GetTaskQueue(), this, __func__,
                      &MediaSourceTrackDemuxer::DoSkipToNextRandomAccessPoint,
                      aTimeThreshold);
 }
 
-int64_t
-MediaSourceTrackDemuxer::GetEvictionOffset(media::TimeUnit aTime)
-{
-  // Unused.
-  return 0;
-}
-
 media::TimeIntervals
 MediaSourceTrackDemuxer::GetBuffered()
 {
   return mManager->Buffered();
 }
 
 void
 MediaSourceTrackDemuxer::BreakCycles()
--- a/dom/media/mediasource/MediaSourceDemuxer.h
+++ b/dom/media/mediasource/MediaSourceDemuxer.h
@@ -102,18 +102,16 @@ public:
   void Reset() override;
 
   nsresult GetNextRandomAccessPoint(media::TimeUnit* aTime) override;
 
   nsRefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold) override;
 
   media::TimeIntervals GetBuffered() override;
 
-  int64_t GetEvictionOffset(media::TimeUnit aTime) override;
-
   void BreakCycles() override;
 
   bool GetSamplesMayBlock() const override
   {
     return false;
   }
 
 private:
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -993,27 +993,16 @@ WebMTrackDemuxer::SkipToNextRandomAccess
                parsed);
     return SkipAccessPointPromise::CreateAndResolve(parsed, __func__);
   } else {
     SkipFailureHolder failure(DemuxerFailureReason::END_OF_STREAM, parsed);
     return SkipAccessPointPromise::CreateAndReject(Move(failure), __func__);
   }
 }
 
-int64_t
-WebMTrackDemuxer::GetEvictionOffset(media::TimeUnit aTime)
-{
-  int64_t offset;
-  if (!mParent->GetOffsetForTime(aTime.ToNanoseconds(), &offset)) {
-    return 0;
-  }
-
-  return offset;
-}
-
 media::TimeIntervals
 WebMTrackDemuxer::GetBuffered()
 {
   return mParent->GetBuffered();
 }
 
 void
 WebMTrackDemuxer::BreakCycles()
--- a/dom/media/webm/WebMDemuxer.h
+++ b/dom/media/webm/WebMDemuxer.h
@@ -212,18 +212,16 @@ public:
   void Reset() override;
 
   nsresult GetNextRandomAccessPoint(media::TimeUnit* aTime) override;
 
   nsRefPtr<SkipAccessPointPromise> SkipToNextRandomAccessPoint(media::TimeUnit aTimeThreshold) override;
 
   media::TimeIntervals GetBuffered() override;
 
-  int64_t GetEvictionOffset(media::TimeUnit aTime) override;
-
   void BreakCycles() override;
 
 private:
   friend class WebMDemuxer;
   ~WebMTrackDemuxer();
   void UpdateSamples(nsTArray<nsRefPtr<MediaRawData>>& aSamples);
   void SetNextKeyFrameTime();
   nsRefPtr<MediaRawData> NextSample ();