Bug 1487057 - Part 2 - Remove RegisterForAudioMixing/NeedsMixing, they are unused. r=pehrsons
authorPaul Adenot <paul@paul.cx>
Wed, 29 Aug 2018 15:29:08 +0200
changeset 496733 7e6e230af6980d38db68c814c840a090bb5a354a
parent 496732 efd0c87b160b7b2549890fe3d0b30a63fc2c6bc8
child 496734 2ff222ff2a723fc90210e9bd84968333c0fa5f86
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1487057
milestone64.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 1487057 - Part 2 - Remove RegisterForAudioMixing/NeedsMixing, they are unused. r=pehrsons Differential Revision: https://phabricator.services.mozilla.com/D5436
dom/media/MediaStreamGraph.cpp
dom/media/MediaStreamGraph.h
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2829,17 +2829,16 @@ MediaStream::AddMainThreadListener(MainT
 }
 
 SourceMediaStream::SourceMediaStream()
   : MediaStream()
   , mMutex("mozilla::media::SourceMediaStream")
   , mUpdateKnownTracksTime(0)
   , mPullEnabled(false)
   , mFinishPending(false)
-  , mNeedsMixing(false)
 {
 }
 
 nsresult
 SourceMediaStream::OpenAudioInput(CubebUtils::AudioDeviceID aID,
                                   AudioDataListener *aListener)
 {
   MOZ_ASSERT(GraphImpl());
@@ -3423,30 +3422,16 @@ SourceMediaStream::RemoveAllDirectListen
   }
   mDirectTrackListeners.Clear();
 }
 
 SourceMediaStream::~SourceMediaStream()
 {
 }
 
-void
-SourceMediaStream::RegisterForAudioMixing()
-{
-  MutexAutoLock lock(mMutex);
-  mNeedsMixing = true;
-}
-
-bool
-SourceMediaStream::NeedsMixing()
-{
-  MutexAutoLock lock(mMutex);
-  return mNeedsMixing;
-}
-
 bool
 SourceMediaStream::HasPendingAudioTrack()
 {
   MutexAutoLock lock(mMutex);
   bool audioTrackPresent = false;
 
   for (auto& data : mPendingTracks) {
     if (data.mData->GetType() == MediaSegment::AUDIO) {
--- a/dom/media/MediaStreamGraph.h
+++ b/dom/media/MediaStreamGraph.h
@@ -825,18 +825,16 @@ public:
   void RemoveAllDirectListenersImpl() override;
 
   /**
    * End all tracks and Finish() this stream.  Used to voluntarily revoke access
    * to a LocalMediaStream.
    */
   void EndAllTrackAndFinish();
 
-  void RegisterForAudioMixing();
-
   /**
    * Returns true if this SourceMediaStream contains at least one audio track
    * that is in pending state.
    * This is thread safe, and takes the SourceMediaStream mutex.
    */
   bool HasPendingAudioTrack();
 
   TimeStamp GetStreamTracksStrartTimeStamp()
@@ -933,17 +931,16 @@ protected:
   // |AddStreamGraphThread| and |AdvanceTimeVaryingValuesToCurrentTime| in
   // particularly.
   TimeStamp mStreamTracksStartTimeStamp;
   nsTArray<TrackData> mUpdateTracks;
   nsTArray<TrackData> mPendingTracks;
   nsTArray<TrackBound<DirectMediaStreamTrackListener>> mDirectTrackListeners;
   bool mPullEnabled;
   bool mFinishPending;
-  bool mNeedsMixing;
 };
 
 /**
  * The blocking mode decides how a track should be blocked in a MediaInputPort.
  */
 enum class BlockingMode
 {
   /**
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -730,19 +730,16 @@ MediaEngineWebRTCMicrophoneSource::SetTr
   AudioSegment* segment = new AudioSegment();
 
   aStream->AddAudioTrack(aTrackID,
                          aStream->GraphRate(),
                          0,
                          segment,
                          SourceMediaStream::ADDTRACK_QUEUED);
 
-  // XXX Make this based on the pref.
-  aStream->RegisterForAudioMixing();
-
   LOG(("Stream %p registered for microphone capture", aStream.get()));
   return NS_OK;
 }
 
 nsresult
 MediaEngineWebRTCMicrophoneSource::Start(const RefPtr<const AllocationHandle>& aHandle)
 {
   AssertIsOnOwningThread();