| Summary: | [macOS] Support both versions of ScreenCaptureKit API | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
| Component: | WebRTC | Assignee: | Eric Carlson <eric.carlson> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Eric Carlson
2022-02-09 18:14:30 PST
Created attachment 451481 [details]
Patch
Comment on attachment 451481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451481&action=review > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:95 > WeakPtr<ScreenCaptureKitCaptureSource> _callback; Style question: Is it _callback or callback_ or m_callback that we are supposed to use? > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:180 > + m_useNewAPI = [PAL::getSCStreamClass() instancesRespondToSelector:@selector(stopCaptureWithCompletionHandler:)]; , m_useNewAPI(...) > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:211 > if (m_contentStream) { We could do if (!m_contentStream) return; > Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:447 > + Not needed Created attachment 451544 [details]
Patch for landing
Comment on attachment 451481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451481&action=review >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:95 >> WeakPtr<ScreenCaptureKitCaptureSource> _callback; > > Style question: Is it _callback or callback_ or m_callback that we are supposed to use? As far as I can tell, it is usually `_callback` in ObjC code. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:180 >> + m_useNewAPI = [PAL::getSCStreamClass() instancesRespondToSelector:@selector(stopCaptureWithCompletionHandler:)]; > > , m_useNewAPI(...) Fixed. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:211 >> if (m_contentStream) { > > We could do if (!m_contentStream) return; Oops, I missed this but will change in an upcoming patch. >> Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:447 >> + > > Not needed Removed. Committed r289547 (247078@main): <https://commits.webkit.org/247078@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451544 [details]. Comment on attachment 451544 [details]
Patch for landing
This code is macOS only, the Windows failure is unrelated.
|