Bug 1208316 - Rename MediaStreamTrack::NotifyEnded to OverrideEnded. r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 08 Sep 2016 11:06:21 +0200
changeset 320480 ea0d1e7b152077adafe13b04afa1dacf862b0eac
parent 320479 0d4fa5f1d355aa7bee8a0fc5339c97544b4cd509
child 320481 063898d69f9ebb2a3c96c3da0c1cba0247418320
push id83396
push userpehrsons@gmail.com
push dateWed, 02 Nov 2016 10:04:27 +0000
treeherdermozilla-inbound@8e63884e4c09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1208316
milestone52.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 1208316 - Rename MediaStreamTrack::NotifyEnded to OverrideEnded. r=jib Better semantics for what I want to do with NotifyEnded in later patches in the bug. MozReview-Commit-ID: 8X0BdiVncNo
dom/html/HTMLMediaElement.cpp
dom/media/DOMMediaStream.cpp
dom/media/MediaStreamTrack.cpp
dom/media/MediaStreamTrack.h
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1357,17 +1357,17 @@ void HTMLMediaElement::NotifyMediaTrackD
         // for instance if the MediaInputPort was destroyed in the same
         // iteration as it was added.
         MediaStreamTrack* outputTrack = ms.mStream->FindOwnedDOMTrack(
             ms.mTrackPorts[i].second()->GetDestination(),
             ms.mTrackPorts[i].second()->GetDestinationTrackId());
         MOZ_ASSERT(outputTrack);
         if (outputTrack) {
           NS_DispatchToMainThread(
-            NewRunnableMethod(outputTrack, &MediaStreamTrack::NotifyEnded));
+            NewRunnableMethod(outputTrack, &MediaStreamTrack::OverrideEnded));
         }
 
         ms.mTrackPorts[i].second()->Destroy();
         ms.mTrackPorts.RemoveElementAt(i);
         break;
       }
     }
 #ifdef DEBUG
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -184,17 +184,17 @@ public:
     }
 
     RefPtr<MediaStreamTrack> track =
       mStream->FindOwnedDOMTrack(aInputStream, aInputTrackID, aTrackID);
     NS_ASSERTION(track, "Owned MediaStreamTracks must be known by the DOMMediaStream");
     if (track) {
       LOG(LogLevel::Debug, ("DOMMediaStream %p MediaStreamTrack %p ended at the source. Marking it ended.",
                             mStream, track.get()));
-      track->NotifyEnded();
+      track->OverrideEnded();
     }
   }
 
   void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
                                 StreamTime aTrackOffset, TrackEventCommand aTrackEvents,
                                 const MediaSegment& aQueuedMedia,
                                 MediaStream* aInputStream,
                                 TrackID aInputTrackID) override
--- a/dom/media/MediaStreamTrack.cpp
+++ b/dom/media/MediaStreamTrack.cpp
@@ -399,17 +399,17 @@ MediaStreamTrack::SetReadyState(MediaStr
       mSource) {
     mSource->UnregisterSink(this);
   }
 
   mReadyState = aState;
 }
 
 void
-MediaStreamTrack::NotifyEnded()
+MediaStreamTrack::OverrideEnded()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (Ended()) {
     return;
   }
 
   LOG(LogLevel::Info, ("MediaStreamTrack %p ended", this));
--- a/dom/media/MediaStreamTrack.h
+++ b/dom/media/MediaStreamTrack.h
@@ -301,17 +301,17 @@ public:
 
   /**
    * Notified by the MediaStreamGraph, through our owning MediaStream on the
    * main thread.
    *
    * Note that this sets the track to ended and raises the "ended" event
    * synchronously.
    */
-  void NotifyEnded();
+  void OverrideEnded();
 
   /**
    * Get this track's principal.
    */
   nsIPrincipal* GetPrincipal() const { return mPrincipal; }
 
   /**
    * Called by the PrincipalHandleListener when this track's PrincipalHandle changes on