Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ae6cd18d5eb77dd68e72c04b2b7c887567ba3cf8 https://github.com/WebKit/WebKit/commit/ae6cd18d5eb77dd68e72c04b2b7c887567ba3cf8 Author: Youenn Fablet <you...@apple.com> Date: 2025-04-04 (Fri, 04 Apr 2025)
Changed paths: A LayoutTests/fast/mediastream/image-capture-grabFrame-expected.txt A LayoutTests/fast/mediastream/image-capture-grabFrame.html M LayoutTests/platform/glib/TestExpectations M Source/WebCore/Modules/mediastream/ImageCapture.cpp M Source/WebCore/Modules/mediastream/ImageCapture.h M Source/WebCore/Modules/mediastream/ImageCapture.idl M Source/WebCore/platform/MediaStrategy.h M Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h Log Message: ----------- Add support for ImageCapture.grabFrame rdar://148425176 https://bugs.webkit.org/show_bug.cgi?id=290916 Reviewed by Eric Carlson. Add support of ImageCapture::grabFrame by doing the following: - Introduce ImageCaptureVideoFrameObserver as a VideoFrameObserver on the ImageCapture track. - Convert the VideoFrame into an ImageBitmap. We handle the rotation so that drawing the ImageBitmap is similar to rendering the track via a media element. - The conversion requires conversion to RGB which is done in GPUProcess. For that purpose, we introduce a new MediaStrategy which uses an existing IPC call. Marking as failing in glib since there is a lack of mock rotation support. Covered by added test. * LayoutTests/fast/mediastream/image-capture-grabFrame-expected.txt: Added. * LayoutTests/fast/mediastream/image-capture-grabFrame.html: Added. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/Modules/mediastream/ImageCapture.cpp: (WebCore::ImageCapture::~ImageCapture): (WebCore::videoFrameOrientation): (WebCore::createImageBitmapViaDrawing): (WebCore::createImageBitmapFromNativeImage): (WebCore::createImageBitmap): (WebCore::ImageCaptureVideoFrameObserver::create): (WebCore::ImageCaptureVideoFrameObserver::~ImageCaptureVideoFrameObserver): (WebCore::ImageCaptureVideoFrameObserver::add): (WebCore::ImageCaptureVideoFrameObserver::stop): (WebCore::ImageCaptureVideoFrameObserver::ImageCaptureVideoFrameObserver): (WebCore::ImageCaptureVideoFrameObserver::processVideoFrame): (WebCore::ImageCapture::grabFrame): (WebCore::ImageCapture::stop): (WebCore::ImageCapture::stopGrabFrameObserver): * Source/WebCore/Modules/mediastream/ImageCapture.h: * Source/WebCore/Modules/mediastream/ImageCapture.idl: * Source/WebCore/platform/MediaStrategy.h: (WebCore::MediaStrategy::nativeImageFromVideoFrame): * Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::orientationChanged): * Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::nativeImageFromVideoFrame): * Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h: Canonical link: https://commits.webkit.org/293243@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes