Backed out changeset 45bfebd36a99 (bug 1274221)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 09 Jun 2016 15:18:36 +0200
changeset 301286 29257a0f6e042060f35a1ec73078480954a7ae23
parent 301285 ccfe094e3fdc392f19dcff0c2616b367b6ac1b85
child 301287 0a4e814ce3cf9590644bb2d1abc33b4a0274145f
push id78275
push usercbook@mozilla.com
push dateThu, 09 Jun 2016 13:19:23 +0000
treeherdermozilla-inbound@df403befe9fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1274221
milestone50.0a1
backs out45bfebd36a99baef6bee50e52ac9c78965a7f1c2
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
Backed out changeset 45bfebd36a99 (bug 1274221)
dom/media/MediaStreamGraph.cpp
dom/media/MediaStreamGraph.h
dom/media/TrackUnionStream.cpp
dom/media/TrackUnionStream.h
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2375,41 +2375,16 @@ MediaStream::Resume()
 }
 
 void
 MediaStream::AddListenerImpl(already_AddRefed<MediaStreamListener> aListener)
 {
   MediaStreamListener* listener = *mListeners.AppendElement() = aListener;
   listener->NotifyBlockingChanged(GraphImpl(),
     mNotifiedBlocked ? MediaStreamListener::BLOCKED : MediaStreamListener::UNBLOCKED);
-
-  for (StreamTracks::TrackIter it(mTracks); !it.IsEnded(); it.Next()) {
-    MediaStream* inputStream = nullptr;
-    TrackID inputTrackID = TRACK_INVALID;
-    if (ProcessedMediaStream* ps = AsProcessedStream()) {
-      // The only ProcessedMediaStream where we should have listeners is
-      // TrackUnionStream - it's what's used as owned stream in DOMMediaStream,
-      // the only main-thread exposed stream type.
-      // TrackUnionStream guarantees that each of its tracks has an input track.
-      // Other types do not implement GetInputStreamFor() and will return null.
-      inputStream = ps->GetInputStreamFor(it->GetID());
-      MOZ_ASSERT(inputStream);
-      inputTrackID = ps->GetInputTrackIDFor(it->GetID());
-      MOZ_ASSERT(IsTrackIDExplicit(inputTrackID));
-    }
-
-    uint32_t flags = MediaStreamListener::TRACK_EVENT_CREATED;
-    if (it->IsEnded()) {
-      flags |= MediaStreamListener::TRACK_EVENT_ENDED;
-    }
-    nsAutoPtr<MediaSegment> segment(it->GetSegment()->CreateEmptyClone());
-    listener->NotifyQueuedTrackChanges(Graph(), it->GetID(), it->GetEnd(),
-                                       flags, *segment,
-                                       inputStream, inputTrackID);
-  }
   if (mNotifiedFinished) {
     listener->NotifyEvent(GraphImpl(), MediaStreamListener::EVENT_FINISHED);
   }
   if (mNotifiedHasCurrentData) {
     listener->NotifyHasCurrentData(GraphImpl());
   }
 }
 
--- a/dom/media/MediaStreamGraph.h
+++ b/dom/media/MediaStreamGraph.h
@@ -1434,18 +1434,16 @@ public:
   bool HasInputPort(MediaInputPort* aPort)
   {
     return mInputs.Contains(aPort);
   }
   uint32_t InputPortCount()
   {
     return mInputs.Length();
   }
-  virtual MediaStream* GetInputStreamFor(TrackID aTrackID) { return nullptr; }
-  virtual TrackID GetInputTrackIDFor(TrackID aTrackID) { return TRACK_NONE; }
   void DestroyImpl() override;
   /**
    * This gets called after we've computed the blocking states for all
    * streams (mBlocked is up to date up to mStateComputedTime).
    * Also, we've produced output for all streams up to this one. If this stream
    * is not in a cycle, then all its source streams have produced data.
    * Generate output from aFrom to aTo.
    * This will be called on streams that have finished. Most stream types should
--- a/dom/media/TrackUnionStream.cpp
+++ b/dom/media/TrackUnionStream.cpp
@@ -369,40 +369,16 @@ TrackUnionStream::SetTrackEnabledImpl(Tr
           listener->IncreaseDisabled();
         }
       }
     }
   }
   MediaStream::SetTrackEnabledImpl(aTrackID, aEnabled);
 }
 
-MediaStream*
-TrackUnionStream::GetInputStreamFor(TrackID aTrackID)
-{
-  for (TrackMapEntry& entry : mTrackMap) {
-    if (entry.mOutputTrackID == aTrackID && entry.mInputPort) {
-      return entry.mInputPort->GetSource();
-    }
-  }
-
-  return nullptr;
-}
-
-TrackID
-TrackUnionStream::GetInputTrackIDFor(TrackID aTrackID)
-{
-  for (TrackMapEntry& entry : mTrackMap) {
-    if (entry.mOutputTrackID == aTrackID) {
-      return entry.mInputTrackID;
-    }
-  }
-
-  return TRACK_NONE;
-}
-
 void
 TrackUnionStream::AddDirectTrackListenerImpl(already_AddRefed<MediaStreamTrackDirectListener> aListener,
                                              TrackID aTrackID)
 {
   RefPtr<MediaStreamTrackDirectListener> listener = aListener;
 
   for (TrackMapEntry& entry : mTrackMap) {
     if (entry.mOutputTrackID == aTrackID) {
--- a/dom/media/TrackUnionStream.h
+++ b/dom/media/TrackUnionStream.h
@@ -18,19 +18,16 @@ class TrackUnionStream : public Processe
 public:
   explicit TrackUnionStream(DOMMediaStream* aWrapper);
 
   void RemoveInput(MediaInputPort* aPort) override;
   void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) override;
 
   void SetTrackEnabledImpl(TrackID aTrackID, bool aEnabled) override;
 
-  MediaStream* GetInputStreamFor(TrackID aTrackID) override;
-  TrackID GetInputTrackIDFor(TrackID aTrackID) override;
-
 protected:
   // Only non-ended tracks are allowed to persist in this map.
   struct TrackMapEntry {
     // mEndOfConsumedInputTicks is the end of the input ticks that we've consumed.
     // 0 if we haven't consumed any yet.
     StreamTime mEndOfConsumedInputTicks;
     // mEndOfLastInputIntervalInInputStream is the timestamp for the end of the
     // previous interval which was unblocked for both the input and output