Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 79003b865f9f903646dca04845d072f0a91766fa
https://github.com/WebKit/WebKit/commit/79003b865f9f903646dca04845d072f0a91766fa
Author: Eric Carlson <[email protected]>
Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h
M Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm
M Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.h
M Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.mm
Log Message:
-----------
[Cocoa] Use AVCapturePhotoOutputReadinessCoordinator when taking photo
https://bugs.webkit.org/show_bug.cgi?id=313854
rdar://176054992
Reviewed by Youenn Fablet.
When the AVCapturePhotoOutput pipeline is not yet ready, store the pending
photo settings
and wait for a readiness change callback before dispatching the capture,
instead of
dispatching immediately and risking failure. Use a 60-second watchdog timer to
reject
the pending request if readiness is never signaled.
Tested manually.
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm:
* Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.h:
* Source/WebCore/platform/mediastream/cocoa/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::clearSession):
(WebCore::AVVideoCaptureSource::photoOutput):
(WebCore::AVVideoCaptureSource::takePhotoInternal):
(WebCore::AVVideoCaptureSource::dispatchCaptureOnPhotoQueue):
(WebCore::AVVideoCaptureSource::captureReadinessDidChange):
(-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
(-[WebCoreAVVideoCaptureSourceObserver
captureOutput:didOutputSampleBuffer:fromConnection:]):
(-[WebCoreAVVideoCaptureSourceObserver
captureOutput:didFinishProcessingPhoto:error:]):
(-[WebCoreAVVideoCaptureSourceObserver
readinessCoordinator:captureReadinessDidChange:]):
(-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
(-[WebCoreAVVideoCaptureSourceObserver sessionRuntimeError:]):
(-[WebCoreAVVideoCaptureSourceObserver beginSessionInterrupted:]):
(-[WebCoreAVVideoCaptureSourceObserver endSessionInterrupted:]):
Canonical link: https://commits.webkit.org/313310@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications