Title: [215654] trunk/Source/WebCore
Revision
215654
Author
eric.carl...@apple.com
Date
2017-04-21 17:06:41 -0700 (Fri, 21 Apr 2017)

Log Message

[MediaStream iOS] Release capture session when not producing data
https://bugs.webkit.org/show_bug.cgi?id=171148
<rdar://problem/29265868>

Reviewed by Jer Noble.

On iOS, only one AVCaptureSession can be active at a time, so release a session whenever
it is told to stop producing data. The session will recreated if the capture source if/when
told to produce data again.

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(WebCore::AVMediaCaptureSource::stopProducingData): Clear m_session to release the session.
It will be re-allocated if startProducingData is called later.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (215653 => 215654)


--- trunk/Source/WebCore/ChangeLog	2017-04-22 00:03:01 UTC (rev 215653)
+++ trunk/Source/WebCore/ChangeLog	2017-04-22 00:06:41 UTC (rev 215654)
@@ -1,3 +1,19 @@
+2017-04-21  Eric Carlson  <eric.carl...@apple.com>
+
+        [MediaStream iOS] Release capture session when not producing data
+        https://bugs.webkit.org/show_bug.cgi?id=171148
+        <rdar://problem/29265868>
+
+        Reviewed by Jer Noble.
+
+        On iOS, only one AVCaptureSession can be active at a time, so release a session whenever
+        it is told to stop producing data. The session will recreated if the capture source if/when
+        told to produce data again.
+
+        * platform/mediastream/mac/AVMediaCaptureSource.mm:
+        (WebCore::AVMediaCaptureSource::stopProducingData): Clear m_session to release the session.
+        It will be re-allocated if startProducingData is called later.
+
 2017-04-21  Aaron Chu  <aaron_...@apple.com>
 
         AX: FKA: Buttons need a visible focus indicator

Modified: trunk/Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm (215653 => 215654)


--- trunk/Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm	2017-04-22 00:03:01 UTC (rev 215653)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm	2017-04-22 00:06:41 UTC (rev 215654)
@@ -187,6 +187,10 @@
 
     [m_objcObserver removeNotificationObservers];
     [m_session stopRunning];
+#if PLATFORM(IOS)
+    m_session = nullptr;
+#endif
+
 }
 
 void AVMediaCaptureSource::beginConfiguration()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to