Title: [285927] trunk/Source/WebCore
Revision
285927
Author
[email protected]
Date
2021-11-17 06:50:52 -0800 (Wed, 17 Nov 2021)

Log Message

Increase CoreAudioCaptureSource capture verify timer to handle the case of device change
https://bugs.webkit.org/show_bug.cgi?id=233250

Reviewed by Eric Carlson.

Previously, our capture verify timer was starting with 10 seconds to handle slow start up times, and decreasing to 2 seconds to be snappy.
We are now sticking to 10 seconds to handle the case of changing of capture device while capturing.
This happens on iOS for instance when going from builtin microphone to BT headset microphone.

Manually tested.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (285926 => 285927)


--- trunk/Source/WebCore/ChangeLog	2021-11-17 14:23:40 UTC (rev 285926)
+++ trunk/Source/WebCore/ChangeLog	2021-11-17 14:50:52 UTC (rev 285927)
@@ -1,3 +1,18 @@
+2021-11-17  Youenn Fablet  <[email protected]>
+
+        Increase CoreAudioCaptureSource capture verify timer to handle the case of device change
+        https://bugs.webkit.org/show_bug.cgi?id=233250
+
+        Reviewed by Eric Carlson.
+
+        Previously, our capture verify timer was starting with 10 seconds to handle slow start up times, and decreasing to 2 seconds to be snappy.
+        We are now sticking to 10 seconds to handle the case of changing of capture device while capturing.
+        This happens on iOS for instance when going from builtin microphone to BT headset microphone.
+
+        Manually tested.
+
+        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
+
 2021-11-17  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] LineBuilder should drive the trailing whitespace collapsing/trimming

Modified: trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp (285926 => 285927)


--- trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2021-11-17 14:23:40 UTC (rev 285926)
+++ trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp	2021-11-17 14:50:52 UTC (rev 285927)
@@ -139,6 +139,7 @@
     uint64_t m_microphoneProcsCalled { 0 };
     uint64_t m_microphoneProcsCalledLastTime { 0 };
     Timer m_verifyCapturingTimer;
+    static constexpr Seconds verifyCaptureInterval = 10_s;
 };
 
 CoreAudioSharedUnit& CoreAudioSharedUnit::unit()
@@ -500,7 +501,7 @@
 
     m_ioUnitStarted = true;
 
-    m_verifyCapturingTimer.startRepeating(10_s);
+    m_verifyCapturingTimer.startRepeating(verifyCaptureInterval);
     m_microphoneProcsCalled = 0;
     m_microphoneProcsCalledLastTime = 0;
 
@@ -511,8 +512,6 @@
 {
     if (m_microphoneProcsCalledLastTime != m_microphoneProcsCalled) {
         m_microphoneProcsCalledLastTime = m_microphoneProcsCalled;
-        if (m_verifyCapturingTimer.repeatInterval() == 10_s)
-            m_verifyCapturingTimer.startRepeating(2_s);
         return;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to