Bug 1316211. P11 - remove empty functions. r=gerald
authorJW Wang <jwwang@mozilla.com>
Wed, 19 Jul 2017 15:15:14 +0800
changeset 418810 60909f8e1e75cdbb99da51cc93eedf724a0b0f40
parent 418809 670f1c2a21307f3808e8bd27a9a3bf639f402a05
child 418811 a56cdce8ca54d7f54ed06d343d954949e8285070
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1316211
milestone56.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 1316211. P11 - remove empty functions. r=gerald MozReview-Commit-ID: 44blKyrVzLV
dom/media/MediaDecoderReader.cpp
dom/media/MediaDecoderReader.h
dom/media/MediaFormatReader.cpp
dom/media/webaudio/MediaBufferDecoder.cpp
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -66,21 +66,16 @@ MediaDecoderReader::~MediaDecoderReader(
 void
 MediaDecoderReader::UpdateDuration(const media::TimeUnit& aDuration)
 {
   MOZ_ASSERT(OnTaskQueue());
   mDuration = Some(aDuration);
   UpdateBuffered();
 }
 
-nsresult MediaDecoderReader::ResetDecode(TrackSet aTracks)
-{
-  return NS_OK;
-}
-
 RefPtr<ShutdownPromise>
 MediaDecoderReader::Shutdown()
 {
   MOZ_ASSERT(OnTaskQueue());
   mShutdown = true;
 
   ReleaseResources();
   mBuffered.DisconnectAll();
--- a/dom/media/MediaDecoderReader.h
+++ b/dom/media/MediaDecoderReader.h
@@ -144,17 +144,17 @@ public:
   // made after this should be processed as usual.
   //
   // Normally this call preceedes a Seek() call, or shutdown.
   //
   // aParam is a set of TrackInfo::TrackType enums specifying which
   // queues need to be reset, defaulting to both audio and video tracks.
   virtual nsresult ResetDecode(
     TrackSet aTracks = TrackSet(TrackInfo::kAudioTrack,
-                                TrackInfo::kVideoTrack));
+                                TrackInfo::kVideoTrack)) = 0;
 
   // Requests one audio sample from the reader.
   //
   // The decode should be performed asynchronously, and the promise should
   // be resolved when it is complete.
   virtual RefPtr<AudioDataPromise> RequestAudioData() = 0;
 
   // Requests one video sample from the reader.
@@ -177,23 +177,16 @@ public:
   // ReadUpdatedMetadata will always be called once ReadMetadata has succeeded.
   virtual void ReadUpdatedMetadata(MediaInfo* aInfo) = 0;
 
   // Moves the decode head to aTime microseconds.
   virtual RefPtr<SeekPromise> Seek(const SeekTarget& aTarget) = 0;
 
   virtual void SetCDMProxy(CDMProxy* aProxy) = 0;
 
-  // Tell the reader that the data decoded are not for direct playback, so it
-  // can accept more files, in particular those which have more channels than
-  // available in the audio output.
-  void SetIgnoreAudioOutputFormat()
-  {
-  }
-
   // The MediaDecoderStateMachine uses various heuristics that assume that
   // raw media data is arriving sequentially from a network channel. This
   // makes sense in the <video src="foo"> case, but not for more advanced use
   // cases like MSE.
   virtual bool UseBufferingHeuristics() const = 0;
 
   virtual size_t SizeOfVideoQueueInFrames() = 0;
   virtual size_t SizeOfAudioQueueInFrames() = 0;
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -2475,17 +2475,17 @@ MediaFormatReader::ResetDecode(TrackSet 
     mAudio.ResetDemuxer();
     mVideo.mFirstFrameTime = Some(media::TimeUnit::Zero());
     Reset(TrackInfo::kAudioTrack);
     if (mAudio.HasPromise()) {
       mAudio.RejectPromise(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
     }
   }
 
-  return MediaDecoderReader::ResetDecode(aTracks);
+  return NS_OK;
 }
 
 void
 MediaFormatReader::Reset(TrackType aTrack)
 {
   MOZ_ASSERT(OnTaskQueue());
   LOG("Reset(%s) BEGIN", TrackTypeToStr(aTrack));
 
--- a/dom/media/webaudio/MediaBufferDecoder.cpp
+++ b/dom/media/webaudio/MediaBufferDecoder.cpp
@@ -237,21 +237,16 @@ private:
 
 void
 MediaDecodeTask::Decode()
 {
   MOZ_ASSERT(!NS_IsMainThread());
 
   mBufferDecoder->BeginDecoding(mDecoderReader->OwnerThread());
 
-  // Tell the decoder reader that we are not going to play the data directly,
-  // and that we should not reject files with more channels than the audio
-  // backend support.
-  mDecoderReader->SetIgnoreAudioOutputFormat();
-
   mDecoderReader->AsyncReadMetadata()->Then(mDecoderReader->OwnerThread(), __func__, this,
                                        &MediaDecodeTask::OnMetadataRead,
                                        &MediaDecodeTask::OnMetadataNotRead);
 }
 
 void
 MediaDecodeTask::OnMetadataRead(MetadataHolder&& aMetadata)
 {