Bug 1301675 - Clarify why we don't need to do anything on DecoderCaptureTrackSource::Stop(). r?jib draft
authorAndreas Pehrson <pehrsons@gmail.com>
Fri, 16 Sep 2016 11:10:17 +0200
changeset 432220 a193e05c53d16ded50ad8058dd448d2b0f75f07b
parent 432219 7787bfd602bb3f19eeb6e9e6d94b65a8a3a136fe
child 432221 a1ff0b48cde6209a2c714880b694b8fa6f527b7c
push id34235
push userbmo:pehrson@telenordigital.com
push dateTue, 01 Nov 2016 13:40:03 +0000
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();
     }