[webkit-changes] [WebKit/WebKit] 704de6: Display capture Safari muting UI is broken if UseS...
youennf
noreply at github.com
Mon Mar 4 09:17:36 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 704de66ba7cb72f0cde960ca342172fed0c1383e
https://github.com/WebKit/WebKit/commit/704de66ba7cb72f0cde960ca342172fed0c1383e
Author: Youenn Fablet <youenn at apple.com>
Date: 2024-03-04 (Mon, 04 Mar 2024)
Changed paths:
M Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp
M Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.h
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.h
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm
Log Message:
-----------
Display capture Safari muting UI is broken if UseSCContentSharingPicker is false
https://bugs.webkit.org/show_bug.cgi?id=270441
rdar://123311026
Reviewed by Eric Carlson.
In case UseSCContentSharingPicker is false, we use a sharing session to start capture.
Before the patch, we would not keep the sharing session.
We update the code to store the sharing session in ScreenCaptureKitCaptureSource, so that when calling start to restart capture,
we can reuse the sharing session.
To make it work, we need the haring session to not be ended.
We end it in ScreenCaptureKitCaptureSource::end() or in ScreenCaptureKitCaptureSource destructor via ScreenCaptureKitSharingSessionManager::cleanupSharingSession.
We update ScreenCaptureKitCaptureSource::sessionFailedWithError since it is called with an error just after ScreenCaptureKitCaptureSource::stop is called.
* Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:
(WebCore::DisplayCaptureSourceCocoa::endProducingData):
* Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::end):
(WebCore::ScreenCaptureKitCaptureSource::clearSharingSession):
(WebCore::ScreenCaptureKitCaptureSource::sessionFailedWithError):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream):
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.h:
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:
(WebCore::ScreenCaptureKitSharingSessionManager::contentFilterAndSharingSessionFromCaptureDevice):
(WebCore::ScreenCaptureKitSharingSessionManager::createSessionSourceForDevice):
(WebCore::ScreenCaptureKitSharingSessionManager::cleanupSessionSource):
(WebCore::ScreenCaptureKitSharingSessionManager::cleanupSharingSession):
(WebCore::ScreenCaptureKitSharingSessionManager::contentFilterFromCaptureDevice): Deleted.
Canonical link: https://commits.webkit.org/275627@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list