[webkit-changes] [WebKit/WebKit] 519c83: [ImageCapture] Commit configuration changes after ...
Eric Carlson
noreply at github.com
Tue Jan 16 13:29:38 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 519c8375e5ac2dd3fc404e4a5b00a8056478e0db
https://github.com/WebKit/WebKit/commit/519c8375e5ac2dd3fc404e4a5b00a8056478e0db
Author: Eric Carlson <eric.carlson at apple.com>
Date: 2024-01-16 (Tue, 16 Jan 2024)
Changed paths:
M Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp
M Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
M Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp
M Source/WebCore/platform/mock/MockRealtimeVideoSource.h
Log Message:
-----------
[ImageCapture] Commit configuration changes after changing/restoring settings for image capture
https://bugs.webkit.org/show_bug.cgi?id=267580
rdar://121045984
Reviewed by Youenn Fablet.
AVCapture sometimes throws an exception if an AVCaptureSession is started while it is being
configured, so ensure that session configuration is ended explicitly after setting up or
restoring session configuration for image capture.
* Source/WebCore/platform/mediastream/RealtimeVideoCaptureSource.cpp:
(WebCore::RealtimeVideoCaptureSource::takePhoto): Call startApplyingConstraints and
endApplyingConstraints around setting and restoring configuration.
* Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::rejectPendingPhotoRequest): Drive-by: don't log if the
photo producer doesn't exist.
(WebCore::AVVideoCaptureSource::takePhotoInternal): Reject the promise if there are no
settings.
* Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::setFrameRateAndZoomWithPreset): Assert if
`m_beingConfigured` is not set.
(WebCore::MockRealtimeVideoSource::startProducingData): Ditto.
(WebCore::MockRealtimeVideoSource::startApplyingConstraints): Set `m_beingConfigured`.
(WebCore::MockRealtimeVideoSource::endApplyingConstraints): Clear `m_beingConfigured`.
* Source/WebCore/platform/mock/MockRealtimeVideoSource.h:
Canonical link: https://commits.webkit.org/273091@main
More information about the webkit-changes
mailing list