-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not delay getUserMedia promise resolution on VPIO unit prewarming
https://bugs.webkit.org/show_bug.cgi?id=274203 rdar://128112002 Reviewed by Eric Carlson. Before this patch, we were delaying the resolution of the getUserMedia promise upon VPIO creation prewarming. This was ensuring that there would be no freeze and audio capture would start right away. But this delays the web page processing. We are now doing the following when starting capture: - Prewarm the VPIO unit when GPU process is instructed that it will start audio capture soon. - Create sources in GPU process, do not wait for warming up to finish.. - Resolve getUserMedia promise. - Start the sources. When starting microphone capture, complete the prewarming if needed before starting the VPIO unit. This change allows the web page to manipulate the getUserMedia tracks sooner. It can then use the tracks to set up a VC call for instance, in parallel to the prewarming of the VPIO unit. We keep prewarming of the VPIO unit as fast as we can. Manually tested on macOS, should be a no op on iOS. * Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp: (WebCore::BaseAudioSharedUnit::startProducingData): (WebCore::BaseAudioSharedUnit::prepareForNewCapture): * Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h: * Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp: (WebCore::CoreAudioCaptureSource::whenReady): Deleted. * Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h: * Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp: (WebCore::CoreAudioSharedUnit::prewarmAudioUnitCreation): * Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): Canonical link: https://commits.webkit.org/278851@main
- Loading branch information
Showing
7 changed files
with
38 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters