Changeset 285927 in webkit


Ignore:
Timestamp:
Nov 17, 2021, 6:50:52 AM (4 years ago)
Author:
youenn@apple.com
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:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r285926 r285927  
     12021-11-17  Youenn Fablet  <youenn@apple.com>
     2
     3        Increase CoreAudioCaptureSource capture verify timer to handle the case of device change
     4        https://bugs.webkit.org/show_bug.cgi?id=233250
     5
     6        Reviewed by Eric Carlson.
     7
     8        Previously, our capture verify timer was starting with 10 seconds to handle slow start up times, and decreasing to 2 seconds to be snappy.
     9        We are now sticking to 10 seconds to handle the case of changing of capture device while capturing.
     10        This happens on iOS for instance when going from builtin microphone to BT headset microphone.
     11
     12        Manually tested.
     13
     14        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
     15
    1162021-11-17  Alan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp

    r284862 r285927  
    140140    uint64_t m_microphoneProcsCalledLastTime { 0 };
    141141    Timer m_verifyCapturingTimer;
     142    static constexpr Seconds verifyCaptureInterval = 10_s;
    142143};
    143144
     
    501502    m_ioUnitStarted = true;
    502503
    503     m_verifyCapturingTimer.startRepeating(10_s);
     504    m_verifyCapturingTimer.startRepeating(verifyCaptureInterval);
    504505    m_microphoneProcsCalled = 0;
    505506    m_microphoneProcsCalledLastTime = 0;
     
    512513    if (m_microphoneProcsCalledLastTime != m_microphoneProcsCalled) {
    513514        m_microphoneProcsCalledLastTime = m_microphoneProcsCalled;
    514         if (m_verifyCapturingTimer.repeatInterval() == 10_s)
    515             m_verifyCapturingTimer.startRepeating(2_s);
    516515        return;
    517516    }
Note: See TracChangeset for help on using the changeset viewer.