Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"A MediaStreamTrack ended due to a capture failure" when selecting bluetooth headphones as audio input device #5855

Commits on Oct 28, 2022

  1. "A MediaStreamTrack ended due to a capture failure" when selecting bl…

    …uetooth headphones as audio input device
    
    https://bugs.webkit.org/show_bug.cgi?id=247119
    rdar://problem/101628857
    
    Reviewed by Eric Carlson.
    
    Replace the boolean to update the sample buffer by a minimum buffer sample frames, which is set when render fails.
    This minimum buffer sample frames is used to compute a minimum buffer size when setting up the audio unit.
    
    Update Mock implementation to cover that case.
    We do this by triggering this code path when triggerMockMicrophoneConfigurationChange is called.
    We also update the capture verification timer so that timer for mock unit is reduced to 1 second.
    
    Update LayoutTests/fast/mediastream/mediastreamtrack-configurationchange.html to cover that case.
    
    * LayoutTests/fast/mediastream/mediastreamtrack-configurationchange.html:
    * Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp:
    (WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
    (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
    (WebCore::CoreAudioSharedUnit::startInternal):
    (WebCore::CoreAudioSharedUnit::isProducingMicrophoneSamplesChanged):
    * Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h:
    * Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.h:
    * Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm:
    (WebCore::MockAudioSharedUnit::singleton):
    (WebCore::MockAudioSharedUnit::increaseBufferSize):
    (WebCore::MockAudioSharedInternalUnit::emitSampleBuffers):
    (WebCore::MockAudioSharedInternalUnit::render):
    * Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:
    (WebCore::MockRealtimeMediaSourceCenter::triggerMockMicrophoneConfigurationChange):
    
    Canonical link: https://commits.webkit.org/256091@main
    youennf committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    b818b25 View commit details
    Browse the repository at this point in the history