Bug 1314547. Part 2 - remove unused public functions. r=cpearce
authorJW Wang <jwwang@mozilla.com>
Wed, 02 Nov 2016 17:16:59 +0800
changeset 366614 6ff21ea6c47e3a05a7c942770b918841dc343e8b
parent 366613 5890b5a266b0f8087e69d57833f57b713e1c651c
child 366615 87b6987646642d3d998df229e423b466271ccd4d
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 1314547. Part 2 - remove unused public functions. r=cpearce MozReview-Commit-ID: 2PndXBXmwRv
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -777,17 +777,17 @@ MediaDecoder::MetadataLoaded(nsAutoPtr<M
   DECODER_LOG("MetadataLoaded, channels=%u rate=%u hasAudio=%d hasVideo=%d",
               aInfo->mAudio.mChannels, aInfo->mAudio.mRate,
               aInfo->HasAudio(), aInfo->HasVideo());
   mMediaSeekable = aInfo->mMediaSeekable;
-  SetMediaSeekableOnlyInBufferedRanges(aInfo->mMediaSeekableOnlyInBufferedRanges);
+  mMediaSeekableOnlyInBufferedRanges = aInfo->mMediaSeekableOnlyInBufferedRanges;
   mInfo = aInfo.forget();
   // Make sure the element and the frame (if any) are told about
   // our new size.
   if (aEventVisibility != MediaDecoderEventVisibility::Suppressed) {
     mFiredMetadataLoaded = true;
     mOwner->MetadataLoaded(mInfo, nsAutoPtr<const MetadataTags>(aTags.forget()));
@@ -1271,58 +1271,45 @@ MediaDecoder::UpdateEstimatedMediaDurati
   if (mEstimatedDuration.Ref().isSome() &&
       mozilla::Abs(mEstimatedDuration.Ref().ref().ToMicroseconds() - aDuration) < ESTIMATED_DURATION_FUZZ_FACTOR_USECS) {
   mEstimatedDuration = Some(TimeUnit::FromMicroseconds(aDuration));
-MediaDecoder::SetMediaSeekableOnlyInBufferedRanges(bool aMediaSeekableOnlyInBufferedRanges){
-  MOZ_ASSERT(NS_IsMainThread());
-  mMediaSeekableOnlyInBufferedRanges = aMediaSeekableOnlyInBufferedRanges;
   return GetResource()->IsTransportSeekable();
   NS_ENSURE_TRUE(GetStateMachine(), false);
   return mMediaSeekable;
-  MOZ_ASSERT(NS_IsMainThread());
-  return mMediaSeekableOnlyInBufferedRanges;
   if (IsNaN(GetDuration())) {
     // We do not have a duration yet, we can't determine the seekable range.
     return TimeIntervals();
   // We can seek in buffered range if the media is seekable. Also, we can seek
   // in unbuffered ranges if the transport level is seekable (local file or the
   // server supports range requests, etc.) or in cue-less WebMs
-  if (IsMediaSeekableOnlyInBufferedRanges()) {
+  if (mMediaSeekableOnlyInBufferedRanges) {
     return GetBuffered();
   } else if (!IsMediaSeekable()) {
     return media::TimeIntervals();
   } else if (!IsTransportSeekable()) {
     return GetBuffered();
   } else {
     return media::TimeIntervals(
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -246,25 +246,19 @@ protected:
   // instability is expected; if the incoming duration is not significantly
   // different from the existing duration, the change request is ignored.
   // If the incoming duration is significantly different, the duration is
   // changed, this causes a durationchanged event to fire to the media
   // element.
   void UpdateEstimatedMediaDuration(int64_t aDuration) override;
-  // Set a flag indicating whether seeking is supported only in buffered ranges
-  void SetMediaSeekableOnlyInBufferedRanges(bool aMediaSeekableOnlyInBufferedRanges);
   // Returns true if this media supports random seeking. False for example with
   // chained ogg files.
   bool IsMediaSeekable();
-  // Returns true if this media supports seeking only in buffered ranges. True
-  // for example in WebMs with no cues
-  bool IsMediaSeekableOnlyInBufferedRanges();
   // Returns true if seeking is supported on a transport level (e.g. the server
   // supports range requests, we are playing a file, etc.).
   bool IsTransportSeekable();
   // Return the time ranges that can be seeked into.
   virtual media::TimeIntervals GetSeekable();
   // Set the end time of the media resource. When playback reaches
@@ -763,17 +757,18 @@ protected:
   Canonical<bool> mPlaybackRateReliable;
   // Current decoding position in the stream. This is where the decoder
   // is up to consuming the stream. This is not adjusted during decoder
   // seek operations, but it's updated at the end when we start playing
   // back again.
   Canonical<int64_t> mDecoderPosition;
-  // True if the media is only seekable within its buffered ranges.
+  // True if the media is only seekable within its buffered ranges
+  // like WebMs with no cues.
   Canonical<bool> mMediaSeekableOnlyInBufferedRanges;
   // True if the decoder is visible.
   Canonical<bool> mIsVisible;
   AbstractCanonical<media::NullableTimeUnit>* CanonicalDurationOrNull() override;
   AbstractCanonical<double>* CanonicalVolume() {