Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5be4440813a33d3ef35b4ec5d27521a692b589ad
https://github.com/WebKit/WebKit/commit/5be4440813a33d3ef35b4ec5d27521a692b589ad
Author: Youenn Fablet <[email protected]>
Date: 2023-11-15 (Wed, 15 Nov 2023)
Changed paths:
A
LayoutTests/fast/mediastream/mediastreamtrack-video-resize-event-expected.txt
A LayoutTests/fast/mediastream/mediastreamtrack-video-resize-event.html
M LayoutTests/platform/glib/TestExpectations
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
Log Message:
-----------
MediaPlayerPrivateMediaStreamAVFObjC should ensure to have HTMLMediaElement
and VideoFrame size in sync even in case of resize event
https://bugs.webkit.org/show_bug.cgi?id=264803
rdar://118383141
Reviewed by Eric Carlson.
When a video track size is changing, we want to make sure to fire the resize
event when we receive a VideoFrame with the new size.
This ensures that creating a VideoFrame when resize event is fired will create
a VideoFrame with the given size.
There are two cases where we want to keep doing what we are doing:
1. When no video frame has yet been received, the media element is in
HAVE_METADATA and it is fine to fire the event more proacively when we know the
size.
2. When the media stream is inactive (size is 0, 0), aka all tracks are ended,
no video frame will be received but we still want to notify of the size change.
Chrome and Firefox do not follow this behavior, but we stick to it since this
is preexisting behavior.
According testing, Chrome and Firefox both seem to ensure that the resize event
is synchronized with creating VideoFrames with the new size.
*
LayoutTests/fast/mediastream/mediastreamtrack-video-resize-event-expected.txt:
Added.
* LayoutTests/fast/mediastream/mediastreamtrack-video-resize-event.html: Added.
* LayoutTests/platform/glib/TestExpectations:
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::m_videoLayerManager):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::processNewVideoFrame):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::scheduleTaskForCharacteristicsChanged):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoFrameMetadata):
Canonical link: https://commits.webkit.org/270767@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes