Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a382af568e5ab5712408ef955f01b69af55364bd
https://github.com/WebKit/WebKit/commit/a382af568e5ab5712408ef955f01b69af55364bd
Author: Jean-Yves Avenard <[email protected]>
Date: 2025-11-30 (Sun, 30 Nov 2025)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-util.js
M LayoutTests/ipc/invalid-addSourceBuffer-to-GPU-process-crash.html
M LayoutTests/platform/mac-wk1/TestExpectations
M LayoutTests/platform/mac/TestExpectations
R
LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-expected.txt
M Source/WebCore/Modules/mediasource/MediaSource.cpp
M Source/WebCore/platform/graphics/MediaSourceConfiguration.h
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm
M
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h
M
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
[MSE]
imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative.html
is a permanent timeout
https://bugs.webkit.org/show_bug.cgi?id=302693
rdar://164942613
Reviewed by Youenn Fablet.
SourceBuffer.changeType was fundamentally broken on Apple platforms. The
SourceBufferParser used
to demux the content was created and given to the SourceBufferPrivateAVFObjC
constructor. It could never be changed after that.
The code assumes that if we could create a SourceBufferParser for the required
content, then we supported the type given to changeType.
But that wasn't the case. If we had first created a SourceBufferParserAVFObjC
it could never demux webm content, same in the reverse case, but we reported
that it could.
The original scenario that lead to the changeType API was to be able to play
webm content and insert mp4 ads without having to recreate a new SourceBuffer.
That original scenario couldn't work.
We now allow to create a new SourceBufferParser whenever SourceBuffer.changeType
is called and replace the previously created one.
Re-enabled WPT tests disabled (since they were failing) since 2020.
*
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-negative-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-without-codecs-parameter-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/media-source/mediasource-changetype-util.js:
(trimBuffered): The test assumes that all videos used would be over 2.1s long,
but they aren't they are 2.03s long only.
This caused an assertion to fire; Chrome failed in the same manner. The
duration of the original file was irrelevant
to the test; all we need to do is not attempt to resize if the video is already
shorter that request (2s)
(trimDuration): Lodged as
https://github.com/web-platform-tests/wpt/issues/56347 ; fix submitted
(runChangeTypeTest):
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac/TestExpectations: Remove failure/timeout
expectations.
*
LayoutTests/platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-changetype-play-expected.txt:
Removed.
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::createSourceBufferPrivate):
* Source/WebCore/platform/graphics/MediaSourceConfiguration.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
*
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
*
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::create): Save the original MediaSource
configuration
used to enable TextTrack supports in MSE.
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::setTrackChangeCallbacks):
(WebCore::SourceBufferPrivateAVFObjC::updateTrackIds):
(WebCore::SourceBufferPrivateAVFObjC::appendInternal): We now need to ensure
we jump through the SourceBufferPrivate's queue first to ensure that events
run in the original queued order.
(WebCore::SourceBufferPrivateAVFObjC::resetParserStateInternal): Same as above.
(WebCore::SourceBufferPrivateAVFObjC::audioTrackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::canSwitchToType):
(WebCore::SourceBufferPrivateAVFObjC::configureParser): Added utility method.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/303665@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications