[webkit-changes] [WebKit/WebKit] e46ffa: ScreenCaptureKitCaptureSource::streamDidOutputVide...
youennf
noreply at github.com
Tue May 7 12:59:18 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e46ffa98cd5d3466abcf9621b01e1b712921ff48
https://github.com/WebKit/WebKit/commit/e46ffa98cd5d3466abcf9621b01e1b712921ff48
Author: Youenn Fablet <youenn at apple.com>
Date: 2024-05-07 (Tue, 07 May 2024)
Changed paths:
M Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
M Source/WebCore/platform/cocoa/CoreVideoSoftLink.h
M Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp
M Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h
M Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h
M Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.h
M Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm
Log Message:
-----------
ScreenCaptureKitCaptureSource::streamDidOutputVideoSampleBuffer should crop video frames as needed
rdar://127598482
https://bugs.webkit.org/show_bug.cgi?id=273764
Reviewed by Jean-Yves Avenard.
ScreenCaptureKitCaptureSource::streamDidOutputVideoSampleBuffer receives buffers with black stripes.
This happens in case of resizing or when large presenter overlay is enabled.
To fix this, we crop via ImageTransferSessionVT the pixel buffer to remove those black stripes.
We update ImageTransferSessionVT to allow setting a cropping rectangle.
We set kCVImageBufferCleanApertureKey on the source buffer before doing the transfer to the new buffer.
Manually tested by:
- Capture screen, capture camera and go to large presenter overlay
- Capture screen and resize captured window (w/o presenter overlay).
* Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp:
* Source/WebCore/platform/cocoa/CoreVideoSoftLink.h:
* Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp:
* Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h:
* Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.h:
* Source/WebCore/platform/graphics/cv/ImageTransferSessionVT.mm:
(WebCore::ImageTransferSessionVT::setCroppingRectangle):
(WebCore::ImageTransferSessionVT::convertPixelBuffer):
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::streamDidOutputVideoSampleBuffer):
Canonical link: https://commits.webkit.org/278475@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