Bug 1301675 - Clarify why we don't need to do anything on DecoderCaptureTrackSource::Stop(). r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 16 Sep 2016 11:10:17 +0200
changeset 347344 e31e0a89ecce1af2060e13daacbe4451d5a9a2ed
parent 347343 b01b14b70c58405f44515c1798257298939005e1
child 347345 945dfdabefaa17a0e95639b500e9df570c324da3
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1301675
milestone52.0a1
Bug 1301675 - Clarify why we don't need to do anything on DecoderCaptureTrackSource::Stop(). r=jib MozReview-Commit-ID: H1zaO1FKWvK
dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2358,19 +2358,20 @@ public:
     p->Reject(new dom::MediaStreamError(aWindow,
                                         NS_LITERAL_STRING("OverconstrainedError"),
                                         NS_LITERAL_STRING("")));
     return p.forget();
   }
 
   void Stop() override
   {
-    // XXX Fix in later patch.
-    NS_ERROR("We're reporting remote=true to not be stoppable. "
-             "Stop() should not be called.");
+    // We don't notify the source that a track was stopped since it will keep
+    // producing tracks until the element ends. The decoder also needs the
+    // tracks it created to be live at the source since the decoder's clock is
+    // based on MediaStreams during capture.
   }
 
   void NotifyDecoderPrincipalChanged() override
   {
     nsCOMPtr<nsIPrincipal> newPrincipal = mElement->GetCurrentPrincipal();
     if (nsContentUtils::CombineResourcePrincipals(&mPrincipal, newPrincipal)) {
       PrincipalChanged();
     }