[webkit-changes] [WebKit/WebKit] 971ab4: HeapBufferOverflow in computeSampleUsingLinearInte...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 971ab40cd8de9afbe40334360e07230d1f76d0ed https://github.com/WebKit/WebKit/commit/971ab40cd8de9afbe40334360e07230d1f76d0ed Author: Jean-Yves Avenard Date: 2024-08-05 (Mon, 05 Aug 2024) Changed paths: A LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt A LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html M Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp Log Message: --- HeapBufferOverflow in computeSampleUsingLinearInterpolation https://bugs.webkit.org/show_bug.cgi?id=275431 rdar://125617812 Reviewed by Youenn Fablet. Add boundary check. This is a copy of blink code for that same function. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webaudio/audio_buffer_source_handler.cc;l=336-341 * LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash-expected.txt: Added. * LayoutTests/webaudio/crashtest/audiobuffer-sourcenode-resampler-crash.html: Added. * Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): Originally-landed-as: 272448.1085@safari-7618-branch (ff52ff7cb64e). rdar://132956456 Canonical link: https://commits.webkit.org/281865@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
[webkit-changes] [WebKit/WebKit] b728e5: heap-use-after-free | WebCore::MediaRecorderPrivat...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b728e584a883c12a86abe5d6932ad5a3715e4ccf https://github.com/WebKit/WebKit/commit/b728e584a883c12a86abe5d6932ad5a3715e4ccf Author: Youenn Fablet Date: 2024-08-02 (Fri, 02 Aug 2024) Changed paths: M Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm Log Message: --- heap-use-after-free | WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers; Detail::CallableWrapper::call; WTF::RunLoop::performWork) rdar://129292824 Reviewed by Andy Estes. Adding a weakThis check we missed when adopting ThreadSafefWeakPtr. * Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: (WebCore::MediaRecorderPrivateWriter::fetchData): Originally-landed-as: 272448.1073@safari-7618-branch (891cf8c9dbac). rdar://132954379 Canonical link: https://commits.webkit.org/281790@main Commit: 8da2eab7ffa0f22bb36806f41c043a0af5bc0973 https://github.com/WebKit/WebKit/commit/8da2eab7ffa0f22bb36806f41c043a0af5bc0973 Author: Dan Hecht Date: 2024-08-02 (Fri, 02 Aug 2024) Changed paths: A JSTests/stress/regress-119545295.js M Source/JavaScriptCore/runtime/InternalFunction.cpp Log Message: --- [JSC] JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation may allow creation of an undecided array with a Proxy object in the prototype chain https://bugs.webkit.org/show_bug.cgi?id=274870 rdar://119545295 Reviewed by Keith Miller. When constructing an array along this particular path, newTarget.prototype could have a getter that induces a bad time. We need to check for this case and handle it explicitly since the array isn't yet fully constructed and thus won't be handled by the having a bad time machinery. * JSTests/stress/regress-119545295.js: Added. (main.const.new_target): * Source/JavaScriptCore/runtime/InternalFunction.cpp: (JSC::InternalFunction::createSubclassStructure): Originally-landed-as: 272448.1052@safari-7618-branch (d4c5d33ae803). rdar://132954559 Canonical link: https://commits.webkit.org/281791@main Commit: 4f4fdbf93a5952a568b92e2b690304aa24825fe2 https://github.com/WebKit/WebKit/commit/4f4fdbf93a5952a568b92e2b690304aa24825fe2 Author: Alex Christensen Date: 2024-08-02 (Fri, 02 Aug 2024) Changed paths: M Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm Log Message: --- Disallow non-WebSocket use of ws and wss schemes at NetworkDataTaskCocoa level rdar://81997401 Reviewed by Brady Eidson. If you type wss://example.com into the URL bar of Safari, it will call WKWebView.loadRequest with that URL, and we will give it to CFNetwork, and it will successfully load https://example.com but in Chrome and Firefox it fails to load. We need it to also fail to load. It used to successfully load for legacy reasons related to the time before the existence of the NSURLSessionWebSocketTask API, but now that NSURLSessionWebSocketTask exists it is no longer needed, so when configuration._usesNWLoader is YES CFNetwork does this for us. WebKit's use of NSURLSession does not need to mix ws/wss and http/https schemes, so we can fail loads before making an NSURLSessionDataTask and our loading of http/https URLs still works because it uses NSURLSessionDataTask in the normal way, and our ws/wss URL "loading" still works because we use NSURLSessionWebSocketTask for those URLs through the JavaScript WebSocket object, the way WebSockets are supposed to be created from web content. * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: (TestWebKitAPI::TEST): Originally-landed-as: 272448.1042@safari-7618-branch (0a3f4d58c388). rdar://132954656 Canonical link: https://commits.webkit.org/281792@main Commit: ef46d74db28f933175a36860aae0d4433479fe62 https://github.com/WebKit/WebKit/commit/ef46d74db28f933175a36860aae0d4433479fe62 Author: Youenn Fablet Date: 2024-08-02 (Fri, 02 Aug 2024) Changed paths: M LayoutTests/http/wpt/webcodecs/videoFrame-rect-expected.txt M LayoutTests/http/wpt/webcodecs/videoFrame-rect.html M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp Log Message: --- WebCodecs VideoFrame Out-Of-Bounds Read rdar://127438135 Reviewed by Jean-Yves Avenard. When passing a NaN, our size error checks would be bypassed as comparing with NaN returns false. We add finite checks to x, y, width and height and add a corresponding test. * LayoutTests/http/wpt/webcodecs/videoFrame-rect-expected.txt: * LayoutTests/http/wpt/webcodecs/videoFrame-rect.html: * Source/WebCore/Modules/webcodecs/WebCodecsVideoFrameAlgorithms.cpp: (WebCore::parseVisibleRect): Originally-landed-as: 272448.1035@safari-7618-branch (9c4e3c807b
[webkit-changes] [WebKit/WebKit] eb83b0: REGRESSION (281109@main?): [ Guard-Malloc ] media/...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: eb83b03a1b126f855603d1dc66332d493531b53f https://github.com/WebKit/WebKit/commit/eb83b03a1b126f855603d1dc66332d493531b53f Author: Jean-Yves Avenard Date: 2024-07-31 (Wed, 31 Jul 2024) Changed paths: M Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.h M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm Log Message: --- REGRESSION (281109@main?): [ Guard-Malloc ] media/media-source/media-managedmse-video-with-poster.html is constantly crashing. https://bugs.webkit.org/show_bug.cgi?id=277395 rdar://132767136 Reviewed by Youenn Fablet. It was possible for the VideoPresentationInterfaceIOS to be removed from the VideoPresentationManagerProxy's contexts HashMap. We adopt more smart pointers adoption to get around the issue of the interface potentially being deleted while exiting fullscreen. We adopt the use of `Ref` in the HashMap for model/interface as they can never contained null pointers. Which helps simplify the code in some instances and remove unnecessary tests. Fly-by: Running some tests in debug mode triggered an assertion in `VideoPresentationManager::removeClientForContext` We had handling for this case instead and exit early if the VideoPresentationManager had no client left. Covered by existing tests. * Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.h: * Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm: (WebKit::VideoPresentationInterfaceLMK::finalizeSetup): (WebKit::VideoPresentationInterfaceLMK::presentFullscreen): (WebKit::VideoPresentationInterfaceLMK::dismissFullscreen): * Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h: * Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm: (WebKit::PlaybackSessionManagerProxy::createModelAndInterface): (WebKit::PlaybackSessionManagerProxy::ensureModelAndInterface): (WebKit::PlaybackSessionManagerProxy::ensureModel): (WebKit::PlaybackSessionManagerProxy::ensureInterface): (WebKit::PlaybackSessionManagerProxy::removeClientForContext): (WebKit::PlaybackSessionManagerProxy::setUpPlaybackControlsManagerWithID): (WebKit::PlaybackSessionManagerProxy::currentTimeChanged): (WebKit::PlaybackSessionManagerProxy::bufferedTimeChanged): (WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged): (WebKit::PlaybackSessionManagerProxy::canPlayFastReverseChanged): (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionOptionsChanged): (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionOptionsChanged): (WebKit::PlaybackSessionManagerProxy::audioMediaSelectionIndexChanged): (WebKit::PlaybackSessionManagerProxy::legibleMediaSelectionIndexChanged): (WebKit::PlaybackSessionManagerProxy::externalPlaybackPropertiesChanged): (WebKit::PlaybackSessionManagerProxy::wirelessVideoPlaybackDisabledChanged): (WebKit::PlaybackSessionManagerProxy::mutedChanged): (WebKit::PlaybackSessionManagerProxy::volumeChanged): (WebKit::PlaybackSessionManagerProxy::durationChanged): (WebKit::PlaybackSessionManagerProxy::playbackStartedTimeChanged): (WebKit::PlaybackSessionManagerProxy::rateChanged): (WebKit::PlaybackSessionManagerProxy::pictureInPictureSupportedChanged): (WebKit::PlaybackSessionManagerProxy::isInWindowFullscreenActiveChanged): (WebKit::PlaybackSessionManagerProxy::supportsLinearMediaPlayerChanged): (WebKit::PlaybackSessionManagerProxy::setVideoReceiverEndpoint): (WebKit::PlaybackSessionManagerProxy::controlsManagerInterface): (WebKit::PlaybackSessionManagerProxy::isPaused const): * Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h: * Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm: (WebKit::VideoPresentationManagerProxy::controlsManagerInterface): (WebKit::VideoPresentationManagerProxy::createModelAndInterface): (WebKit::VideoPresentationManagerProxy::ensureModelAndInterface): (WebKit::VideoPresentationManagerProxy::ensureModel): (WebKit::VideoPresentationManagerProxy::ensureInterface): (WebKit::VideoPresentationManagerProxy::findInterface const): (WebKit::VideoPresentationManagerProxy::forEachSession): (WebKit::VideoPresentationManagerProxy::createLayerWithID): (WebKit::VideoPresentationManagerProxy::createLayerHostViewWithID): (WebKit::VideoPresentationManagerProxy
[webkit-changes] [WebKit/WebKit] ffc498: Make MediaPlayer::createResourceLoader() return a Ref
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ffc49822aace3f0047f50ff1451d23476698aa11 https://github.com/WebKit/WebKit/commit/ffc49822aace3f0047f50ff1451d23476698aa11 Author: Jean-Yves Avenard Date: 2024-07-30 (Tue, 30 Jul 2024) Changed paths: M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- Make MediaPlayer::createResourceLoader() return a Ref https://bugs.webkit.org/show_bug.cgi?id=277331 rdar://132788469 Reviewed by Youenn Fablet. Object returned can never be null and all usage of this method assumes that the object is never null. So make it Ref. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::sniffForContentType): (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader): * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::createResourceLoader): * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): * Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::createResourceClient): * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleNeedContextMessage): * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webKitWebSrcSetResourceLoader): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerCreateResourceLoader): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): Canonical link: https://commits.webkit.org/281637@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
[webkit-changes] [WebKit/WebKit] 75467c: Crash with multiple video tags that contains webm ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 75467caf79bb0cbbc7441ecbe4a239829779eac3 https://github.com/WebKit/WebKit/commit/75467caf79bb0cbbc7441ecbe4a239829779eac3 Author: Jean-Yves Avenard Date: 2024-07-30 (Tue, 30 Jul 2024) Changed paths: A LayoutTests/media/media-vp8-webm-with-preload-expected.txt A LayoutTests/media/media-vp8-webm-with-preload.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/platform/graphics/WebMResourceClient.cpp M Source/WebCore/platform/graphics/WebMResourceClient.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.h Log Message: --- Crash with multiple video tags that contains webm source https://bugs.webkit.org/show_bug.cgi?id=276717 rdar://132405520 Reviewed by Youenn Fablet. The WebM MediaPlayer ignored the preload attribute and would read the webm video in its entirety all the time. This could lead to great memory usage and eventually the page being jetsammed. We now stops loading the video if preload is set to <= metadata and will continue from where we stopped when play() is called. The `requestMediaDataWhenReady` callback was set whenever we demuxed a single sample or when a new audio or video renderer was created, flushed etc. It only needed to be set once. The dimensions of the video were determined after enqueuing the first video sample. We now read it from the container instead as it allows to reduce how much of the media we have to download to obtain the information and move the readyState to HAVE_METADATA. Added test. * LayoutTests/media/media-vp8-webm-withp-reload-expected.txt: Added. * LayoutTests/media/media-vp8-webm-with-preload.html: Added. * LayoutTests/platform/glib/TestExpectations: see webkit.org/b/277327 * LayoutTests/platform/mac-wk1/TestExpectations: webm not supported in wk1. * Source/WebCore/platform/graphics/WebMResourceClient.cpp: (WebCore::WebMResourceClient::responseReceived): * Source/WebCore/platform/graphics/WebMResourceClient.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::setPreload): (WebCore::MediaPlayerPrivateWebM::doPreload): (WebCore::MediaPlayerPrivateWebM::load): (WebCore::MediaPlayerPrivateWebM::createResourceClient): (WebCore::MediaPlayerPrivateWebM::dataLengthReceived): (WebCore::MediaPlayerPrivateWebM::dataReceived): (WebCore::MediaPlayerPrivateWebM::cancelLoad): (WebCore::MediaPlayerPrivateWebM::prepareToPlay): (WebCore::MediaPlayerPrivateWebM::setNaturalSize): (WebCore::MediaPlayerPrivateWebM::setNetworkState): (WebCore::MediaPlayerPrivateWebM::maybeFinishLoading): (WebCore::MediaPlayerPrivateWebM::trackDidChangeSelected): (WebCore::MediaPlayerPrivateWebM::trackDidChangeEnabled): (WebCore::MediaPlayerPrivateWebM::didParseInitializationData): (WebCore::MediaPlayerPrivateWebM::didProvideMediaDataForTrackId): (WebCore::MediaPlayerPrivateWebM::ensureDecompressionSession): (WebCore::MediaPlayerPrivateWebM::addAudioRenderer): (WebCore::MediaPlayerPrivateWebM::configureVideoRenderer): (WebCore::MediaPlayerPrivateWebM::setVideoRenderer): * Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.h: We were relying on the first video frame being enqueued to determine the dimensions of the video. We'll now instead rely on the container's track data. So we make public the width and height function. Canonical link: https://commits.webkit.org/281554@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
[webkit-changes] [WebKit/WebKit] 082067: SourceBuffer will always perform a sync call to GP...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 082067e37acd774037dc66d5f3e2dd4cfe66a3f0 https://github.com/WebKit/WebKit/commit/082067e37acd774037dc66d5f3e2dd4cfe66a3f0 Author: Jean-Yves Avenard Date: 2024-07-24 (Wed, 24 Jul 2024) Changed paths: A LayoutTests/media/media-source/media-managedmse-seek-and-evictable-expected.txt A LayoutTests/media/media-source/media-managedmse-seek-and-evictable.html M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/testing/Internals.cpp M Source/WebCore/testing/Internals.h M Source/WebCore/testing/Internals.idl Log Message: --- SourceBuffer will always perform a sync call to GPU process when there's a need to evict content. https://bugs.webkit.org/show_bug.cgi?id=276999 rdar://132402500 Reviewed by Youenn Fablet. Prior 275380@main, eviction was performed synchronously and the eviction data algorithm would evict 3s of data at a time until there was sufficient buffer space available for the appendBuffer operation to complete. In 275380@main, we pre-calculated how much data could be removed in total. However, the calculation incorrectly looked at the initial 3s of removable data only. Which would make the SourceBuffer always consider that no data was evictable preventing an asynchronous eviction to occur and instead generating a sync call to SourceBufferPrivate::evictData. Added tests. * LayoutTests/media/media-source/media-managedmse-seek-and-evictable-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-seek-and-evictable.html: Added. * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::evictableSize const): * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::seekToTime): (WebCore::SourceBufferPrivate::computeEvictionData): * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::evictableSize): * Source/WebCore/testing/Internals.h: * Source/WebCore/testing/Internals.idl: Canonical link: https://commits.webkit.org/281326@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
[webkit-changes] [WebKit/WebKit] d89835: Media plays with blank screen on first load
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d898352e05bd36bab7de26c2987755a03350d4a4 https://github.com/WebKit/WebKit/commit/d898352e05bd36bab7de26c2987755a03350d4a4 Author: Jean-Yves Avenard Date: 2024-07-18 (Thu, 18 Jul 2024) Changed paths: A LayoutTests/media/media-source/content/test-vp8-24fps-manifest.json A LayoutTests/media/media-source/content/test-vp8-24fps.webm A LayoutTests/media/media-source/media-managedmse-video-with-poster-expected.html A LayoutTests/media/media-source/media-managedmse-video-with-poster.html A LayoutTests/media/media-vp8-webm-with-poster-expected.html A LayoutTests/media/media-vp8-webm-with-poster.html M LayoutTests/platform/ios/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm Log Message: --- Media plays with blank screen on first load https://bugs.webkit.org/show_bug.cgi?id=276537 rdar://130231703 Reviewed by Jer Noble. The AVPlayerLayer may not have been created yet by the time we setup the video fullscreen. We ensure that the AVPlayerLayer has been created first. Tests added. * LayoutTests/media/media-source/content/test-vp8-24fps-manifest.json: Added. * LayoutTests/media/media-source/content/test-vp8-24fps.webm: Added. The Simulator in the iOS 17 simulator doesn't support mp4, h264 nor vp9. So add a vp8/webm video that doesn't rely on CoreMedia for playback so we can test. * LayoutTests/media/media-source/media-managedmse-video-with-poster-expected.html: Added. * LayoutTests/media/media-source/media-managedmse-video-with-poster.html: Added. * LayoutTests/media/media-vp8-webm-with-poster-expected.html: Added. * LayoutTests/media/media-vp8-webm-with-poster.html: Added. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk1/TestExpectations: Skip test on wk1, we don't have MMS support there. * Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm: (WebKit::VideoPresentationManagerProxy::setupFullscreenWithID): Canonical link: https://commits.webkit.org/281083@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
[webkit-changes] [WebKit/WebKit] cbbcae: MediaSession artwork only uses the first item in t...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cbbcae6e1ae3ca3c2b11a499fa133b07746e2820 https://github.com/WebKit/WebKit/commit/cbbcae6e1ae3ca3c2b11a499fa133b07746e2820 Author: Jean-Yves Avenard Date: 2024-07-09 (Tue, 09 Jul 2024) Changed paths: M Source/WebCore/Modules/mediasession/MediaMetadata.cpp M Source/WebCore/Modules/mediasession/MediaMetadata.h Log Message: --- MediaSession artwork only uses the first item in the artwork array https://bugs.webkit.org/show_bug.cgi?id=276351 rdar://81160539 Reviewed by Youenn Fablet. If `sizes` metadata artwork attribute is provided we will use them to determine the "best" image to select. We do so by giving each resolution a score between 0 and 1. We aim to download an image that is 512x512 with an aspect ratio of 1. If the `sizes` attribute contains invalid content or if not provided, we will iterate through all the available images and download them. We will then either select the one with the highest score, or the first one found with a resolution greater than 512 pixels. Test will be added once https://bugs.webkit.org/show_bug.cgi?id=276133 lands as it adds some internal APIs to check which URL was selected with Now Playing. For now, manually tested. * Source/WebCore/Modules/mediasession/MediaMetadata.cpp: (WebCore::MediaMetadata::imageDimensionsScore const): (WebCore::MediaMetadata::refreshArtworkImage): (WebCore::MediaMetadata::tryNextArtworkImage): * Source/WebCore/Modules/mediasession/MediaMetadata.h: Canonical link: https://commits.webkit.org/280804@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
[webkit-changes] [WebKit/WebKit] 09f843: [VISIONOS] Audio from videos in Coursera through t...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 09f843b2c1b425e64eb641addb798b08c62f1239 https://github.com/WebKit/WebKit/commit/09f843b2c1b425e64eb641addb798b08c62f1239 Author: Jean-Yves Avenard Date: 2024-07-05 (Fri, 05 Jul 2024) Changed paths: M Source/WTF/wtf/PlatformHave.h Log Message: --- [VISIONOS] Audio from videos in Coursera through the Safari browser is just static noise https://bugs.webkit.org/show_bug.cgi?id=276239 rdar://127270001 Reviewed by Tim Horton. Enable variable packet support for Opus and Vorbis on visionOS. * Source/WTF/wtf/PlatformHave.h: Canonical link: https://commits.webkit.org/280676@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
[webkit-changes] [WebKit/WebKit] e5a735: [WEBM] Seeking is broken
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e5a7357eaea5e5d45b18a74ebb0d6a0c5299fbb4 https://github.com/WebKit/WebKit/commit/e5a7357eaea5e5d45b18a74ebb0d6a0c5299fbb4 Author: Jean-Yves Avenard Date: 2024-07-03 (Wed, 03 Jul 2024) Changed paths: A LayoutTests/media/media-vp8-webm-seek-to-start-expected.html A LayoutTests/media/media-vp8-webm-seek-to-start.html M LayoutTests/platform/mac-site-isolation/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm Log Message: --- [WEBM] Seeking is broken https://bugs.webkit.org/show_bug.cgi?id=276171 rdar://128620836 Reviewed by Jer Noble and Youenn Fablet. Regression was introduced in 273109@main We never flushed the AVSampleBufferDisplayLayer nor re-enqueued new frames to be displayed when seeking backward. Added test * LayoutTests/media/media-vp8-webm-seek-to-start-expected.html: Added. * LayoutTests/media/media-vp8-webm-seek-to-start.html: Added. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::seekInternal): Canonical link: https://commits.webkit.org/280648@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
[webkit-changes] [WebKit/WebKit] 99e94b: REGRESSION (279977@main): [ macOS ] TestWebKitAPI....
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 99e94b10377c114f50e450119fa3115882099130 https://github.com/WebKit/WebKit/commit/99e94b10377c114f50e450119fa3115882099130 Author: Jean-Yves Avenard Date: 2024-06-28 (Fri, 28 Jun 2024) Changed paths: M Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.html Log Message: --- REGRESSION (279977@main): [ macOS ] TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=275750 rdar://130299367 Reviewed by Eric Carlson. The API test checks that as soon as we call `video.play()` the display sleep assertion will be held. However, following 279977@main we only do so if the media element is actually playing. At the time play() is called, playback doesn't start synchronously and will occur shortly after. So instead we wait until the current time has progressed slightly to check the display assertion. * Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.html: Canonical link: https://commits.webkit.org/280463@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
[webkit-changes] [WebKit/WebKit] d03d3a: REGRESSION (275831@main): Music video can't be pla...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d03d3a51627299d0e4de746b80889edf43fe93a5 https://github.com/WebKit/WebKit/commit/d03d3a51627299d0e4de746b80889edf43fe93a5 Author: Jean-Yves Avenard Date: 2024-06-12 (Wed, 12 Jun 2024) Changed paths: A LayoutTests/media/picture-in-picture/video-playback-system-interruption-and-resume-expected.txt A LayoutTests/media/picture-in-picture/video-playback-system-interruption-and-resume.html M Source/WebCore/platform/audio/PlatformMediaSession.cpp M Source/WebCore/platform/audio/PlatformMediaSession.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- REGRESSION (275831@main): Music video can't be played after tapping music video in Music app https://bugs.webkit.org/show_bug.cgi?id=275391 rdar://128055030 Reviewed by Jer Noble. Commit 275831@main exposed two long-standing and existing issue: 1- When the video is paused following a system interruption, currentTime can continue to progress despite the new video rate being 0. 2- The HTMLMediaElement can incorrectly resume playback of a paused video. 1) was due to MediaPlayerPrivateAVFObjC::paused() returning false as it only checks if the AVPlayer status was AVPlayerTimeControlStatusPaused. This caused the default `timeIsProgressing()` implementation to return true ; hence the time estimation in the content process to continue. 2) When the PlatformMediaSession was receiving an interruption notification, it would be ignored on start, but not on end, which would resume playback. Add test. * LayoutTests/media/picture-in-picture/video-playback-system-interruption-and-resume-expected.txt: Added. * LayoutTests/media/picture-in-picture/video-playback-system-interruption-and-resume.html: Added. * Source/WebCore/platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::activeInterruptionCount const): We add a flag indicating if the notification was ignored, in order to determine if playback needs to be resumed later. (WebCore::PlatformMediaSession::interruptionType const): (WebCore::PlatformMediaSession::beginInterruption): (WebCore::PlatformMediaSession::endInterruption): (WebCore::PlatformMediaSession::blockedBySystemInterruption const): * Source/WebCore/platform/audio/PlatformMediaSession.h: Add method. (WebCore::PlatformMediaSession::interruptionCount const): Deleted. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::rateChanged): Add logging Canonical link: https://commits.webkit.org/279977@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
[webkit-changes] [WebKit/WebKit] 77966f: [visionOS] no VP8 or VP9 available in visionOS VM.
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 77966f5b8e272f8b790a223fc21c036dcf857b1c https://github.com/WebKit/WebKit/commit/77966f5b8e272f8b790a223fc21c036dcf857b1c Author: Jean-Yves Avenard Date: 2024-06-07 (Fri, 07 Jun 2024) Changed paths: M LayoutTests/media/vp9.html M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp M Source/WebCore/platform/audio/PlatformMediaSessionManager.h M Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm M Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h M Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm M Source/WebKit/GPUProcess/GPUProcess.cpp M Source/WebKit/GPUProcess/GPUProcess.h M Source/WebKit/GPUProcess/GPUProcessPreferences.cpp M Source/WebKit/GPUProcess/GPUProcessPreferences.h M Source/WebKit/GPUProcess/GPUProcessPreferences.serialization.in M Source/WebKit/Shared/WebPageCreationParameters.h M Source/WebKit/Shared/WebPageCreationParameters.serialization.in M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/WebProcess/WebPage/WebPage.cpp Log Message: --- [visionOS] no VP8 or VP9 available in visionOS VM. https://bugs.webkit.org/show_bug.cgi?id=275204 rdar://129329733 Reviewed by Youenn Fablet. VP8 and VP9 codecs are currently not available on visionOS VM making testing difficult. The actual hardware has HW acceleration for VP9 and VP8 is available in VideoToolbox. We add an internal web preference to always enable software decoders. On machines with no VP8/VP9 decoder we will fallback on the WebCoreDecompressionSession and the WebRTC software decoders. There's no current testing infrastructure for this configuration. The underlying bug is tracked under rdar://129329733 * LayoutTests/media/vp9.html: rename preference. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp: (WebCore::PlatformMediaSessionManager::setSWDecoderAlwaysEnabled): (WebCore::PlatformMediaSessionManager::swDecoderAlwaysEnabled): (WebCore::PlatformMediaSessionManager::setShouldEnableVP9SWDecoder): Deleted. (WebCore::PlatformMediaSessionManager::shouldEnableVP9SWDecoder): Deleted. * Source/WebCore/platform/audio/PlatformMediaSessionManager.h: * Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::ensureCodecsRegistered): * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.h: * Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm: (WebCore::VP9TestingOverrides::setSWDecoderAlwaysEnabled): (WebCore::isSWDecoderAlwaysEnabled): (WebCore::isVP9DecoderAvailable): (WebCore::isVP8DecoderAvailable): (WebCore::isVP9CodecConfigurationRecordSupported): (WebCore::computeVPParameters): * Source/WebKit/GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::updateGPUProcessPreferences): * Source/WebKit/GPUProcess/GPUProcess.h: * Source/WebKit/GPUProcess/GPUProcessPreferences.cpp: (WebKit::GPUProcessPreferences::copyEnabledWebPreferences): * Source/WebKit/GPUProcess/GPUProcessPreferences.h: * Source/WebKit/GPUProcess/GPUProcessPreferences.serialization.in: * Source/WebKit/Shared/WebPageCreationParameters.h: * Source/WebKit/Shared/WebPageCreationParameters.serialization.in: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::m_unifiedTextReplacementController): Canonical link: https://commits.webkit.org/279806@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
[webkit-changes] [WebKit/WebKit] a6f08a: Use PromiseConverter for Media IPC promises where ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a6f08a128028cea1a82e0b4ce7ed08e14b712b6d https://github.com/WebKit/WebKit/commit/a6f08a128028cea1a82e0b4ce7ed08e14b712b6d Author: Jean-Yves Avenard Date: 2024-06-06 (Thu, 06 Jun 2024) Changed paths: M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/MediaPromiseTypes.h M Source/WebCore/platform/graphics/SourceBufferPrivate.h M Source/WebCore/testing/Internals.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp M Source/WebKit/Platform/IPC/Connection.h M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp Log Message: --- Use PromiseConverter for Media IPC promises where useful https://bugs.webkit.org/show_bug.cgi?id=275056 rdar://129161680 Reviewed by Youenn Fablet. We use PromiseConverter in Media code so as to translate to media NativePromise from IPC ones. We introduce a MediaPromiseConverter for that purpose. We use it in Remote objects. We update SourceBuffer::SamplesPromise to take a PlatformMediaError instead of an int. This allows to reuse MediaPromiseConverter a bit more. We update Internals::bufferedSamplesForTrackId and Internals::enqueuedSamplesForTrackID to test for potential errors and reject the JS promise accordingly. We also update SourceBufferPrivateRemote::bufferedSamplesForTrackId and SourceBufferPrivateRemote::enqueuedSamplesForTrackID to reject in case of IPC error. This is ok as this is a testing API only. Fly-by: remove no longer used Connection::sendWithPromisedReplyOnDispatcher * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/platform/MediaPromiseTypes.h: (WebCore::MediaErrorPromiseConverter::convertError): * Source/WebCore/platform/graphics/SourceBufferPrivate.h: * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::bufferedSamplesForTrackId): (WebCore::Internals::enqueuedSamplesForTrackID): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::commitAllTransactions): * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp: (WebKit::RemoteMediaSourceProxy::waitForTarget): (WebKit::RemoteMediaSourceProxy::seekToTime): * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp: (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDidReceiveInitializationSegment): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateDurationChanged): (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateBufferedChanged): * Source/WebKit/Platform/IPC/Connection.h: (IPC::Connection::sendWithPromisedReply): (IPC::Connection::sendWithPromisedReplyOnDispatcher): Deleted. * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::removeCodedFrames): (WebKit::SourceBufferPrivateRemote::setMaximumBufferSize): (WebKit::SourceBufferPrivateRemote::computeSeekTime): (WebKit::SourceBufferPrivateRemote::bufferedSamplesForTrackId): (WebKit::SourceBufferPrivateRemote::enqueuedSamplesForTrackID): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: * Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp: Canonical link: https://commits.webkit.org/279768@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
[webkit-changes] [WebKit/WebKit] ada9ed: [visionOS] In Firefox, YouTube videos immediately ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ada9edd4a1898e2870f3d09f50f1aefd3cbd039c https://github.com/WebKit/WebKit/commit/ada9edd4a1898e2870f3d09f50f1aefd3cbd039c Author: Jean-Yves Avenard Date: 2024-05-30 (Thu, 30 May 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm M Source/WebKit/UIProcess/WebPageProxy.cpp Log Message: --- [visionOS] In Firefox, YouTube videos immediately exit full screen https://bugs.webkit.org/show_bug.cgi?id=274458 rdar://12214 Reviewed by Jer Noble. The primary cause for fullscreen to immediately exit was a typo in the use of the PLATFORM macro which caused requestHideAndExitFullscreen() to be immediately called once we had entered fullscreen. Then we had two issues that were revealed once the primary issue was fixed. When running in iOS compatibility mode, once we entered fullscreen we would either remove the player from the video layer (CRABS) or teardown the video layer (MSE). To avoid this, we check if a FigVideoTargetRef is set, which indicate that the application isn't running in iOS compatibility mode and a LMK isn't in use. Manually tested MSE and CRABS, for both app in both native (Safari) and compatibility mode (Firefox) * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedVideoMode const): (WebCore::MediaPlayerPrivateAVFoundationObjC::isInFullscreenOrPictureInPictureChanged): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isInFullscreenOrPictureInPictureChanged): * Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm: (WebCore::VideoPresentationInterfaceIOS::doSetup): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewDidLeaveWindow): Fix typo and replace with PLATFORM(VISION). This caused to immediately exit fullscreen as soon as we entered fullscreen. Canonical link: https://commits.webkit.org/279558@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
[webkit-changes] [WebKit/WebKit] 0a505c: [WK1] iOS WK1 application crashes after loading media
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0a505cbe327dcfe2c7efe4897bf07ac3532b54fb https://github.com/WebKit/WebKit/commit/0a505cbe327dcfe2c7efe4897bf07ac3532b54fb Author: Jean-Yves Avenard Date: 2024-05-30 (Thu, 30 May 2024) Changed paths: M Source/WTF/WTF.xcodeproj/project.pbxproj M Source/WTF/wtf/CMakeLists.txt M Source/WTF/wtf/Forward.h A Source/WTF/wtf/MainThreadDispatcher.cpp A Source/WTF/wtf/MainThreadDispatcher.h M Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.h M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm M Source/WebKit/GPUProcess/media/RemoteMediaResourceLoader.h Log Message: --- [WK1] iOS WK1 application crashes after loading media https://bugs.webkit.org/show_bug.cgi?id=274888 rdar://128549043 Reviewed by Youenn Fablet. In 273804@main we added the possibility to perform the media networking operation off the main thread. The PlatformResourceMediaLoader was made to take a WorkQueue on which the operations were to be performed. For builds without a GPU process or WK1, we used the WorkQueue::main(). However WorkQueue::main() isn't handling the subtelties related to the Web thread vs UI thread. This triggered a RELEASE_ASSERT(isMainThread()) as isMainThread() with WK1 on iOS checks that we are on the WebThread. So instead rather than using WorkQueues we use RefCountedSerialFunctionDispatcher and we introduce MainThreadDispatcher which is a RCSerialFunctionDispatcher that will dispatch using runOnMainThread(). Covered by existing tests. * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/CMakeLists.txt: * Source/WTF/wtf/Forward.h: * Source/WTF/wtf/MainThreadDispatcher.cpp: Added. (WTF::MainThreadDispatcher::singleton): (WTF::MainThreadDispatcher::isCurrent const): (WTF::MainThreadDispatcher::dispatch): (WTF::MainThreadDispatcher::ref const): (WTF::MainThreadDispatcher::deref const): * Source/WTF/wtf/MainThreadDispatcher.h: Added. * Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h: (WebCore::PlatformMediaResourceLoader::targetDispatcher): (WebCore::PlatformMediaResourceLoader::targetQueue): Deleted. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): * Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: * Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::PlatformResourceMediaLoader::PlatformResourceMediaLoader): (WebCore::PlatformResourceMediaLoader::stop): (WebCore::PlatformResourceMediaLoader::responseReceived): (WebCore::PlatformResourceMediaLoader::loadFailed): (WebCore::PlatformResourceMediaLoader::loadFinished): (WebCore::PlatformResourceMediaLoader::dataReceived): (WebCore::DataURLResourceMediaLoader::DataURLResourceMediaLoader): (WebCore::WebCoreAVFResourceLoader::create): (WebCore::WebCoreAVFResourceLoader::WebCoreAVFResourceLoader): (WebCore::WebCoreAVFResourceLoader::stopLoading): (WebCore::WebCoreAVFResourceLoader::responseReceived): (WebCore::WebCoreAVFResourceLoader::loadFailed): (WebCore::WebCoreAVFResourceLoader::loadFinished): (WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer): * Source/WebCore/platform/network/cocoa/RangeResponseGenerator.h: * Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm: (WebCore::RangeResponseGenerator::RangeResponseGenerator): (WebCore::RangeResponseGenerator::map): (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived): (WebCore::RangeResponseGenerator::giveResponseToTasksWithFinishedRanges): (WebCore::RangeResponseGenerator::willHandleRequest): (WebCore::RangeResponseGenerator::willSynthesizeRangeResponses): * Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h: * Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionTaskTransactionMetrics _initWithMetrics:onTarget
[webkit-changes] [WebKit/WebKit] 37d347: [Monterey] Videos don't fully render in LinkedIn n...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 37d3475208d6a5f45271240c735fb81af0afaa88 https://github.com/WebKit/WebKit/commit/37d3475208d6a5f45271240c735fb81af0afaa88 Author: Jean-Yves Avenard Date: 2024-05-29 (Wed, 29 May 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm Log Message: --- [Monterey] Videos don't fully render in LinkedIn news feed https://bugs.webkit.org/show_bug.cgi?id=274812 rdar://127264745 Reviewed by Youenn Fablet. Video frames were not presented as when a requestVideoFrameCallback operation is pending we do not create the required AVSampleBufferDisplayLayer. This is a regression from 252893@main. On OS that do not support [AVSBDL copyDisplayedPixelBuffer] (Monterey and earlier), we create a WebCoreDecompressionSession in place of a AVSBDL to decode the video frames. But those frames are never rendered to screen. The (incorrect) assumption was that when using rVFC we would always use a canvas or WebGL context to paint the video frames. For now we revert the line introduced by 252893@main that while fixing rVFC broke playback. rVFC was broken anyway on Monterey and earlier (you never get the expected frame). No test, as we no longer have infrastructure in place to check on specific Monterey code path. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldEnsureLayerOrVideoRenderer const): Canonical link: https://commits.webkit.org/279474@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
[webkit-changes] [WebKit/WebKit] d72323: REGRESSION (iPadOS 17.5): Audio distortion occurs ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d72323075072a471f67c1d17890c475999735f67 https://github.com/WebKit/WebKit/commit/d72323075072a471f67c1d17890c475999735f67 Author: Jean-Yves Avenard Date: 2024-05-28 (Tue, 28 May 2024) Changed paths: M Source/WebCore/platform/audio/SharedAudioDestination.cpp Log Message: --- REGRESSION (iPadOS 17.5): Audio distortion occurs when using AudioContext with a sample rate of 44100Hz and an AudioWorklet https://bugs.webkit.org/show_bug.cgi?id=274507 rdar://128551401 Reviewed by Jer Noble. Wait until render has completed on worklet thread before processing the next one. * Source/WebCore/platform/audio/SharedAudioDestination.cpp: (WebCore::SharedAudioDestination::sharedRender): Canonical link: https://commits.webkit.org/279409@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
[webkit-changes] [WebKit/WebKit] 4ec5cd: [visionOS] In Firefox, YouTube videos immediately ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4ec5cdeedc10b597d41c3c5ecd264c62e2a7e007 https://github.com/WebKit/WebKit/commit/4ec5cdeedc10b597d41c3c5ecd264c62e2a7e007 Author: Jean-Yves Avenard Date: 2024-05-22 (Wed, 22 May 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm M Source/WebKit/UIProcess/WebPageProxy.cpp Log Message: --- [visionOS] In Firefox, YouTube videos immediately exit full screen https://bugs.webkit.org/show_bug.cgi?id=274458 rdar://12214 Reviewed by Jer Noble. The primary cause for fullscreen to immediately exit was a typo in the use of the PLATFORM macro which caused requestHideAndExitFullscreen() to be immediately called once we had entered fullscreen. Then we had two issues that were revealed once the primary issue was fixed. When running in iOS compatibility mode, once we entered fullscreen we would either remove the player from the video layer (CRABS) or teardown the video layer (MSE). To avoid this, we check if a FigVideoTargetRef is set, which indicate that the application isn't running in iOS compatibility mode and a LMK isn't in use. Manually tested MSE and CRABS, for both app in both native (Safari) and compatibility mode (Firefox) * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedVideoMode const): (WebCore::MediaPlayerPrivateAVFoundationObjC::isInFullscreenOrPictureInPictureChanged): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isInFullscreenOrPictureInPictureChanged): * Source/WebCore/platform/ios/VideoPresentationInterfaceIOS.mm: (WebCore::VideoPresentationInterfaceIOS::doSetup): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewDidLeaveWindow): Fix typo and replace with PLATFORM(VISION). This caused to immediately exit fullscreen as soon as we entered fullscreen. Canonical link: https://commits.webkit.org/279112@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
[webkit-changes] [WebKit/WebKit] fb01f8: [MSE] If src attribute is defined, ignore source a...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fb01f8840fd2c2484f67dcc54ab9d5be35946fb5 https://github.com/WebKit/WebKit/commit/fb01f8840fd2c2484f67dcc54ab9d5be35946fb5 Author: Jean-Yves Avenard Date: 2024-05-15 (Wed, 15 May 2024) Changed paths: M LayoutTests/media/media-source/media-managedmse-airplay-expected.txt A LayoutTests/media/media-source/media-managedmse-airplay-withsrc-expected.txt A LayoutTests/media/media-source/media-managedmse-airplay-withsrc.html M LayoutTests/media/media-source/media-managedmse-airplay.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/ios/TestExpectations M Source/WebCore/html/HTMLMediaElement.cpp Log Message: --- [MSE] If src attribute is defined, ignore source alternative https://bugs.webkit.org/show_bug.cgi?id=274195 rdar://128098363 Reviewed by Youenn Fablet and Eric Carlson. Per spec, if a media element has a src attribute defined, `` alternative are ignored. As such we should ignore the presence of the source children if a src attribute is set to determine if the ManagedMediaSource is in open state. * LayoutTests/media/media-source/media-managedmse-airplay-expected.txt: * LayoutTests/media/media-source/media-managedmse-airplay-withsrc-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-airplay-withsrc.html: Copied from LayoutTests/media/media-source/media-managedmse-airplay.html. * LayoutTests/media/media-source/media-managedmse-airplay.html: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/ios/TestExpectations: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::hasWirelessPlaybackTargetAlternative const): Canonical link: https://commits.webkit.org/278834@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
[webkit-changes] [WebKit/WebKit] f729bf: Remove MediaSourcePrivateClient::seeked()
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f729bf5bd7b317e97a21be02717f61246943dbc8 https://github.com/WebKit/WebKit/commit/f729bf5bd7b317e97a21be02717f61246943dbc8 Author: Jean-Yves Avenard Date: 2024-05-12 (Sun, 12 May 2024) Changed paths: M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/MediaSourcePrivateClient.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- Remove MediaSourcePrivateClient::seeked() https://bugs.webkit.org/show_bug.cgi?id=273390 rdar://127218331 Reviewed by Jer Noble. Remove method and instead use MediaPlayerClient::mediaPlayerSeeked method to achieve the same behaviour. * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::seeked): Deleted. * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerSeeked): * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/platform/graphics/MediaSourcePrivate.cpp: (WebCore::MediaSourcePrivate::seeked): Deleted. * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/MediaSourcePrivateClient.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::seeked): Deleted. * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::seeked): Canonical link: https://commits.webkit.org/278667@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
[webkit-changes] [WebKit/WebKit] 6a9c5f: WebM file with Vorbis track plays in burst
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6a9c5f885a1b3eb68c6e3d9fb5b42d84da678190 https://github.com/WebKit/WebKit/commit/6a9c5f885a1b3eb68c6e3d9fb5b42d84da678190 Author: Jean-Yves Avenard Date: 2024-05-12 (Sun, 12 May 2024) Changed paths: M Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp M Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h Log Message: --- WebM file with Vorbis track plays in burst https://bugs.webkit.org/show_bug.cgi?id=273866 rdar://124880261 Reviewed by Eric Carlson. Add support for Block containing multiple frames. Previously we would create as many CMSampleBuffer as found in the block, but all those samples would have the timestamp of the Block. We now accrue the duration of each frame and properly increment the sample's timestamp accordingly. Manually verified that file plays okay * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::WebMParser::OnSimpleBlockBegin): (WebCore::WebMParser::OnSimpleBlockEnd): (WebCore::WebMParser::OnFrame): (WebCore::WebMParser::VideoTrackData::consumeFrameData): (WebCore::WebMParser::AudioTrackData::consumeFrameData): * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h: (WebCore::WebMParser::TrackData::consumeFrameData): Canonical link: https://commits.webkit.org/278665@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
[webkit-changes] [WebKit/WebKit] c610bd: Picture-in-Picture from canvas-sourced video turns...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c610bd1cd7c7c41aad043fc2527683cf4ee6e044 https://github.com/WebKit/WebKit/commit/c610bd1cd7c7c41aad043fc2527683cf4ee6e044 Author: Jean-Yves Avenard Date: 2024-04-27 (Sat, 27 Apr 2024) Changed paths: A LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash-expected.txt A LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash.html M LayoutTests/platform/ipad/TestExpectations M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm Log Message: --- Picture-in-Picture from canvas-sourced video turns black when canvas is resized https://bugs.webkit.org/show_bug.cgi?id=270859 rdar://124479880 Reviewed by Jer Noble. In 262654@main, a workaround was added waiting for the element size to change, assuming that when the size changed, the HostingContextID would always be known. In 262654@main, a proper solution was added that asynchronously waited for the context ID to be available before continuing setting up fullscreen PiP, however it didn't remove the workaround set in 262654@main and as it incorrectly didn't clear the callback it allowed for it to be called multiple times. When used with a MediaStream, there's no initial size change as the size is known upon creation of the canvas. So when the video element was resized, it would attempt to enter fullscreen when we were already in fullscreen. This caused an assertion in debug build and an Obj-C exception would also be thrown when exiting PiP due to the ViewController having already been deleted. This change is in effect a revert of 262654@main. Added test. * LayoutTests/platform/ipad/TestExpectations: On EWS, tests intermittently timeout, works fine locally * LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash-expected.txt: Added. * LayoutTests/media/picture-in-picture/video-resize-requestPictureInPicture-crash.html: Added. * Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h: * Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm: (WebKit::VideoPresentationManager::enterVideoFullscreenForVideoElement): (WebKit::VideoPresentationManager::videoDimensionsChanged): Canonical link: https://commits.webkit.org/278075@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
[webkit-changes] [WebKit/WebKit] 0a047e: ManagedSourceBuffer & BufferedChangeEvent to be ex...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0a047ea1ca602aafaa2cbdf820b298555432d55d https://github.com/WebKit/WebKit/commit/0a047ea1ca602aafaa2cbdf820b298555432d55d Author: Jean-Yves Avenard Date: 2024-04-26 (Fri, 26 Apr 2024) Changed paths: M Source/WebCore/Modules/mediasource/BufferedChangeEvent.idl M Source/WebCore/Modules/mediasource/ManagedSourceBuffer.idl Log Message: --- ManagedSourceBuffer & BufferedChangeEvent to be exposed to 'DedicatedWorker' https://bugs.webkit.org/show_bug.cgi?id=272885 rdar://127041540 Reviewed by Eric Carlson. Exposed interfaces to DedicatedWorker. * Source/WebCore/Modules/mediasource/BufferedChangeEvent.idl: * Source/WebCore/Modules/mediasource/ManagedSourceBuffer.idl: Canonical link: https://commits.webkit.org/278033@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
[webkit-changes] [WebKit/WebKit] 8715d4: REGRESSION(r290676?): [ iOS ] media/video-played-r...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8715d40f1d7038e9f43619d153210883228d17a6 https://github.com/WebKit/WebKit/commit/8715d40f1d7038e9f43619d153210883228d17a6 Author: Jean-Yves Avenard Date: 2024-04-21 (Sun, 21 Apr 2024) Changed paths: M LayoutTests/media/video-played-collapse.html M LayoutTests/media/video-played.js M LayoutTests/platform/ios/TestExpectations M LayoutTests/platform/mac-wk2/TestExpectations M LayoutTests/platform/mac/TestExpectations Log Message: --- REGRESSION(r290676?): [ iOS ] media/video-played-ranges-1.html is a flaky text failure https://bugs.webkit.org/show_bug.cgi?id=238771 rdar://91262784 Reviewed by Eric Carlson. The test failed due to bug 270618 which was fixed in 276761@main. However, amend test as it assumes that the value of currentTime would only progressed by less than 0.01 following a call to play(); pause(); While likely, this isn't guaranteed particularly on a busy sytem as playback progress happens completely in parallel to the main thread. * LayoutTests/media/video-played-ranges-1-expected.txt: * LayoutTests/media/video-played-reset-expected.txt: * LayoutTests/media/video-played.js: (testRanges): * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/277800@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
[webkit-changes] [WebKit/WebKit] 8338d4: HTMLMediaElement.played TimeRanges missing the las...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8338d4d31d30908f186423844c9940b3356fd897 https://github.com/WebKit/WebKit/commit/8338d4d31d30908f186423844c9940b3356fd897 Author: Jean-Yves Avenard Date: 2024-04-18 (Thu, 18 Apr 2024) Changed paths: M LayoutTests/media/video-played-ranges-1-expected.txt M LayoutTests/media/video-played-ranges-1.html M LayoutTests/media/video-played.js M LayoutTests/platform/ios/TestExpectations M Source/WebCore/html/HTMLMediaElement.cpp Log Message: --- HTMLMediaElement.played TimeRanges missing the last range on ended https://bugs.webkit.org/show_bug.cgi?id=271679 rdar://125741797 Reviewed by Eric Carlson. Added TimeRange to `played` TimeRanges once we reach the end of the media. * LayoutTests/media/video-played-ranges-1-expected.txt: * LayoutTests/media/video-played-ranges-1.html: * LayoutTests/media/video-played.js: (pause): (ended): (async playUntilEnded): (videoPlayedMain): * LayoutTests/platform/ios/TestExpectations: Remove expectation as test was flacky due to the use of the GPU process and incorrect time estimation, which was fixed in 276761@main * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Canonical link: https://commits.webkit.org/277706@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
[webkit-changes] [WebKit/WebKit] 2d161e: RemoteImageDecoderAVFProxy does not attribute the ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2d161e7f91ddd559e8f51193cacb7f7198f3a502 https://github.com/WebKit/WebKit/commit/2d161e7f91ddd559e8f51193cacb7f7198f3a502 Author: Jean-Yves Avenard Date: 2024-04-16 (Tue, 16 Apr 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Log Message: --- RemoteImageDecoderAVFProxy does not attribute the video decoder reference frames to Web process https://bugs.webkit.org/show_bug.cgi?id=272720 rdar://115887772 Reviewed by Eric Carlson. Use method added in 276270@main to assign ownership accounting. 276270@main only assigned ownership on video frames decoded with a `VideoDecoder` (VPx and AV1), we extend the functionality to assign ownership for all type, including those decoded by a `VTDecompressionSession` * Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC): (WebCore::ImageDecoderAVFObjC::sampleIsComplete const): * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::assignResourceOwner): (WebCore::WebCoreDecompressionSession::maybeDecodeNextSample): (WebCore::WebCoreDecompressionSession::decodeSampleSync): (WebCore::WebCoreDecompressionSession::initializeVideoDecoder): Canonical link: https://commits.webkit.org/277594@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
[webkit-changes] [WebKit/WebKit] 7d2a7b: [MSE] media element will error appending the same ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7d2a7b505c37c4bdb7863691dd45ac113d3265fc https://github.com/WebKit/WebKit/commit/7d2a7b505c37c4bdb7863691dd45ac113d3265fc Author: Jean-Yves Avenard Date: 2024-03-28 (Thu, 28 Mar 2024) Changed paths: M LayoutTests/http/tests/webcodecs/h264-reordering.html M LayoutTests/media/media-source/content/test-fragmented-manifest.json M LayoutTests/media/media-source/content/test-fragmented.mp4 A LayoutTests/media/media-source/media-managedmse-append-expected.txt A LayoutTests/media/media-source/media-managedmse-append.html M LayoutTests/media/media-source/media-managedmse-resume-after-stall-expected.txt M LayoutTests/media/media-source/media-managedmse-resume-after-stall.html M LayoutTests/media/media-source/media-managedmse-stall-endofstream-expected.txt M LayoutTests/media/media-source/media-managedmse-stall-endofstream.html M LayoutTests/media/media-source/media-source-trackid-change-expected.txt M LayoutTests/media/media-source/media-source-trackid-change.html M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp Log Message: --- [MSE] media element will error appending the same media segment twice https://bugs.webkit.org/show_bug.cgi?id=271685 rdar://125386530 Reviewed by Youenn Fablet and Eric Carlson. The test file test-fragmented.mp4 was actually invalid and had its tfhd's base-data-offset-present flag set to true, which is against the spec as per https://www.w3.org/TR/mse-byte-stream-format-isobmff/#movie-fragment-relative-addressing. This prevented the media segment from being added out of order (or twice). Re-mux the file with the MP4Box utility from the GPAC suite (`MP4Box -flat -dash 1000 -profile onDemand`) Add test that expands on webkit.org/b/270618. Updates existing tests due to slight changes of frames timing. * LayoutTests/http/tests/webcodecs/h264-reordering.html: Amend offsets to new mp4. * LayoutTests/media/media-source/content/test-fragmented-manifest.json: * LayoutTests/media/media-source/content/test-fragmented.mp4: * LayoutTests/media/media-source/media-managedmse-append-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-append.html: Added. * LayoutTests/media/media-source/content/test-fragmented-manifest.json: * LayoutTests/media/media-source/media-managedmse-resume-after-stall-expected.txt: * LayoutTests/media/media-source/media-managedmse-resume-after-stall.html: video and audio track do not exactly end at 3s (audio is slightly behind). Adjust test to reflect the new buffered range. * LayoutTests/media/media-source/media-managedmse-stall-endofstream-expected.txt: * LayoutTests/media/media-source/media-managedmse-stall-endofstream.html: * LayoutTests/media/media-source/media-source-trackid-change-expected.txt: * LayoutTests/media/media-source/media-source-trackid-change.html: update test to adjust offsets into binary mp4 file. Add comments referring to what those offsets are. * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::monitorSourceBuffers): simplify code a bit. Canonical link: https://commits.webkit.org/276821@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
[webkit-changes] [WebKit/WebKit] e77ffd: [MSE] video's currentTime can be further than the ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e77ffd167967c24232e8dcbac584ac1809524c90 https://github.com/WebKit/WebKit/commit/e77ffd167967c24232e8dcbac584ac1809524c90 Author: Jean-Yves Avenard Date: 2024-03-27 (Wed, 27 Mar 2024) Changed paths: M LayoutTests/media/media-source/media-managedmse-noresumeafterpause-expected.txt M LayoutTests/media/media-source/media-managedmse-noresumeafterpause.html A LayoutTests/media/media-source/media-managedmse-resume-after-remove-expected.txt A LayoutTests/media/media-source/media-managedmse-resume-after-remove.html M LayoutTests/media/media-source/media-managedmse-resume-after-stall-expected.txt M LayoutTests/media/media-source/media-managedmse-resume-after-stall.html A LayoutTests/media/media-source/media-managedmse-stall-endofstream-expected.txt A LayoutTests/media/media-source/media-managedmse-stall-endofstream.html M LayoutTests/media/media-source/media-source-fudge-factor-expected.txt M LayoutTests/media/media-source/media-source-fudge-factor.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M LayoutTests/platform/mac/TestExpectations M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp Log Message: --- [MSE] video's currentTime can be further than the gap's start time https://bugs.webkit.org/show_bug.cgi?id=270618 rdar://124186726 Reviewed by Jer Noble. The AVFObjC MSE player relies on using AVSampleBufferRenderSynchronizer which provides the base routines to handle A/V sync, seeking and determining the playback current time. The code used notification listeners such as AVSampleBufferRenderSynchronizerRateDidChangeNotification to determine when the actual playback rate changed to 0. But this notification will be received only if playback was paused through external means such as on iOS "by a phone call or another non-mixable app starting playback". But actually AVSampleBufferRenderSynchronizer never stops otherwise, even when it has run out of data to decode and play such as when there's a gap in the buffered range or even if the currentTime has gone past the media's duration. The MediaSource's monitorSourceBuffer would monitor the current time and the buffered range and would pause the media element if it detected that we no longer had anything to play. However this occurs in the content process while decoding and playback occurs in the GPU process. The inherent latency between the two processes means that the CP would set the readyState to be HaveCurrentData which would make the MediaPlayerPrivateMediaSourceAVFObjC pause playback, but by the time this was received the AVSampleBufferRenderSynchronizer's timebase/clock would have already progressed further than it should have. Worse, in combination with the time clock used by the MediaPlayerPrivateRemote you would end up with nonsensical currentTime, positioned in the middle of a media data gap, causing the readyState to move back to HaveMetadataData. Similarly, you could end up with currentTime being significantly past the media's duration. (When using a debugger, and blocking the GPU process I saw currentTime being further than 90s past where it should have been). To fix this issue, we adds two steps: 1- In the MediaPlayerPrivateRemote, when using MSE we ensure that the currentTime never goes past the start of a gap greater than 2/24th of a second (the SourceBuffer's timeFuzzingFactor), nor past the media's duration. 2- Add stall detections in the MediaPlayerPrivateMediaSourceAVFObjC by using time observers with AVSampleBufferRenderSynchronizer that will immediately pause playback once we reached the start of a gap. To reduce the latency between data being added to the source buffer and the GPU's MediaPlayer being notified that new data got added, we make the SourceBufferPrivate immediately notifies its MediaSourcePrivate's parent that the buffered data has changed. Add tests to ensure that we always stall and fire the waiting event where a
[webkit-changes] [WebKit/WebKit] b7d8be: NEW TEST(276140@main): [ MacOS WK1 Debug ] media/m...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b7d8be7a8274318250bdbb161a6eee6daab33991 https://github.com/WebKit/WebKit/commit/b7d8be7a8274318250bdbb161a6eee6daab33991 Author: Jean-Yves Avenard Date: 2024-03-22 (Fri, 22 Mar 2024) Changed paths: M LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt M LayoutTests/media/media-source/worker/media-managedmse-worker.html M LayoutTests/media/media-source/worker/worker.js M LayoutTests/platform/mac-wk1/TestExpectations A LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-worker-expected.txt M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/platform/MediaStrategy.cpp M Source/WebCore/platform/MediaStrategy.h M Source/WebCore/platform/PlatformStrategies.h M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp M Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h Log Message: --- NEW TEST(276140@main): [ MacOS WK1 Debug ] media/media-source/worker/media-managedmse-worker.html is a constant crash https://bugs.webkit.org/show_bug.cgi?id=271323 rdar://125100787 Reviewed by Youenn Fablet. WebPreferences are always set when running LayoutTests. MediaSource in a Worker is not functional unless the GPU process is active and the MediaPlayers are to run in the GPU process. MediaSource in a Worker can only work with a MediaSourcePrivate that is designed to be thread-safe and at present there's only one kind: MediaSourcePrivateRemote. As it is possible for a WebPreference to be turned on, we need to handle the case where it has been accidentally set on a non-supported platform. To achieve this we add a new MediaStrategy API: `hasThreadSafeSupport()` which will be checked in addition to the `mediaSourceInWorkerEnabled` preference. Updated existing test to ensure that enabling the pref on a non-supported configuration is behaving properly. * LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt: * LayoutTests/media/media-source/worker/media-managedmse-worker.html: * LayoutTests/media/media-source/worker/worker.js: (onmessage): * LayoutTests/platform/mac-wk1/TestExpectations: * LayoutTests/platform/mac-wk1/media/media-source/worker/media-managedmse-worker-expected.txt: Added. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::enabledForContext): (WebCore::MediaSource::canConstructInDedicatedWorker): * Source/WebCore/platform/MediaStrategy.cpp: (WebCore::MediaStrategy::hasThreadSafeMediaSourceSupport const): * Source/WebCore/platform/MediaStrategy.h: * Source/WebCore/platform/PlatformStrategies.h: (WebCore::PlatformStrategies::mediaStrategy): Allow creation of the MediaStrategy object on any threads, in practice this MediaStrategy creation is only ever done on the main thread, but this could be different in the future. * Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.cpp: (WebKit::WebMediaStrategy::createAudioDestination): (WebKit::WebMediaStrategy::createNowPlayingManager const): (WebKit::WebMediaStrategy::hasThreadSafeMediaSourceSupport const): (WebKit::WebMediaStrategy::enableMockMediaSource): * Source/WebKit/WebProcess/GPU/media/WebMediaStrategy.h: Canonical link: https://commits.webkit.org/276534@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
[webkit-changes] [WebKit/WebKit] 5e24bc: duplicate symbol 'WebKit::MediaPlaybackTargetConte...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5e24bce36aec5f4bceb436969be86a5d5d6978b8 https://github.com/WebKit/WebKit/commit/5e24bce36aec5f4bceb436969be86a5d5d6978b8 Author: Jean-Yves Avenard Date: 2024-03-21 (Thu, 21 Mar 2024) Changed paths: M Source/WebKit/Platform/SourcesCocoa.txt Log Message: --- duplicate symbol 'WebKit::MediaPlaybackTargetContextSerialized::platformContext() const https://bugs.webkit.org/show_bug.cgi?id=271369 rdar://125152936 Reviewed by Eric Carlson. The file MediaPlaybackTargetContextSerialized.mm was listed in multiple SourcesCocoa.txt. * Source/WebKit/Platform/SourcesCocoa.txt: Remove link to file. Canonical link: https://commits.webkit.org/276497@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
[webkit-changes] [WebKit/WebKit] 662762: [MSE] Enable MediaSourceInWorkerEnabled flag by de...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 662762bd5b555b6f21ca4212cc2ccfa7b4709fe3 https://github.com/WebKit/WebKit/commit/662762bd5b555b6f21ca4212cc2ccfa7b4709fe3 Author: Jean-Yves Avenard Date: 2024-03-19 (Tue, 19 Mar 2024) Changed paths: M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml Log Message: --- [MSE] Enable MediaSourceInWorkerEnabled flag by default on cocoa platforms https://bugs.webkit.org/show_bug.cgi?id=269527 rdar://123052315 Reviewed by Jer Noble. Enable MSE in a Worker by default on system with MSE and GPU process support. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/276389@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
[webkit-changes] [WebKit/WebKit] 93f630: Add ability to sniff media content should we faile...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 93f6303ff83e5c20dbd79f5e6ae7c8a801ee519d https://github.com/WebKit/WebKit/commit/93f6303ff83e5c20dbd79f5e6ae7c8a801ee519d Author: Jean-Yves Avenard Date: 2024-03-18 (Mon, 18 Mar 2024) Changed paths: M LayoutTests/http/tests/media/video-throttled-load-metadata-expected.txt M LayoutTests/http/tests/media/video-throttled-load-metadata.html A LayoutTests/media/video-src-mp4-blob-expected.txt A LayoutTests/media/video-src-mp4-blob.html A LayoutTests/media/video-src-webm-blob-expected.txt A LayoutTests/media/video-src-webm-blob.html A LayoutTests/media/video-srcobject-mp4-blob-expected.txt A LayoutTests/media/video-srcobject-mp4-blob.html M LayoutTests/platform/mac-wk1/TestExpectations M LayoutTests/platform/mac/TestExpectations M Source/WTF/wtf/NativePromise.h M Source/WebCore/Headers.cmake M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/platform/CommonAtomStrings.h M Source/WebCore/platform/ContentType.cpp M Source/WebCore/platform/ContentType.h M Source/WebCore/platform/PlatformMediaError.cpp M Source/WebCore/platform/PlatformMediaError.h A Source/WebCore/platform/graphics/MIMESniffer.cpp A Source/WebCore/platform/graphics/MIMESniffer.h M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h A Source/WebCore/platform/graphics/MediaResourceSniffer.cpp A Source/WebCore/platform/graphics/MediaResourceSniffer.h M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in M Tools/TestWebKitAPI/CMakeLists.txt M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj A Tools/TestWebKitAPI/Tests/WebCore/MIMESniffer.cpp Log Message: --- Add ability to sniff media content should we failed to play a file or if the provided content type was invalid. https://bugs.webkit.org/show_bug.cgi?id=270975 rdar://problem/124614908 Reviewed by Jer Noble. We have always relied on the server to provide a valid content-type and if that failed we always used the URL's file name extension instead. While the HTML5 specs clearly states that determining the type of a resource should be done through sniffing, this is however a too significant change to enable right away. There are also performance advantages in using the provided content-type: it's typically immediately available. Should the provided content-type be invalid or non-existent (such as with some blobs) playback would have failed. We add a MIMEtype sniffer for media content as per HTML5 specs. Should we fail to play a media using the older content type detection rather than immediately fail, we will also sniff the type as a last attempt before retrying. In order to not unnecessarily retry following a sniffing, we needed to distinguish a format error from a network error which the MediaPlayerPrivateAVFoundationObjC didn't do. As a fly-by fix, we add a way to distinguish the two errors by recording in the WebCoreNSURLSession any network failures. For now will limit sniffing to media element where the src attribute is set (and so exclude element where alternative sources are defined) Added API tests for the mimetype sniffer and tests for webm and mp4 in a blob. * LayoutTests/media/video-src-mp4-blob-expected.txt: Added. * LayoutTests/media/video-src-mp4-blob.html: Added. * LayoutTests/media/video-src-webm-blob-expected.txt: Added. * LayoutTests/media/video-src-webm-blob.html: Added. * LayoutTests/media/video-srcobject-mp4-blob-expected.txt: Added. * LayoutTests/media/video-srcobject-mp4-blob.html: Added. * LayoutTests/http/tests/media/video-throttled-load-metadata-expected.txt: * LayoutTests/http/tests/media/video-throttled-load-metadata.html: The test was racy and could caused the loadedmetadata message to have been received before the worker's message. * LayoutTests/platform/mac-wk1/TestExpectations: * LayoutTests/platform/mac/TestExpectations: Remove failure expectations. Tests were failing as an incorrect content-type was provided. Now that we sniff if the provided content-type was incorrect files can properly play again. * Source/WTF/wtf/NativePromise.h: * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/html/HTMLMediaElement.cpp: Move all the logic from MediaPlayer related
[webkit-changes] [WebKit/WebKit] dcc6d9: Out-of-flow line break box does not initiate rende...
Suzuki Date: 2024-03-15 (Fri, 15 Mar 2024) Changed paths: A JSTests/stress/attribute-custom-accessor.js M Source/JavaScriptCore/bytecode/PropertyCondition.cpp Log Message: --- [JSC] PropertyCondition::isValidValueForAttributes should handle custom accessor and custom value https://bugs.webkit.org/show_bug.cgi?id=266695 rdar://119854137 Reviewed by Mark Lam. PropertyCondition::isValidValueForAttributes only handled accessors and values. And it didn't handle custom accessor / custom values. This patch changes it so that we can check custom accessor / custom value cases correctly. * JSTests/stress/attribute-custom-accessor.js: Added. (async asyncSleep): (setHasBeenDictionary): (watchToJSONForReplacements): (async watchLastMatchForReplacements.getLastMatch): (async watchLastMatchForReplacements): (const.target.toJSON): (opt): (async main): * Source/JavaScriptCore/bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isValidValueForAttributes): Originally-landed-as: 272448.6@safari-7618-branch (24d1c08b9dfa). rdar://124557469 Canonical link: https://commits.webkit.org/276183@main Commit: 17c0ad98bb1ce2d5df631bca49e13809b9ecf03b https://github.com/WebKit/WebKit/commit/17c0ad98bb1ce2d5df631bca49e13809b9ecf03b Author: Matthew Finkel Date: 2024-03-15 (Fri, 15 Mar 2024) Changed paths: A LayoutTests/http/tests/security/file-system-access-via-dataTransfer-expected.txt A LayoutTests/http/tests/security/file-system-access-via-dataTransfer.html M Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp Log Message: --- Ensure Filesystem root path is not empty https://bugs.webkit.org/show_bug.cgi?id=266703 rdar://119813501 Reviewed by Chris Dumez. When the root path is empty, then the file's name can define an arbitrary filesystem path. This change ensures that the path is non-empty, therefore the virtual filesystem must be defined under a directory that the user selected. * LayoutTests/http/tests/security/file-system-access-via-dataTransfer-expected.txt: Added. * LayoutTests/http/tests/security/file-system-access-via-dataTransfer.html: Added. * Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::getEntry): (WebCore::DOMFileSystem::getFile): Originally-landed-as: 272448.2@safari-7618-branch (18fd76f8a016). rdar://124557625 Canonical link: https://commits.webkit.org/276184@main Commit: 5fb50e505ac984aa68a54d087bc762ab72c8e127 https://github.com/WebKit/WebKit/commit/5fb50e505ac984aa68a54d087bc762ab72c8e127 Author: Jean-Yves Avenard Date: 2024-03-15 (Fri, 15 Mar 2024) Changed paths: M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp Log Message: --- Block "setMediaOverridesForTesting" media IPC endpoints when not testing and instead reset values https://bugs.webkit.org/show_bug.cgi?id=268731 rdar://122218365 Reviewed by Youenn Fablet. The fix in https://commits.webkit.org/272448.445@safari-7618-branch was insufficient as the setMediaOverridesForTesting IPC endpoints is also used to reset the flags to their default. So rather than disabling the IPC endpoints altogether we restrict its use to only reset the default values (which are all unset). * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::setMediaOverridesForTesting): * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in: Originally-landed-as: 272448.473@safari-7618-branch (00b3f3ccf06e). rdar://124557967 Canonical link: https://commits.webkit.org/276185@main Compare: https://github.com/WebKit/WebKit/compare/6f20a053abaf...5fb50e505ac9 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
[webkit-changes] [WebKit/WebKit] 321003: [MSE] ManagedMediaSource isn't usable in a Dedicat...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 321003e22c50fc0c6997243a1a81cca118d16645 https://github.com/WebKit/WebKit/commit/321003e22c50fc0c6997243a1a81cca118d16645 Author: Jean-Yves Avenard Date: 2024-03-15 (Fri, 15 Mar 2024) Changed paths: A LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt A LayoutTests/media/media-source/worker/media-managedmse-worker.html A LayoutTests/media/media-source/worker/worker.js M LayoutTests/platform/glib/TestExpectations M Source/WebCore/Modules/mediasource/MediaSourceHandle.cpp M Source/WebCore/Modules/mediasource/MediaSourceHandle.h M Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp Log Message: --- [MSE] ManagedMediaSource isn't usable in a DedicatedWorker https://bugs.webkit.org/show_bug.cgi?id=270891 rdar://124499286 Reviewed by Youenn Fablet. The HTMLMediaElement was never attached to the MediaSource (or ManagedMediaSource) running in the dedicated worker. While this didn't prevent MediaSource to work, it would have caused the ManagedMediaSource to never move to the `Open` readyState as the MMS need to check the HTMLMediaElement if an AirPlay alternative is present. The MediaSourceHandle uses the ensureOnDispatcher utility to dispatch to the MediaSource dispatcher, which will not run the function should MediaSource::isClosed() return true. We need to force the function to run when we attach the HTMLMediaElement which in turn will move the readyState to `open`. Added test. * LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt: Added. * LayoutTests/media/media-source/worker/media-managedmse-worker.html: Added. * LayoutTests/media/media-source/worker/worker.js: Added. (logToMain): (onmessage): * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/Modules/mediasource/MediaSourceHandle.cpp: (WebCore::MediaSourceHandle::ensureOnDispatcher const): * Source/WebCore/Modules/mediasource/MediaSourceHandle.h: * Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp: (WebCore::MediaSourceInterfaceWorker::attachToElement): Canonical link: https://commits.webkit.org/276140@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
[webkit-changes] [WebKit/WebKit] a7b863: Safari 16 cannot play WebM Opus from blob URL (bre...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a7b863a49945946c913e6e194ec047da844094a4 https://github.com/WebKit/WebKit/commit/a7b863a49945946c913e6e194ec047da844094a4 Author: Jean-Yves Avenard Date: 2024-03-14 (Thu, 14 Mar 2024) Changed paths: A LayoutTests/http/tests/media/video-src-mp4-blob-expected.txt A LayoutTests/http/tests/media/video-src-mp4-blob.html A LayoutTests/http/tests/media/video-src-webm-blob-expected.txt A LayoutTests/http/tests/media/video-src-webm-blob.html A LayoutTests/http/tests/media/video-srcobject-webm-blob-expected.txt A LayoutTests/http/tests/media/video-srcobject-webm-blob.html M LayoutTests/http/tests/media/white.webm M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/fileapi/ThreadableBlobRegistry.cpp M Source/WebCore/fileapi/ThreadableBlobRegistry.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/platform/network/BlobRegistry.h M Source/WebCore/platform/network/BlobRegistryImpl.cpp M Source/WebCore/platform/network/BlobRegistryImpl.h M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in M Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp M Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp M Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h M Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm Log Message: --- Safari 16 cannot play WebM Opus from blob URL (breaks Construct 3) https://bugs.webkit.org/show_bug.cgi?id=245428 rdar://100205028 Reviewed by Youenn Fablet. The Blob's content-type wasn't passed to the MediaPlayer preventing playback to succeed. Similarly, when a Blob's URL was provided, an empty content-type was used. We add a BlobRegistry::blobType method, which similar to blobSize will fetch the content-type from the BlobData in the network process. Added tests. * LayoutTests/http/tests/media/video-src-mp4-blob-expected.txt: Added. * LayoutTests/http/tests/media/video-src-mp4-blob.html: Added. * LayoutTests/http/tests/media/video-src-webm-blob-expected.txt: Added. * LayoutTests/http/tests/media/video-src-webm-blob.html: Added. * LayoutTests/http/tests/media/video-srcobject-webm-blob-expected.txt: Added. * LayoutTests/http/tests/media/video-srcobject-webm-blob.html: Added. * LayoutTests/http/tests/media/white.webm: File was a mkv with a h264 video track. Re-encoded it to use a vp9 track instead. * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::blobType): * Source/WebCore/fileapi/ThreadableBlobRegistry.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/platform/network/BlobRegistry.h: * Source/WebCore/platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::blobType): * Source/WebCore/platform/network/BlobRegistryImpl.h: * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::blobType): * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h: * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in: * Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp: (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): * Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::blobType): * Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h: * Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm: Canonical link: https://commits.webkit.org/276136@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
[webkit-changes] [WebKit/WebKit] dd8b32: [MSE in Worker] ASSERT(canSafelyBeUsed());
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: dd8b32e43a1aca81e73e37b9b0378966616d27bc https://github.com/WebKit/WebKit/commit/dd8b32e43a1aca81e73e37b9b0378966616d27bc Author: Jean-Yves Avenard Date: 2024-03-14 (Thu, 14 Mar 2024) Changed paths: M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h Log Message: --- [MSE in Worker] ASSERT(canSafelyBeUsed()); https://bugs.webkit.org/show_bug.cgi?id=270894 rdar://124500515 Reviewed by Youenn Fablet. Only ever access the MediaSource::m_mediaElement member on the main thread. Covered by existing tests. * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::detachFromElement): (WebCore::MediaSource::attachToElement): (WebCore::MediaSource::stop): * Source/WebCore/Modules/mediasource/MediaSource.h: We can't use check the value of m_mediaElement to determine if one is attached or not. Add boolean instead. Canonical link: https://commits.webkit.org/276100@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
[webkit-changes] [WebKit/WebKit] c0a2b3: and loadeddata events not fired on...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c0a2b3040d2d0424bd082eafba7f3922fe7641f0 https://github.com/WebKit/WebKit/commit/c0a2b3040d2d0424bd082eafba7f3922fe7641f0 Author: Jean-Yves Avenard Date: 2024-03-12 (Tue, 12 Mar 2024) Changed paths: A LayoutTests/http/tests/media/audio-load-loadeddata-expected.txt A LayoutTests/http/tests/media/audio-load-loadeddata.html M LayoutTests/platform/ios/TestExpectations M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h Log Message: --- and loadeddata events not fired on page load https://bugs.webkit.org/show_bug.cgi?id=270837 rdar://124079735 Reviewed by Eric Carlson. The HTMLMediaElement would call MediaPlayer::prepareToPlay() on the first MediaPlayerPrivate created which may not be the one we end up using. The code assumed that as soon as a MediaPlayer was created, we could call prepareToPlay on it which in the case of the MediaPlayerPrivateAVFobjC would start loading the content. Since we enabled the WebM player, the assumption no longer applied, multiple players could be used until we find one that can play the content. If the GPU process was enabled, the behaviour was racy as the GPUP's MediaPlayer may not have been created yet. The site would set a HTMLMediaElement's source to a mp3 file, without using an explicit extension nor having the server provide the mime-type. As such, we have to try in succession all MediaPlayerPrivate until we can find one that can load the content. We cache the call to prepareToPlay() and re-issue it on all new MediaPlayerPrivate once created. Added test. * LayoutTests/http/tests/media/audio-load-loadeddata-expected.txt: Added. * LayoutTests/http/tests/media/audio-load-loadeddata.html: Added. * LayoutTests/platform/ios/TestExpectations: All media tests are disabled on iOS, force this one to run. * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::loadWithNextMediaEngine): (WebCore::MediaPlayer::prepareToPlay): * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::prepareForPlayback): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/275997@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
[webkit-changes] [WebKit/WebKit] f25ae5: [visionOS] AudioSession interruptions do not stop ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f25ae590196b3cf576f1140a6c627927761cdaa5 https://github.com/WebKit/WebKit/commit/f25ae590196b3cf576f1140a6c627927761cdaa5 Author: Jean-Yves Avenard Date: 2024-03-08 (Fri, 08 Mar 2024) Changed paths: A LayoutTests/media/media-source/media-managedmse-noresumeafterpause-expected.txt A LayoutTests/media/media-source/media-managedmse-noresumeafterpause.html M LayoutTests/platform/glib/TestExpectations M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm Log Message: --- [visionOS] AudioSession interruptions do not stop playback https://bugs.webkit.org/show_bug.cgi?id=270614 rdar://116891193 Reviewed by Eric Carlson. In 25@main changes were made and then later reverted. The original description of 25@main was: "Timing differences on visionOS result in `AVSampleBufferRenderSynchronizer`'s rate being set to zero, prior to the interruption notification being dispatched when an interruption occurs. This difference ordering in ordering results in a sequence of events that causes WebKit to automatically resume playback following an interruption. Specifically: 1. `CMTimebaseEffectiveRateChangedCallback` is fired as AVSBRS has its rate changed, by the system. 2. Through the callback, the rate is observed as zero, resulting in playback being considered paused in the GPU process. 3. The GPU process state is reflected in the web process with a call to `MediaPlayerPrivateRemote::updateCachedState`. 4. `AVAudioSessionInterruptionNotification` is dispatched in the GPU process, by the system. 5. `HTMLMediaElement::updatePlayState()` is called in the web process. 6. The web process believes that playback is already paused, due to (3). 7. Consequently, the GPU process is never told to pause content; specifically, `MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal()` is elided. 8. Importantly, that method sets a flag variable, `m_playing` to false. 9. Since `m_playing` is not set to false, `MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying()` will return true. 10. `MediaPlayerPrivateMediaSourceAVFObjC::updateAllRenderersHaveAvailableSamples()` eventually restarts playback, since `shouldBePlaying()` is true. " The observed effect description was correct, but the explanation wasn't. MediaPlayerPrivateMediaSourceAVFObjC::m_playing (later renamed m_isPlaying) indicates if the video "should be playing", which exclude the state where playback has paused due to the lack of data. MediaPlayerPrivateInterface::paused() was originally designed to determine if the CRABS player had been paused indirectly by the AVPlay through AirPlay interaction. As AirPlay doesn't support MSE, the only possible way the player is paused is if the MediaPlayerPrivateInterface::pause() got called. The implementation of MediaPlayerPrivateMediaSourceAVFObjC incorrectly reported the player as being paused if playback had stalled (the rate of the synchroniser had changed to 0). This leads to step 7. above happening. While the issue was noted on visionOS, side-effects could be observed elsewhere: if you called video.pause() while the video playback had stalled, currentTime could be seen temporarily progressing once more data was added due to MediaPlayerPrivate::pause() only being called once the media element's readyState changed. Test Added. * LayoutTests/media/media-source/media-managedmse-noresumeafterpause-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-noresumeafterpause.html: Added. * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: Add API documentation for future references. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused const): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: WebM player copies the logic of the AVF MSE player. (WebCore::MediaPlayerPrivateWebM::paused const): apply the same fix as for MSE. Canonical link: https://commits.webkit.org/275838@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
[webkit-changes] [WebKit/WebKit] eaa411: [MSE] screen should sleep if the video has stalled...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: eaa411f285640e50b506f871981eed87e6e91fa3 https://github.com/WebKit/WebKit/commit/eaa411f285640e50b506f871981eed87e6e91fa3 Author: Jean-Yves Avenard Date: 2024-03-08 (Fri, 08 Mar 2024) Changed paths: M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h M Source/WebKit/CMakeLists.txt M Source/WebKit/DerivedSources-input.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in M Source/WebKit/Scripts/webkit/messages.py M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in A Source/WebKit/WebProcess/GPU/media/MediaTimeUpdateData.serialization.in Log Message: --- [MSE] screen should sleep if the video has stalled, not just paused https://bugs.webkit.org/show_bug.cgi?id=270620 rdar://124190917 Reviewed by Youenn Fablet. A video may be playing as far as the HTMLMediaElement is concerned, but has stalled. Those videos should allow the screen to sleep. The code relied on an undocumented requirement that MediaPlayer::paused() returned true if the video has stalled, but this requirement causes breakage elsewhere (see webkit.org/b/270614) Checking on the value of MediaPlayerPrivateRemote::timeIsProgressing instead of paused() made several tests fail. Each failure revealed a discrepency between the GPU's MediaPlayer's time and the simulated currentTime in the WP. To avoid those, we re-sync the time estimator in each messages sent by the GPU process (currentTime, wall time, and if media player's time is progressing). No change in observable behaviour at this stage. Covered by existing tests. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::shouldDisableSleep const): * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::timeIsProgressing const): (WebCore::MediaPlayer::currentTimeMayProgress const): Deleted. * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::timeIsProgressing const): (WebCore::MediaPlayerPrivateInterface::currentTimeMayProgress const): Deleted. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::timeIsProgressing const): (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeMayProgress const): Deleted. * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::timeIsProgressing const): * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::timeIsProgressing const): (WebCore::MediaPlayerPrivateGStreamerMSE::currentTimeMayProgress const): Deleted. * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h: * Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::timeIsProgressing const): (WebCore::MockMediaPlayerMediaSource::currentTimeMayProgress const): Deleted. * Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h: * Source/WebKit/DerivedSources-input.xcfilelist: * Source/WebKit/DerivedSources.make: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy): (WebKit::timeUpdateData const): (WebKit::RemoteMediaPlayerProxy::mediaPlayerSeeked): (WebKit::RemoteMediaPlayerProxy::mediaPlayerTimeChanged
[webkit-changes] [WebKit/WebKit] bb6155: Simplify use of sendWithPromisedReplyOnDispatcher
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: bb615544285886057ad79e074fefe6bbf68c2292 https://github.com/WebKit/WebKit/commit/bb615544285886057ad79e074fefe6bbf68c2292 Author: Jean-Yves Avenard Date: 2024-03-06 (Wed, 06 Mar 2024) Changed paths: M Source/WebKit/Platform/IPC/Connection.cpp M Source/WebKit/Platform/IPC/Connection.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp Log Message: --- Simplify use of sendWithPromisedReplyOnDispatcher https://bugs.webkit.org/show_bug.cgi?id=270320 rdar://123857833 Reviewed by Kimmo Kinnunen. We can remove Connection::sendWithPromiseReplyOnDisPatcher and have Connection::sendWithPromisedReply perform the dispatching automatically. Using NativePromiseProducer::settleWithFunction we can set the callback that will decode the IPC's message and pass it to its listener on the thread the listener is asking to be called on. We can remove the RefPtr from the AsyncReplyWithDispatcher structure and move the dispatching logic directly into the AsyncReplyHandler's CompletionHandler which will now receive a std::unique_ptr instead of a raw pointer. No change in observable behaviour, covered by existing tests. * Source/WebKit/Platform/IPC/Connection.cpp: (IPC::Connection::sendMessageWithAsyncReplyWithDispatcher): (IPC::Connection::processIncomingMessage): (IPC::Connection::addAsyncReplyHandlerWithDispatcher): (IPC::Connection::cancelAsyncReplyHandlers): (IPC::CompletionHandlerhttps://commits.webkit.org/275764@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
[webkit-changes] [WebKit/WebKit] c9cfcc: REGRESSION (275491@main): [ iOS Debug ] 2x TestWeb...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c9cfcceff6a79d150aca63fce8faa01329dc0071 https://github.com/WebKit/WebKit/commit/c9cfcceff6a79d150aca63fce8faa01329dc0071 Author: Jean-Yves Avenard Date: 2024-03-06 (Wed, 06 Mar 2024) Changed paths: M Source/WebKit/Platform/IPC/Connection.cpp Log Message: --- REGRESSION (275491@main): [ iOS Debug ] 2x TestWebKitAPI.WKWebView.PrintToPDFUsingPrint API tests are constant crashes https://bugs.webkit.org/show_bug.cgi?id=270523 rdar://124076626 Reviewed by Aditya Keerthi. In 275494@main, HashMap::isValidKey was used to check if the map contained the key. This is obviously incorrect. Use HashMap::contains instead. * Source/WebKit/Platform/IPC/Connection.cpp: (IPC::Connection::isAsyncReplyHandlerWithDispatcher): (IPC::Connection::takeAsyncReplyHandlerWithDispatcherWithLockHeld): Similar to taskReplyHandler, check if the key is valid first. Canonical link: https://commits.webkit.org/275733@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
[webkit-changes] [WebKit/WebKit] d9ce6b: REGRESSION(274311@main) YouTube.com in safari Airp...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d9ce6b4272d071babd1ff0ee646056cfb06f8b37 https://github.com/WebKit/WebKit/commit/d9ce6b4272d071babd1ff0ee646056cfb06f8b37 Author: Jean-Yves Avenard Date: 2024-03-05 (Tue, 05 Mar 2024) Changed paths: M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/platform/graphics/MediaPlaybackTarget.h M Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.h M Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetCocoa.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlaybackTargetContext.h R Source/WebCore/platform/graphics/cocoa/MediaPlaybackTargetContext.mm R Source/WebCore/platform/graphics/cocoa/MediaPlaybackTargetContext.serialization.in M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h M Source/WebCore/platform/mock/MediaPlaybackTargetMock.cpp M Source/WebCore/platform/mock/MediaPlaybackTargetMock.h M Source/WebCore/platform/mock/MediaPlaybackTargetPickerMock.cpp M Source/WebKit/DerivedSources-input.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in M Source/WebKit/GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp M Source/WebKit/Platform/SourcesCocoa.txt A Source/WebKit/Platform/cocoa/MediaPlaybackTargetContextSerialized.h A Source/WebKit/Platform/cocoa/MediaPlaybackTargetContextSerialized.mm A Source/WebKit/Platform/cocoa/MediaPlaybackTargetContextSerialized.serialization.in M Source/WebKit/Scripts/webkit/messages.py M Source/WebKit/SourcesCocoa.txt M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/ios/RemoteMediaSessionHelper.cpp M Source/WebKit/WebProcess/GPU/media/ios/RemoteMediaSessionHelper.h M Source/WebKit/WebProcess/GPU/media/ios/RemoteMediaSessionHelper.messages.in M Source/WebKit/WebProcess/WebPage/WebPage.h M Source/WebKit/WebProcess/WebPage/WebPage.messages.in M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm Log Message: --- REGRESSION(274311@main) YouTube.com in safari Airplay connects to ATV receiver, no Video plays but only Audio https://bugs.webkit.org/show_bug.cgi?id=270437 rdar://123467550 Reviewed by Youenn Fablet. When activating an AirPlay target on a currently playing media element, the UI process was sending a MediaPlaybackTargetContext to the web process, which would then pass it to the GPUP's AVPlayer. Following 274311@main, the AVOutputContext found in the MediaPlaybackTargetContext would be serialized/deserialized at each IPC's endpoints. This relied on the generic AVOutputContext IPC serialization introduced in 271664@main. However, re-constructing an AVOutputContext in the WP is not allowed by the sandbox. An AVOutputContext's serialization is made of a global identification string which can be looked up in a global table. This look-uo would always fail in the WP resulting in an null AVOutputContext being generated. Subsequently, the GPUP would receive this null AVOutputContext causing the AirPlay command to never reach the GPUP. On iOS devices similarly, the GPUP sends the notification that a new AVOutputContext had been selected, sends it to the WP which then re-send it for the GPUP for processing. As above, the transit through the WP would null the AVOutputContext. We revert to the behaviour pre-274311@main which would use a transient SerializedAVOutputContext to pass a serialized AVOutputContext, with a cache of hasActiveRoute which would only be reconstructed in the GPUP. In order to keep the security aspect intended by 274311@main we introduce two new classes: MediaPlaybackTargetSerialized and MediaPlaybackTargetContextSerialized which will wrap either a MediaPlaybackTargetContextCocoa or a MediaPlaybackTargetContextMock. The underlying AVOutputContext is now never accessed in the WP. Instead we only pass the underlying AVOutputContext's global ID. We split MediaPlaybackTargetContext into three sub-classes: - Cocoa/AVOutputContext - Mock - Serialized The MediaPlaybackTargetSerialized now uses the new serialization framework. Manually tested to work with an ATV and a macOS sonoma as AirPlay target. Some work covered by MediaPlaybackTargetMock tests; but infrastructure doesn't allow for comprehensive regression tests. * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source
[webkit-changes] [WebKit/WebKit] e323dc: Add ability to settle a NativePromise with a funct...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e323dca2b77f79cb09bfc9f457f721deac22c845 https://github.com/WebKit/WebKit/commit/e323dca2b77f79cb09bfc9f457f721deac22c845 Author: Jean-Yves Avenard Date: 2024-03-05 (Tue, 05 Mar 2024) Changed paths: M Source/WTF/wtf/NativePromise.h M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp Log Message: --- Add ability to settle a NativePromise with a function which will be run on the dispatcher given to then/whenSettled https://bugs.webkit.org/show_bug.cgi?id=270282 rdar://123830373 Reviewed by Youenn Fablet. We add a settleWithFunction method to NativePromiseProducer. For convenience, you can also pass the Function to settle(). The function provided will be run for in listener's dispatcher and the result be then passed to the callback. Fly-by: Make accessing the promise's result more explicit (such as when is the result accessed by reference or being moved) Added API tests. * Source/WTF/wtf/NativePromise.h: * Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/275720@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
[webkit-changes] [WebKit/WebKit] 341dd7: [Crash in com.apple.WebKit.WebContent] WTF::Detail...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 341dd78efbba51d3c1c6a5bc21a1282c42cb2357 https://github.com/WebKit/WebKit/commit/341dd78efbba51d3c1c6a5bc21a1282c42cb2357 Author: Jean-Yves Avenard Date: 2024-03-05 (Tue, 05 Mar 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp Log Message: --- [Crash in com.apple.WebKit.WebContent] WTF::Detail::CallableWrapper::call https://bugs.webkit.org/show_bug.cgi?id=270506 rdar://123748005 Reviewed by Youenn Fablet. MediaSourcePrivateRemote::m_gpuConnection is a ThreadSafeWeakPtr which can become null before isGPURunning() returns true (such as if the GPU process crashed or was terminated). Add null test. * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::addSourceBuffer): (WebKit::MediaSourcePrivateRemote::durationChanged): (WebKit::MediaSourcePrivateRemote::bufferedChanged): (WebKit::MediaSourcePrivateRemote::markEndOfStream): (WebKit::MediaSourcePrivateRemote::unmarkEndOfStream): (WebKit::MediaSourcePrivateRemote::setMediaPlayerReadyState): (WebKit::MediaSourcePrivateRemote::setTimeFudgeFactor): Canonical link: https://commits.webkit.org/275680@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
[webkit-changes] [WebKit/WebKit] c73ac9: LibWebRTCCodecs's createRemoteEncoder is going thr...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c73ac9c2ac4156120af075caee3703855f239517 https://github.com/WebKit/WebKit/commit/c73ac9c2ac4156120af075caee3703855f239517 Author: Jean-Yves Avenard Date: 2024-03-01 (Fri, 01 Mar 2024) Changed paths: M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp M Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h Log Message: --- LibWebRTCCodecs's createRemoteEncoder is going through the main thread. https://bugs.webkit.org/show_bug.cgi?id=270280 rdar://123806984 Reviewed by Youenn Fablet. Make use of new sendWithAsyncReplyOnDispatcher to avoid the now unnecessary task re-dispatch. No change in observable behaviour. * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: (WebKit::createRemoteDecoder): (WebKit::LibWebRTCCodecs::createDecoderInternal): (WebKit::createRemoteEncoder): (WebKit::LibWebRTCCodecs::createEncoderInternal): (WebKit::LibWebRTCCodecs::flushEncoder): * Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h: (WebKit::LibWebRTCCodecs::workQueue const): Canonical link: https://commits.webkit.org/275545@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
[webkit-changes] [WebKit/WebKit] 4f68b4: [MSE] Remove unnecessary main runloop hop when per...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4f68b41033d3bdac7a1080faea0cd1af93e0fa12 https://github.com/WebKit/WebKit/commit/4f68b41033d3bdac7a1080faea0cd1af93e0fa12 Author: Jean-Yves Avenard Date: 2024-02-29 (Thu, 29 Feb 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h Log Message: --- [MSE] Remove unnecessary main runloop hop when performing source buffer IPC connection https://bugs.webkit.org/show_bug.cgi?id=270277 rdar://123805564 Reviewed by Kimmo Kinnunen. Make use of the new sendWithPromisedReplyOnDispatcher to avoid main runloop hop. No change in JS observable behaviour (other than it's now very fast under most circumstances) * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::append): (WebKit::SourceBufferPrivateRemote::removeCodedFrames): (WebKit::SourceBufferPrivateRemote::computeSeekTime): (WebKit::SourceBufferPrivateRemote::bufferedSamplesForTrackId): (WebKit::SourceBufferPrivateRemote::enqueuedSamplesForTrackID): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: Canonical link: https://commits.webkit.org/275498@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
[webkit-changes] [WebKit/WebKit] cae00d: Replies from GPUConnection::Connection::sendWithAs...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cae00d824a496148f16e28b0bb56bd39cb61e00a https://github.com/WebKit/WebKit/commit/cae00d824a496148f16e28b0bb56bd39cb61e00a Author: Jean-Yves Avenard Date: 2024-02-29 (Thu, 29 Feb 2024) Changed paths: M Source/WebKit/Platform/IPC/Connection.cpp M Source/WebKit/Platform/IPC/Connection.h M Tools/TestWebKitAPI/Tests/IPC/ConnectionTests.cpp Log Message: --- Replies from GPUConnection::Connection::sendWithAsyncReply will always be called on the main thread https://bugs.webkit.org/show_bug.cgi?id=270118 rdar://123650202 Reviewed by Kimmo Kinnunen. A Connection::sendWithAsyncReply was only ever designed to call the AsyncReplyHandler used to return the reply on the Connection's dispatcher. Which in the case of the GPUConnection's Connection is the main thread/runloop. While the Connection's itself uses a dedicated WorkQueue to send and receive IPC messages, and that a WorkQueueMessageReceiver let you decide on which WorkQueue the messages should be dispatched on; there was no ability to specify on which dispatcher (or WorkQueueMessageReceiver) the sendWithAsyncReply's replies will be delivered on. While Connection::sendWithPromisedReply returned a thread-safe NativePromise which allow to define on which dispatcher's the callback should be run on, it also used sendWithAsyncReply and used the AsyncReplyHandler to wrap a NativePromiseProducer which would then be resolved or rejected on the Connection's dispatcher. This became problematic in situation where a WorkQueueMessageReceiver was used for performance reasons; the bottleneck would still be on the main thread's usage state. It made the current MSE in a Worker implementation's moot. We add two new methods: sendWithAsyncReplyOnDispatcher and sendWithPromisedReplyOnDispatcher Which let you defines the RefCountedSerialFunctionDispatcher on which the AsyncReply will be delivered on. The semantics for sendWithPromisedReplyOnDispatcher is rather cumbersome as you need to set the dispatcher twice, but at this stage there’s no possibility to retrieve the WorkQueue set with whenSettled/then as at the time the NativePromiseProducer Has been settled, no listener may have been attached yet. This will be fixed in a follow up change. Rather than expanding the existing ConnectionAsyncReplyHandler object with a dispatcher member and using a single HashMap of AsyncReplyHandler which would have allowed less duplication in the code, we create a new Connection::AsyncReplyHandlerWithDispatcher and have a separate map. The reasons are two fold: 1- We don’t have to handle cases where a dispatcher would have been set for a AsyncReplyHandler that should be run in the Connection’s dispatcher, or vice-versa: a dispatcher wasn’t set when it should have been. 2- The vast majority of the usage is using the older sendWithAsyncReply so we don’t have to Search in an overall larget HashMap twice. So we favour code readability over size. Added API tests to check several scenarios including: - That replies are delivered on the correct dispatcher and in the right order - The replies of messages sent to an invalidated Connection are properly delivered on the dispatcher. * Source/WebKit/Platform/IPC/Connection.cpp: (IPC::Connection::sendMessageWithAsyncReplyWithDispatcher): (IPC::Connection::processIncomingMessage): (IPC::Connection::addAsyncReplyHandlerWithDispatcher): (IPC::Connection::cancelAsyncReplyHandlers): (IPC::Connection::isAsyncReplyHandlerWithDispatcher): (IPC::Connection::takeAsyncReplyHandlerWithDispatcher): (IPC::Connection::takeAsyncReplyHandlerWithDispatcherWithLockHeld): * Source/WebKit/Platform/IPC/Connection.h: (IPC::Connection::sendWithAsyncReply): (IPC::Connection::sendWithAsyncReplyOnDispatcher): (IPC::Connection::sendWithPromisedReplyOnDispatcher): (IPC::Connection::AsyncReplyHandlerWithDispatcher::operator bool const): (IPC::Connection::sendWithPromisedReply): (IPC::Connection::waitForAsyncReplyAndDispatchImmediately): (IPC::CompletionHandlerhttps://commits.webkit.org/275494@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
[webkit-changes] [WebKit/WebKit] dc7bb7: Safari unable to play YouTube content fast enough....
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: dc7bb79ca72bfc056244eb5d31e0d5844f8faa61 https://github.com/WebKit/WebKit/commit/dc7bb79ca72bfc056244eb5d31e0d5844f8faa61 Author: Jean-Yves Avenard Date: 2024-02-28 (Wed, 28 Feb 2024) Changed paths: M Source/WebKit/GPUProcess/media/RemoteMediaResourceLoader.h M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp Log Message: --- Safari unable to play YouTube content fast enough. Content window spins and plays only after 25-30 seconds https://bugs.webkit.org/show_bug.cgi?id=270205 rdar://123528095 Reviewed by Eric Carlson. Both MSE and MediaSourceRemote and RemoteMediaResourceLoader WorkQueue were created using QOS::Background priority. Trace shows that when a task is being run on those WorkQueues, they are either being pre-empted or yielded and sometimes it takes over 10s for a task to even complete. We change the priority to the default, the same as what the IPC's WorkQueue is using. * Source/WebKit/GPUProcess/media/RemoteMediaResourceLoader.h: * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::queue): Canonical link: https://commits.webkit.org/275443@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
[webkit-changes] [WebKit/WebKit] 7be7a6: WebKit.GPU using an average of 57% CPU (2.0W estim...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7be7a65a49c17c990afe62c11528e99ef6ccfaf4 https://github.com/WebKit/WebKit/commit/7be7a65a49c17c990afe62c11528e99ef6ccfaf4 Author: Jean-Yves Avenard Date: 2024-02-27 (Tue, 27 Feb 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm Log Message: --- WebKit.GPU using an average of 57% CPU (2.0W estimated impact) for 2.1 hrs [+7%/hr] https://bugs.webkit.org/show_bug.cgi?id=270154 rdar://122916282 Reviewed by Eric Carlson. When the AVSampleBufferDisplaLayer notified the SourceBufferPrivateAVObjC that is was ready for more data, we checked via SourceBufferPrivate::isReadyForMoreSamples(). If we had previously been interrupted with a layerRequiresFlushToResumeDecodingChanged error, and until we flushed the renderer, isReadyForMoreSamples() would have returned false and iwe would then immediately request the layer to notify us when ready again. Prior 268283@main, requesting the AVSBDL to notify us if it was ready for more sample was the right thing to do. However, now that there's a flush pending, what it would do is make the AVSBDL call us immediately. This caused the code to run in an unlimited loop. We add a check if flushing is required and abort early if so. The ability to reproduce the case and to simulate is not possible with the current infrastructure. Problem was found through log analysis and code review only. * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::flushIfNeeded): Add logging for when we are actually flushing the SourceBuffer. Not having logging made the investigation difficult as we had log that the AVSBDL required flushing, but no information about if we had log flushed or not (which can happen in two cases: page became visible again, or play() was called) (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Canonical link: https://commits.webkit.org/275415@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
[webkit-changes] [WebKit/WebKit] bbf768: [GPUP][MSE] RemoteSourceBufferProxy::EvictCodedFra...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: bbf768df7ba799771f882dc739c09034f7a92934 https://github.com/WebKit/WebKit/commit/bbf768df7ba799771f882dc739c09034f7a92934 Author: Jean-Yves Avenard Date: 2024-02-27 (Tue, 27 Feb 2024) Changed paths: M LayoutTests/media/media-source/live-rewind-seek-and-evict.html M LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded.html M LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end.html M LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error-onstart.html M LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error.html M LayoutTests/media/media-source/media-source-evict-codedframe-after-seek.html M LayoutTests/media/media-source/media-source-evict-codedframe-large-currenttime.html M LayoutTests/media/media-source/media-source-monitor-playing-event.html M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/SourceBufferPrivate.h M Source/WebCore/platform/graphics/SourceBufferPrivateClient.h M Source/WebCore/platform/graphics/TrackBuffer.cpp M Source/WebCore/platform/graphics/TrackBuffer.h M Source/WebCore/testing/Internals.cpp M Source/WebCore/testing/Internals.h M Source/WebCore/testing/Internals.idl M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in M Source/WebKit/Scripts/webkit/messages.py M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemoteMessageReceiver.messages.in Log Message: --- [GPUP][MSE] RemoteSourceBufferProxy::EvictCodedFrames shouldn't be a sync call https://bugs.webkit.org/show_bug.cgi?id=265079 rdar://118783504 Reviewed by Youenn Fablet. Sync calls should be avoided under most circumstances, however with MSE, the prepare append algorithm is only made of synchronous steps and the synchronous call was made into a sendSync call to the GPU process for expediency. The only reason this call had to be synchronous was to determine if a new appendBuffer call was going to succeed even if we were running out of space and after an eviction. Instead, we calculate following each source buffer operation the amount of evictable data based on the currentTime. When the SourceBuffer needs to append a new buffer, we will then now immediately if: 1- there's enough space to accept the new buffer as-is 2- if there's not enough space and we evict content then the data would fit. If either 1 or 2 fails, then we are to throw a QuotaExceededError. In the case of 1) there's nothing to do, we can avoid the call to EvictCodedFrame altogher. If 2) we can run the EvictCodedFrame algorithm asynchronously and don't need to wait for the result of the operation: we know the next append will succeed. For 100% spec-compliance, should we fire QuotaExceededError, we want the eviction to run and be completed. Some browsers (Firefox in particular), do not fullfill this requirement: the SourceBuffer will throw, and eviction will still be done asynchronously; which is arguably a better and simpler behaviour from an implementer point of view. While the evictable amount of data would change over time as playback progress, for our case we don't need to update it at regular interval as we will conservatively run the eviction step which will always then free more memory than we expected we could. In practice, it means that the only time we will fire a sync call to the GPU process is if the append buffer operation will fail as we have run out of space, and we will not be able to make sufficient room. Covered by existing tests, no change in observable behaviour. * LayoutTests/media/media-source/live-rewind-seek-and-evict.html: * LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded.html: * LayoutTests/media/media-source/media-source-append-buffer-full-evict-prior-to-end.html: * LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error-onstart.html: * LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error.html: * LayoutTests/media/media-source/media-source-evict-codedframe-after-seek.html: * LayoutTests/media/media-source/media-source-monitor-playing-event.html: * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::m_logIdentifier): (WebCore::SourceBuffer::appendBufferInternal): (WebCore::SourceBuffer
[webkit-changes] [WebKit/WebKit] 747f80: MSE player will have readyState oscillate between ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 747f80b0591ceda287ec87a45cb512c39e05444c https://github.com/WebKit/WebKit/commit/747f80b0591ceda287ec87a45cb512c39e05444c Author: Jean-Yves Avenard Date: 2024-02-26 (Mon, 26 Feb 2024) Changed paths: A LayoutTests/media/media-source/media-source-canplaythrough-withfuturegap-expected.txt A LayoutTests/media/media-source/media-source-canplaythrough-withfuturegap.html M LayoutTests/media/media-source/media-source-webm-append-buffer-after-abort-expected.txt M LayoutTests/media/media-source/media-source-webm-append-buffer-after-abort.html M LayoutTests/media/video-test.js M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/ManagedMediaSource.h M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp Log Message: --- MSE player will have readyState oscillate between readyState HAVE_CURRENT_DATA and HAVE_ENOUGH_DATA https://bugs.webkit.org/show_bug.cgi?id=270050 rdar://123597692 Reviewed by Eric Carlson. 272762@main incorrectly assumed that if we had buffered data 3s in the future, the media could always be played through, ignoring any potential gap ahead which would have stalled playback. Since following 272762@main, the SourceBuffer no longer monitors its own append rate there's no need to have the SourceBuffer check for its own buffered range, the MediaSource has more information about it which accounts for different gaps between SourceBuffer. We use the isBuffered() function that was before only used for ManagedMediaSource to determine the level of buffered data ahead of currentTime and move it to MediaSource. * LayoutTests/media/media-source/media-source-canplaythrough-withfuturegap-expected.txt: Added. * LayoutTests/media/media-source/media-source-canplaythrough-withfuturegap.html: Added. * LayoutTests/media/media-source/media-source-webm-append-buffer-after-abort-expected.txt: * LayoutTests/media/media-source/media-source-webm-append-buffer-after-abort.html: The test was invalid. It assumed that canplaythrough would be fired if we only added 2s of data. There's no specs stating as such. Only should the MediaSource be ended would it guarantee that the readyState moved to HAVE_ENOUGH_DATA while being paused. Correct and amend the test. * LayoutTests/media/video-test.js: Add testExpectedEventuallySilent. Sometimes the order in which events are fired is not deterministic. We don't want to log them to prevent expectations failure, but we need to check the event is received. (testExpectedEventually): (testExpectedEventuallyWhileRunningBetweenTests): * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::isBuffered const): Deleted. * Source/WebCore/Modules/mediasource/ManagedMediaSource.h: * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::isBuffered const): (WebCore::MediaSource::monitorSourceBuffers): * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::canPlayThroughRange): Deleted. * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::processMediaSample): Canonical link: https://commits.webkit.org/275348@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
[webkit-changes] [WebKit/WebKit] 19f884: [MSE] Media from the TimeRange containing currentT...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 19f884773fcae860a4dfb9346d56c55a89c630f4 https://github.com/WebKit/WebKit/commit/19f884773fcae860a4dfb9346d56c55a89c630f4 Author: Jean-Yves Avenard Date: 2024-02-25 (Sun, 25 Feb 2024) Changed paths: A LayoutTests/media/media-source/media-managedmse-eviction-expected.txt A LayoutTests/media/media-source/media-managedmse-eviction.html M LayoutTests/platform/glib/TestExpectations M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp Log Message: --- [MSE] Media from the TimeRange containing currentTime can be evicted when it shouldn't https://bugs.webkit.org/show_bug.cgi?id=270034 rdar://problem/123556056 Reviewed by Eric Carlson. We want none of the data contiguous from the currentTime to the next discontinuity to be evicted to ensure continuous playback. This is inline with Google's proposal for having Eviction Policies. The comments in the eviction code indicated as such, but a logic error would have made the end of the current range be truncated if it was followed by another range after a discontinuity. * LayoutTests/media/media-source/media-managedmse-eviction-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-eviction.html: Added. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::evictFrames): Canonical link: https://commits.webkit.org/275306@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
[webkit-changes] [WebKit/WebKit] 5f3622: NEW TEST [ MacOS ] imported/w3c/web-platform-tests...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5f3622e3b24527b6a58d4b50c69f1a68e4709eea https://github.com/WebKit/WebKit/commit/5f3622e3b24527b6a58d4b50c69f1a68e4709eea Author: Jean-Yves Avenard Date: 2024-02-23 (Fri, 23 Feb 2024) Changed paths: M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemoteMessageReceiver.messages.in Log Message: --- NEW TEST [ MacOS ] imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-detach-element.html is a flaky crash https://bugs.webkit.org/show_bug.cgi?id=269871 rdar://123404489 Reviewed by Youenn Fablet. When shutting down the RemoteMediaSourceProxy in the GPUP we would send a asynchronous message to the MediaSourcePrivateRemote in the WP which in turn would have disconnected all the SourceBufferPrivateRemote. However, it was possible at this stage that the MediaSource in a worker to itself have started to shutdown and detaching all existing SourceBuffer. At this stage, the MediaSourcePrivateRemote::m_sourceBuffers would have been emptied and be unable to disconnect them. So we split the shutdown of the RemoteMediaSourceProxy and of the RemoteSourceBufferProxy so that they each inform their respective remotes to start shutting down. Similar to what the RemoteMediaSourceProxy does when being shutdown by the RemoteMediaPlayerProxy, it will now tell all RemoteSourceBufferProxies to shutdown, which in turn will shutdown the source buffers in the web process. Only once that message been sent that it will continue tearing down the proxies. Covered by re-enabled test. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp: (WebKit::RemoteMediaSourceProxy::disconnect): (WebKit::RemoteMediaSourceProxy::shutdown): * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp: (WebKit::RemoteSourceBufferProxy::shutdown): * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h: * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::MessageReceiver::mediaSourcePrivateShuttingDown): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::removedFromMediaSource): (WebKit::SourceBufferPrivateRemote::MessageReceiver::sourceBufferPrivateShuttingDown): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemoteMessageReceiver.messages.in: Canonical link: https://commits.webkit.org/275268@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
[webkit-changes] [WebKit/WebKit] 53463e: REGRESSION (274442@main): [ MacOS wk2 ] media/medi...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 53463ea1c60fe6de4120dab418a8bafa5e6471dd https://github.com/WebKit/WebKit/commit/53463ea1c60fe6de4120dab418a8bafa5e6471dd Author: Jean-Yves Avenard Date: 2024-02-23 (Fri, 23 Feb 2024) Changed paths: M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- REGRESSION (274442@main): [ MacOS wk2 ] media/media-source/media-source-seek-complete.html is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=269814 rdar://123338097 Reviewed by Jer Noble. If a `currentTimeChanged` message between the GPUP and WP was mid-flight when a new seek operation was started it would have set the current time to a stale value, so the time would appear to go backward and the seek would never complete. Prior 274442@main it *usually* didn't matter as the HTMLMediaElement cached the seeked time and would partially hide the time going backward. Following this change however, the MediaPlayerPrivate became the time reference, and so issues with the time being wrong became more problematic. This issue could explain a series of intermittent failures we have seen ever since the MediaPlayer was moved to the GPUP, including several changes made to prevent the time from ever going backward. The explanation above likely explains on why we needed such workaround in the first place. Also, before 274442@main if a seek was pending, it would have always returned the seek time when querying MediaSource::currentTime; we changed it to return 0 whenever the MediaSource was closed. We return to the original behaviour. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::currentTime const): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::playbackStateChanged): Add log. (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): return early if currently seeking. Add log Canonical link: https://commits.webkit.org/275231@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
[webkit-changes] [WebKit/WebKit] 08cf48: [ Ventura Debug WK2 arm64 EWS ] ASSERTION FAILED: ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 08cf48f399ffdf6357e45edb8bc7f47b303a8b18 https://github.com/WebKit/WebKit/commit/08cf48f399ffdf6357e45edb8bc7f47b303a8b18 Author: Jean-Yves Avenard Date: 2024-02-22 (Thu, 22 Feb 2024) Changed paths: M LayoutTests/platform/mac-ventura/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm Log Message: --- [ Ventura Debug WK2 arm64 EWS ] ASSERTION FAILED: m_shutdown in WebKit::RemoteMediaResource::~RemoteMediaResource() seen with http/tests/media/hls/track-in-band-multiple-cues.html https://bugs.webkit.org/show_bug.cgi?id=269403 rdar://122967706 Reviewed by Youenn Fablet. Following 273804@main, a PlatformMediaResource is accessed on the MediaResourceLoader's target. The AVPlayer runs on its own thread while the MediaPlayer runs in the main thread. As such, we can have concurrent, and conflicting access to the MediaResource from both the AVPlayer and the MediaPlayer. The MediaPlayer could be shutting down, cancelling the WebCoreNSURLSessionDataTask, while the AVPlayer is attempting to suspend and the resume download. Under such circumstances we had two issues: 1- It was possible that following a cancel, a suspend be received, this would trigger a second call to `loadFinishedWithError` which would assert as the task hasn't already been removed from the map 2- If the task was cancelled while we were in the middle of resume operation the newly allocated resource woulb be deleted without first being shutdown. For 1) We check that the previous task's state wasn't NSURLSessionTaskStateCompleted and abort if so. For 2) We check that the task's state hasn't changed mid-way and if so shutdown the resource and stop. Another issue resolved here, is that it was possible for the MediaResource to call its client with data immediately after creation, before the session had finished being setup, if so the callback would be ignored which resulted in some tests intermittently timing out. We now set the MediaSource's client immediately and allow processing the callbacks (this resolves bug 259485). We also change the structure so that the task's resource is only ever accessed on the loader's tarket. We can remove the locking operation around the resource access as a result. Covered by existing tests. * LayoutTests/platform/mac-ventura/TestExpectations: * Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h: * Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm: (-[WebCoreNSURLSessionDataTask resource]): (-[WebCoreNSURLSessionDataTask setResource:]): (-[WebCoreNSURLSessionDataTask suspend]): (-[WebCoreNSURLSessionDataTask resume]): (-[WebCoreNSURLSessionDataTask dealloc]): Canonical link: https://commits.webkit.org/275217@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
[webkit-changes] [WebKit/WebKit] c8652a: REGRESSION (271599@main): espn.com: Closed caption...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: c8652ac395bcb1ba6247679ecc18fb04d2c041e2 https://github.com/WebKit/WebKit/commit/c8652ac395bcb1ba6247679ecc18fb04d2c041e2 Author: Jean-Yves Avenard Date: 2024-02-22 (Thu, 22 Feb 2024) Changed paths: A LayoutTests/http/tests/media/hls/track-webvtt-multitracks-expected.txt A LayoutTests/http/tests/media/hls/track-webvtt-multitracks.html A LayoutTests/http/tests/media/resources/hls/test-webvtt-multitracks.m3u8 M Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp M Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h M Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp M Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h M Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h Log Message: --- REGRESSION (271599@main): espn.com: Closed captions aren't displaying in videos https://bugs.webkit.org/show_bug.cgi?id=269847 rdar://122842659 Reviewed by Eric Carlson. In this video, we had 2 text tracks, all with a track id of 0. The reasons for this is that it contained a InbandMetadataTextTrack and a InbandTextTrack and the MediaPlayerPrivateAVFoundation weren't assigning them unique trackID which would confuse the search in the hash table trying to match a TrackID to a track. A TrackID for an inband text track is an abstract concept, it doesn't reflect anything relevant to the user (Except that it must be unique). We only need that TrackID to be unique between all the tracks in a given MediaPlayer. So we assign them a unique TrackID at creation. Add a HLS file that contains both a metadata and a subtitle track and ensure that cues are added to the proper one. * LayoutTests/http/tests/media/hls/track-webvtt-multitracks-expected.txt: Added. * LayoutTests/http/tests/media/hls/track-webvtt-multitracks.html: Added. * LayoutTests/http/tests/media/resources/hls/test-webvtt-multitracks.m3u8: Added. * Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): * Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): * Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: * Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: (WebCore::InbandTextTrackPrivateAVFObjC::create): * Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): (WebCore::InbandTextTrackPrivateAVFObjC::id const): Deleted. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): * Source/WebCore/platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h: (WebCore::OutOfBandTextTrackPrivateAVF::create): (WebCore::OutOfBandTextTrackPrivateAVF::OutOfBandTextTrackPrivateAVF): Canonical link: https://commits.webkit.org/275201@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
[webkit-changes] [WebKit/WebKit] 5bd1fe: Stuttery video on BBC News page
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5bd1fec1527127bfa96c802786351a49253078cc https://github.com/WebKit/WebKit/commit/5bd1fec1527127bfa96c802786351a49253078cc Author: Jean-Yves Avenard Date: 2024-02-22 (Thu, 22 Feb 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- Stuttery video on BBC News page https://bugs.webkit.org/show_bug.cgi?id=269891 rdar://123135766 Reviewed by Simon Fraser. Revert fly-by change performed in 274278@main. I incorrectly interpreted the argument "completionHandler" name as being a CompletionHandler. But it wasn't, it is a task to run at a special time that can be cancelled. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::performTaskAtTime): Revert code to previous version. Change argument name to avoid future confusion. Canonical link: https://commits.webkit.org/275159@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
[webkit-changes] [WebKit/WebKit] 48c940: Have HTMLVideoElement manage syschronisation of me...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 48c9403704117925f1d17498719b4fffbc0af0cf https://github.com/WebKit/WebKit/commit/48c9403704117925f1d17498719b4fffbc0af0cf Author: Jean-Yves Avenard Date: 2024-02-22 (Thu, 22 Feb 2024) Changed paths: A LayoutTests/media/media-source/media-managedmse-poster-expected.txt A LayoutTests/media/media-source/media-managedmse-poster.html M LayoutTests/platform/ios-wk2/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/HTMLVideoElement.cpp M Source/WebCore/html/HTMLVideoElement.h M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp M Source/WebCore/rendering/RenderVideo.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- Have HTMLVideoElement manage syschronisation of mediaPlayerRenderingCanBeAccelerated states https://bugs.webkit.org/show_bug.cgi?id=232125 rdar://84531384 Reviewed by Youenn Fablet and Philippe Normand. There are three conditions controlling if an accelerated layer is usable with a decoded video: 1- Does the media player supports hardware accelerated rendering 2- Is the renderer/compositor hardware accelerated 3- Should the video playing in this renderer be accelerated (such as having a MediaPlayer, having a poster displayed etc) The information was contained at various levels and dealt as follow: - The MediaPlayerPrivate contains the information related to 1. - When the MediaPlayerPrivate needed to know 3) for the purpose of passing the value of 2) to the GPUP's MediaPlayer, it will would query the MediaPlayer, which queried the HTMLMediaElement client for 2), which itself queried RenderLayerCompositor which returned false if accelerated rendering was disabled and if not querid the RenderVideo, which itself queried the HTMLMediaElement which queried the MediaPlayer which queried the MediaElementPrivate to determine if the player itself supported accelerated rendering. It was also up to the MediaPlayerPrivateRemote to query the value during regular operations in order to make sure the value didn't change since it was last checked. This latter requirement or lack of check at the right time was the source of multiple bugs (232124, 230495, 21594, 220375, 267661, 268423 and most recently 269684). Each time the reason was the same, a failure to synchronise 1) 2) and 3) data, and each time the fix was calling `MediaPlaier::renderingModeChanged()` in various places. Calling renderingModeChanged() unnecessarily will cause the video layer in the MediaElement to be deleted and reconstructed, following by a full re-layout. We change this so that each element of the tree is the guardian of the information that matters to itself: 1- The MediaPlayerPrivate knows 1) 2- The Compositor knows 2) 3- The HTMLMediaElement knows 3. The HTMLMediaElement is now the coordinator between the MediaPlayerPrivate and the Compositor/RenderVideo. The RenderVideo no longer queries directly the MediaPlayer, only the HTMLMediaElement. We change to a push model, where: 1- the RenderVideo will notify the HTMLMediaElement if accelerated rendering status has changed. 2- The MediaPlayerPrivate will notify the HTMLMediaElement if it supports accelerated rendering. 3- The HTMLMediaElement will notify either the Compositor or the MediaPlayer when the rendering state relevant to them has changed and will manage to force a re-layout as needed. The requirement for the MediaPlayerPrivate to call "renderingModeChanged" is still there in order to minimise the extent of the changes; should it fail to call it, the side affects are minimised by checking the state once the MediaPlayer has been created. In a similar fashion, once the MediaPlayerPrivate gets notified by the HTMLMediaElement that the rendering state has changed, it has to call back into the HTMLMediaElement through a call to `HTMLMediaElement::renderingCanBeAccelerated()` in order to minimise the patch size. We could have instead pass the new rendering status as an argument. We move the handling of layers and its acceleration status to HTMLVideoElement class as if it was an audio element, repainting when the player change would be unnecessary and harmful to performance. Added test. * LayoutTests/media/media-source/media-managedmse-poster-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-poster.html: Added. We use ManagedMSE instead of plain MSE so that we can test on iOS. * LayoutTests/platform/ios/TestExpectations: Make new test runs on iOS as media-source tests are disabled by default * LayoutTests/platform/mac-wk1/TestExpectations: Skip test as ManagedMSE isn't enabled on wk1 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didDetachRenderers): (WebCore::HTMLMe
[webkit-changes] [WebKit/WebKit] 8b4edd: Source/WebKit/Platform/cocoa/ExtensionCapabilityGr...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8b4edddf2455f4c5a5632bc7aea781e845b113c0 https://github.com/WebKit/WebKit/commit/8b4edddf2455f4c5a5632bc7aea781e845b113c0 Author: Jean-Yves Avenard Date: 2024-02-21 (Wed, 21 Feb 2024) Changed paths: M Source/WebKit/Platform/cocoa/ExtensionCapabilityGrant.mm Log Message: --- Source/WebKit/Platform/cocoa/ExtensionCapabilityGrant.mm:40:25: error: instance method '-isValid' not found https://bugs.webkit.org/show_bug.cgi?id=269839 rdar://123369227 Unreviewed compilation failure fix Change platformInvalidate prototype definition. * Source/WebKit/Platform/cocoa/ExtensionCapabilityGrant.mm: (WebKit::platformInvalidate): Canonical link: https://commits.webkit.org/275092@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
[webkit-changes] [WebKit/WebKit] a5d1eb: Import W3C media-source/dedicated worker WPT
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a5d1eba7409d93a58356eb30fb8718e629e6edc5 https://github.com/WebKit/WebKit/commit/a5d1eba7409d93a58356eb30fb8718e629e6edc5 Author: Jean-Yves Avenard Date: 2024-02-18 (Sun, 18 Feb 2024) Changed paths: M LayoutTests/TestExpectations A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-message-util.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-detach-element-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-detach-element.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-detach-element.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-duration-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-duration.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-duration.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-get-objecturl.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle-transfer-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle-transfer-to-main.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle-transfer.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle-transfer.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-handle.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-must-fail-if-unsupported.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-objecturl-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-objecturl.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-objecturl.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play-terminate-worker-expected.txt A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play-terminate-worker.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play-terminate-worker.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play.html A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-play.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/mediasource-worker-util.js A LayoutTests/imported/w3c/web-platform-tests/media-source/dedicated-worker/w3c-import.log M LayoutTests/platform/mac-wk2/TestExpectations M LayoutTests/platform/mac/TestExpectations M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/track/TrackBase.cpp Log Message: --- Import W3C media-source/dedicated worker WPT https://bugs.webkit.org/show_bug.cgi?id=269564 rdar://123076441 Reviewed by Eric Carlson. Import WPT media-source/dedicated-worker. Somes changes were required to make all tests pass. 1- When the MediaSource in the worker is being deleted, clean up its SourceBufferLists and notify the HTMLMediaElement about it. The steps added aren't defined in the MSE spec. Issue was raised as https://github.com/w3c/media-source/issues/348 2- TrackBase's creation of the nullLogger wasn't thread-safe and could have been concurrently accessed from both the main and worker thread. 3- Using a MediaSourceHandle already detached or previously attached to a media element must fail 4- The [[has ever been attached]] slot is to be set to true prior changing the delaying the load flag to false media-source/dedicated-worker/mediasource-worker-play.html times out but so does chrome. Will investigate in a follow-up post. Upstream commit: https://github.com/web-platform-tests/wpt/commit/32864fa9c0293296e90af926021cf80002abac69 * LayoutTests
[webkit-changes] [WebKit/WebKit] de9e3d: [MSE] `ASSERT(canSafelyBeUsed()); ` ASSERTION when ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: de9e3d6bc4880dab143d3f4e3643adf588078dd9 https://github.com/WebKit/WebKit/commit/de9e3d6bc4880dab143d3f4e3643adf588078dd9 Author: Jean-Yves Avenard Date: 2024-02-18 (Sun, 18 Feb 2024) Changed paths: M Source/WebCore/html/track/AudioTrack.cpp M Source/WebCore/html/track/InbandTextTrack.cpp M Source/WebCore/html/track/TrackBase.cpp M Source/WebCore/html/track/TrackBase.h M Source/WebCore/html/track/VideoTrack.cpp M Source/WebCore/platform/graphics/AudioTrackPrivate.h M Source/WebCore/platform/graphics/AudioTrackPrivateClient.h M Source/WebCore/platform/graphics/InbandTextTrackPrivate.h M Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h M Source/WebCore/platform/graphics/TrackPrivateBase.cpp M Source/WebCore/platform/graphics/TrackPrivateBase.h M Source/WebCore/platform/graphics/TrackPrivateBaseClient.h M Source/WebCore/platform/graphics/VideoTrackPrivate.h M Source/WebCore/platform/graphics/VideoTrackPrivateClient.h M Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp M Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp M Source/WebCore/platform/graphics/avfoundation/objc/InbandChapterTrackPrivateAVFObjC.mm M Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h M Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp M Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp M Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h M Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.cpp M Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.h M Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.cpp M Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h M Source/WebKit/GPUProcess/media/TextTrackPrivateRemoteConfiguration.h M Source/WebKit/GPUProcess/media/TextTrackPrivateRemoteConfiguration.serialization.in M Source/WebKit/GPUProcess/media/TrackPrivateRemoteConfiguration.h M Source/WebKit/GPUProcess/media/TrackPrivateRemoteConfiguration.serialization.in M Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/AudioTrackPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/VideoTrackPrivateRemote.h Log Message: --- [MSE] `ASSERT(canSafelyBeUsed());` ASSERTION when using webm with MSE in a worker https://bugs.webkit.org/show_bug.cgi?id=269638 rdar://123134428 Reviewed by Eric Carlson. With a MediaSource running in a DedicatedWorker, a TrackPrivate may be referenced by two Tracks: - The canonical track living in the SourceBuffer - Its mirror that is sent to the HTMLMediaElement on the main thread. The interface between the Track and the TrackPrivate is done via the TrackPrivateBaseClient which inherit from CanMakeWeakPtr. A WeakPtr was used to store the TrackPrivateClient in the TrackPrivate. As the TrackPrivate could only track one client, it was the last caller to TrackPrivate::setClient that won. So you could end up having the TrackPrivate attempting to use the WeakPtr created on the worker thread while the TrackPrivate is being used in the main thread. We add support for multiple clients, and to ensure that the client will only ever be called on the right thread, TrackPrivate::addClient now takes a dispatcher that will ensure the task to run and the WeakPtr will always be accessed on the right thread. TrackPrivate::addClient|removeClient are thread safe. Previously, {Audio|Video|InbandTrack}PrivateTrack each managed their respective client. We move the logic to the base TrackPrivateBase class to remove mostly duplicated code. Move semantics with the client's callback is no longer possible, this is fine for Audio and Video tracks as their message is only to enable/select them; however for InbandTextTrack it becomes problematic as the WebVTT parser API and Cues all require move semantics. However, InbandTextTracks aren't currently supported with our MediaSource implementation (no User-Agent does), so there will only ever be one client to those tracks, and the client will be running in the main thread. We add assertions for methods were moved semantics is required, and to prevent unexpected failures, only the first client will be called, and only if on the main thread. The Remote{Audio|Video|InbandText}PrivateTrack which are the only
[webkit-changes] [WebKit/WebKit] a69118: [MSE] Intermittent crash with imported/w3c/web-pla...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: a691187c506e9f19e2a61adbf52585560d704d12 https://github.com/WebKit/WebKit/commit/a691187c506e9f19e2a61adbf52585560d704d12 Author: Jean-Yves Avenard Date: 2024-02-18 (Sun, 18 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/MediaSource.cpp Log Message: --- [MSE] Intermittent crash with imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html https://bugs.webkit.org/show_bug.cgi?id=269656 rdar://123171059 Reviewed by Chris Dumez. `MediaSource::ensureWeakOnHTMLMediaElementContext` took a strong ref to the HTMLMediaElement but this code can be called while the HTMLMediaElement is being destructed. `ASSERT(!deletionHasBegun());` We use a RefPtrAllowingPartiallyDestroyed instead which avoid the problem for now. Ideally the logic should be refactored to avoid calling the method in the first place if the HTMLMediaElement has gone away. * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::ensureWeakOnHTMLMediaElementContext const): Canonical link: https://commits.webkit.org/274942@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
[webkit-changes] [WebKit/WebKit] 7db823: [MSE] Add MediaSourceHandle object and update to M...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7db823fea8a1af033195fe8ddcaad6d7fae675b5 https://github.com/WebKit/WebKit/commit/7db823fea8a1af033195fe8ddcaad6d7fae675b5 Author: Jean-Yves Avenard Date: 2024-02-16 (Fri, 16 Feb 2024) Changed paths: M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml M Source/WTF/wtf/PlatformEnable.h M Source/WTF/wtf/PlatformEnableCocoa.h M Source/WebCore/CMakeLists.txt M Source/WebCore/DerivedSources-input.xcfilelist M Source/WebCore/DerivedSources-output.xcfilelist M Source/WebCore/DerivedSources.make M Source/WebCore/Headers.cmake M Source/WebCore/Modules/mediasource/DOMURLMediaSource.cpp M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/ManagedMediaSource.idl M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/mediasource/MediaSource.idl A Source/WebCore/Modules/mediasource/MediaSourceHandle.cpp A Source/WebCore/Modules/mediasource/MediaSourceHandle.h A Source/WebCore/Modules/mediasource/MediaSourceHandle.idl A Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.cpp A Source/WebCore/Modules/mediasource/MediaSourceInterfaceMainThread.h A Source/WebCore/Modules/mediasource/MediaSourceInterfaceProxy.h A Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp A Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.h M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/Modules/mediasource/SourceBuffer.idl M Source/WebCore/Modules/pictureinpicture/PictureInPictureWindow.cpp M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/bindings/js/SerializedScriptValue.cpp M Source/WebCore/bindings/js/SerializedScriptValue.h M Source/WebCore/bindings/js/WebCoreBuiltinNames.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/HTMLMediaElement.idl M Source/WebCore/html/track/AudioTrack.cpp M Source/WebCore/html/track/TrackListBase.cpp M Source/WebCore/html/track/TrackListBase.h M Source/WebCore/html/track/VideoTrack.cpp M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/MediaSourcePrivateClient.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/SourceBufferPrivateClient.h M Source/WebCore/platform/graphics/TrackPrivateBase.h M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h Log Message: --- [MSE] Add MediaSourceHandle object and update to MSE's latest spec (including MSE in worker) https://bugs.webkit.org/show_bug.cgi?id=269461 rdar://problem/123006531 Reviewed by Youenn Fablet. The MSE spec now defines that a MediaSource can be constructed in a DedicatedWorker and attached to a HTMLMediaElement running in the main thread through a MediaSourceHandle object. To determine if a MediaSource can be constructed in a DedicatedWorker a new attribute has been added. This commit adds support for all those latest functionalities and is placed behind a MediaSourceInWorker pref currently off by default. Some architectural explanations: The MediaSource and SourceBuffer were ThreadSafeRefCounted objects which was problematic as we couldn't guarantee which thread those objets would be destructed on. To solve this, we make MediaSource and SourceBuffer be RefCounted instead and use a ThreadSafeRefCounted {MediaSource|SourceBuffer}PrivateClient each providing a function dispatcher used for the {MediaSource|SourceBuffer}Private to communicate with their client. The function dispatcher guarantees that: 1- The function will always be run on the MediaSource's thread. 2- That the MediaSource hasn't been destructed in-between calls 3- That the MediaSource's readyState is not "Closed". As such, {MediaSource|SourceBuffer} methods are only ever called on the correct thread, it is no longer the responsibility of either the MediaSource or the SourceBuffer to run on the correct thread, so we can remove the now redundant `assertIsCurrent(m_dispatcher)` and the m_dispatcher member. Guarantees 2 and 3 allows to remove the checks made in each method, allowing to simplify the code. One of the existing complexity, was that the media element directly interacted with the MediaSource through both sync and asynchronous methods which is no longer a possibility if the MediaSource
[webkit-changes] [WebKit/WebKit] 06c272: Remove access from MediaPlayerPrivateMediaSource t...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 06c27265e8ab06e41c4f2265e3bba67d08446177 https://github.com/WebKit/WebKit/commit/06c27265e8ab06e41c4f2265e3bba67d08446177 Author: Jean-Yves Avenard Date: 2024-02-16 (Fri, 16 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp Log Message: --- Remove access from MediaPlayerPrivateMediaSource to MediaSourcePrivate::buffered https://bugs.webkit.org/show_bug.cgi?id=269560 rdar://problem/123074982 Reviewed by Youenn Fablet. When a MediaSource object is in use, the HTMLMediaElement retrieves the buffered directly from it rather than from the MediaPlayer/MediaPlayerPrivate. As such, we don't need to implement the buffered method for the MediaPlayerPrivateMediaSourceX. No change in observable behaviour, Covered by existing tests. * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::buffered const): (WebCore::MediaSource::hasBufferedTime): * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged): * Source/WebCore/platform/graphics/MediaSourcePrivate.cpp: (WebCore::MediaSourcePrivate::hasFutureTime const): (WebCore::MediaSourcePrivate::duration const): (WebCore::MediaSourcePrivate::buffered const): * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const): * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::buffered const): * Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: (WebCore::MockMediaPlayerMediaSource::buffered const): (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime): Canonical link: https://commits.webkit.org/274824@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] f76100: [MSE] GPUConnection::sendSync should only ever be ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f76100e64e9407be725c296707e69455cb3f8a18 https://github.com/WebKit/WebKit/commit/f76100e64e9407be725c296707e69455cb3f8a18 Author: Jean-Yves Avenard Date: 2024-02-15 (Thu, 15 Feb 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h Log Message: --- [MSE] GPUConnection::sendSync should only ever be performed on the main thread https://bugs.webkit.org/show_bug.cgi?id=269459 rdar://123005739 Reviewed by Youenn Fablet. We run the sendSync operation through the main thread, as running them through the MediaSourceRemote WorkQueue could trigger an assert in debug build or out of order events otherwise. The modified methods are already called on the main thread so we have no risk in introducing a dead lock. Covered by existing tests. No change of behaviour. * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::addSourceBuffer): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::canSwitchToType): (WebKit::SourceBufferPrivateRemote::evictCodedFrames): (WebKit::SourceBufferPrivateRemote::minimumUpcomingPresentationTimeForTrackID): * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: Canonical link: https://commits.webkit.org/274735@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 5821ff: Don't make HTMLMediaElement use WeakPtrImplWithEve...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5821ffe0a29ba84e770956937256eefb80c3f4b6 https://github.com/WebKit/WebKit/commit/5821ffe0a29ba84e770956937256eefb80c3f4b6 Author: Jean-Yves Avenard Date: 2024-02-13 (Tue, 13 Feb 2024) Changed paths: M Source/WebCore/Modules/WebGPU/GPUDevice.cpp M Source/WebCore/Modules/WebGPU/GPUDevice.h M Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.h M Source/WebCore/Modules/mediacontrols/MediaControlsHost.h M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/remoteplayback/RemotePlayback.h M Source/WebCore/dom/Document.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/MediaDocument.cpp M Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.h M Source/WebCore/inspector/agents/InspectorDOMAgent.h M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h M Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h M Source/WebKit/WebProcess/cocoa/TextTrackRepresentationCocoa.h M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h Log Message: --- Don't make HTMLMediaElement use WeakPtrImplWithEventTargetData https://bugs.webkit.org/show_bug.cgi?id=269282 rdar://122859494 Reviewed by Chris Dumez. A WeakPtr needs do be copyable across threads, which the WeakPtrImplWithEventTargetData argument prevents. We remove it. No change in observable behaviour. * Source/WebCore/Modules/WebGPU/GPUDevice.cpp: * Source/WebCore/Modules/WebGPU/GPUDevice.h: * Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.h: * Source/WebCore/Modules/mediacontrols/MediaControlsHost.h: * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/Modules/remoteplayback/RemotePlayback.h: * Source/WebCore/dom/Document.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::allMediaElements): (WebCore::HTMLMediaElement::updateActiveTextTrackCues): (WebCore::HTMLMediaElement::progressEventTimerFired): * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/html/MediaDocument.cpp: * Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.h: * Source/WebCore/inspector/agents/InspectorDOMAgent.h: * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h: * Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h: * Source/WebKit/WebProcess/cocoa/TextTrackRepresentationCocoa.h: * Source/WebKit/WebProcess/cocoa/VideoPresentationManager.h: Canonical link: https://commits.webkit.org/274570@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 1dff68: Add NativePromise::AutoRejectProducer object
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 1dff68a12c0366f37f3a93dfe94680f0c303d9d3 https://github.com/WebKit/WebKit/commit/1dff68a12c0366f37f3a93dfe94680f0c303d9d3 Author: Jean-Yves Avenard Date: 2024-02-13 (Tue, 13 Feb 2024) Changed paths: M Source/WTF/wtf/NativePromise.h M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp Log Message: --- Add NativePromise::AutoRejectProducer object https://bugs.webkit.org/show_bug.cgi?id=269185 rdar://122790738 Reviewed by Youenn Fablet. An AutoRejectProducer is a NativePromise::Producer that will automatically reject its promise if it's not been settled at the time it gets deleted. Add API tests. * Source/WTF/wtf/NativePromise.h: * Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/274535@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] fa279f: SourceBuffer.h:153:11: error: unknown type name 'S...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fa279f349603c5f908f4217d8c8f49e041315573 https://github.com/WebKit/WebKit/commit/fa279f349603c5f908f4217d8c8f49e041315573 Author: Jean-Yves Avenard Date: 2024-02-12 (Mon, 12 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h Log Message: --- SourceBuffer.h:153:11: error: unknown type name 'Settings' https://bugs.webkit.org/show_bug.cgi?id=269259 rdar://122843557 Unreviewed build fix. Add Settings forward declaration. * Source/WebCore/Modules/mediasource/SourceBuffer.h: Canonical link: https://commits.webkit.org/274513@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 21b659: TextTrack should be constructed with a ScriptExecu...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 21b659583b5f8410887b7fada7bf8775ced3f3db https://github.com/WebKit/WebKit/commit/21b659583b5f8410887b7fada7bf8775ced3f3db Author: Jean-Yves Avenard Date: 2024-02-12 (Mon, 12 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/html/HTMLTrackElement.h M Source/WebCore/html/track/InbandDataTextTrack.cpp M Source/WebCore/html/track/InbandDataTextTrack.h M Source/WebCore/html/track/InbandGenericTextTrack.cpp M Source/WebCore/html/track/InbandGenericTextTrack.h M Source/WebCore/html/track/InbandTextTrack.cpp M Source/WebCore/html/track/InbandTextTrack.h M Source/WebCore/html/track/InbandWebVTTTextTrack.cpp M Source/WebCore/html/track/InbandWebVTTTextTrack.h M Source/WebCore/html/track/LoadableTextTrack.cpp M Source/WebCore/html/track/TextTrack.cpp M Source/WebCore/html/track/TextTrack.h M Source/WebCore/html/track/VTTCue.cpp Log Message: --- TextTrack should be constructed with a ScriptExecutionContext rather than a Document https://bugs.webkit.org/show_bug.cgi?id=269181 rdar://122776217 Reviewed by Eric Carlson and Ryosuke Niwa. In order to have MSE in a Worker, we'll need to have {Text/Audio/Video} to be available in DedicatedWorker. This change just the TextTracks constructors to take a ScriptExecutionContext ; it still requires it to be a Document for now. * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): (WebCore::SourceBuffer::document const): Deleted. * Source/WebCore/Modules/mediasource/SourceBuffer.h: * Source/WebCore/html/HTMLTrackElement.h: * Source/WebCore/html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::InbandDataTextTrack): (WebCore::InbandDataTextTrack::create): (WebCore::InbandDataTextTrack::addDataCue): * Source/WebCore/html/track/InbandDataTextTrack.h: * Source/WebCore/html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): (WebCore::InbandGenericTextTrack::create): (WebCore::InbandGenericTextTrack::addGenericCue): (WebCore::InbandGenericTextTrack::parser): (WebCore::InbandGenericTextTrack::newCuesParsed): * Source/WebCore/html/track/InbandGenericTextTrack.h: * Source/WebCore/html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): (WebCore::InbandTextTrack::InbandTextTrack): * Source/WebCore/html/track/InbandTextTrack.h: * Source/WebCore/html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): (WebCore::InbandWebVTTTextTrack::create): (WebCore::InbandWebVTTTextTrack::parser): (WebCore::InbandWebVTTTextTrack::newCuesParsed): * Source/WebCore/html/track/InbandWebVTTTextTrack.h: * Source/WebCore/html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::LoadableTextTrack): * Source/WebCore/html/track/TextTrack.cpp: (WebCore::TextTrack::create): (WebCore::TextTrack::document const): Deleted. * Source/WebCore/html/track/TextTrack.h: * Source/WebCore/html/track/VTTCue.cpp: (WebCore::VTTCue::prepareToSpeak): Canonical link: https://commits.webkit.org/274455@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 2178ec: Remove MediaPlayerPrivateInterface::duration() and...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2178ec4c5a01347c4275adcbccdd86e1d053e5cd https://github.com/WebKit/WebKit/commit/2178ec4c5a01347c4275adcbccdd86e1d053e5cd Author: Jean-Yves Avenard Date: 2024-02-11 (Sun, 11 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/SourceBufferPrivate.h M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp M Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h M Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h Log Message: --- Remove MediaPlayerPrivateInterface::duration() and co. https://bugs.webkit.org/show_bug.cgi?id=269168 rdar://122743525 Reviewed by Eric Carlson. Once upon time, we had `currentTime()` and `duration()` that returned a float. We then had `currentTimeDouble()` and `durationDouble()` that returned a double. In 110313@main, MediaTime support was added and got quickly adopted across all the media stack. And so we now had `currentMediaTime()` and `durationMediaTime()`. The MediaTime prefix was added to all methods and members that were dealing with MediaTime (the object not the media's time). Now that we have eliminated all but the methods using MediaTime and that MediaTime is exclusively used to descrine a time, we no longer have to have MediaTime in the methods' name as when using any time values, a MediaTime type is implied. Rename only, no change in observable behaviour. * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::monitorSourceBuffers): * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::currentTime const): (WebCore::MediaSource::hasCurrentTime): (WebCore::MediaSource::hasFutureTime): (WebCore::MediaSource::currentMediaTime const): Deleted. * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::rangeRemoval): (WebCore::SourceBuffer::appendBufferInternal): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): (WebCore::SourceBuffer::canPlayThroughRange): (WebCore::SourceBuffer::memoryPressure): * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::duration const): (WebCore::MediaPlayer::currentTime const): (WebCore::MediaPlayer::currentTimeMayProgress const): (WebCore::MediaPlayer::maxTimeSeekable const): (WebCore::MediaPlayer::minTimeSeekable const): (WebCore::MediaPlayer::performTaskAtTime): (WebCore::MediaPlayer::performTaskAtMediaTime
[webkit-changes] [WebKit/WebKit] ac976a: NativePromise: ASSERTION FAILED: !m_callback
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ac976a6da88c92945dd495cc2a204d89a4953fe9 https://github.com/WebKit/WebKit/commit/ac976a6da88c92945dd495cc2a204d89a4953fe9 Author: Jean-Yves Avenard Date: 2024-02-11 (Sun, 11 Feb 2024) Changed paths: M Source/WTF/wtf/NativePromise.h M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp Log Message: --- NativePromise: ASSERTION FAILED: !m_callback https://bugs.webkit.org/show_bug.cgi?id=269160 rdar://122738739 Reviewed by Youenn Fablet. Following 273828@main, NativePromiseRequest now inherits from CanMakeWeakPtr, making it possible to disconnect it while not owning it. If the NativePromiseRequest was owned by the NativePromise callback, when disconnecting the NativePromiseRequest the callback would be deleted before the NativePromiseRequest::m_callback member got cleared, which trigger the assertion. We clear m_callback prior call disconnect(). Added API test. * Source/WTF/wtf/NativePromise.h: (WTF::NativePromiseRequest::disconnect): * Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/274448@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 2410dd: assertion failed in RemoteMediaResourceManager
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 2410dda9eaf439e0beaceb3b4b37d96a0eea7fe4 https://github.com/WebKit/WebKit/commit/2410dda9eaf439e0beaceb3b4b37d96a0eea7fe4 Author: Jean-Yves Avenard Date: 2024-02-11 (Sun, 11 Feb 2024) Changed paths: M Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp Log Message: --- assertion failed in RemoteMediaResourceManager https://bugs.webkit.org/show_bug.cgi?id=269159 rdar://122738285 Reviewed by Chris Dumez. A RemoteMediaResource may be holding a reference to the RemoteMediaResourceManager while on the PlatformMediaResourceLoader work queue. It is safe for the RemoteMediaResourceManager to be deleted on any threads. * Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp: (WebKit::RemoteMediaResourceManager::~RemoteMediaResourceManager): Canonical link: https://commits.webkit.org/274446@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] b0908a: [MSE] Remove HTMLMedia Element access from MediaSo...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b0908a7024e145b4957d96953f1576ce62db91a8 https://github.com/WebKit/WebKit/commit/b0908a7024e145b4957d96953f1576ce62db91a8 Author: Jean-Yves Avenard Date: 2024-02-11 (Sun, 11 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/ManagedMediaSource.h M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/MediaElementSession.cpp M Source/WebCore/html/MediaElementSession.h M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h M Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.h M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp M Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp M Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.h M Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp M Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h Log Message: --- [MSE] Remove HTMLMedia Element access from MediaSource https://bugs.webkit.org/show_bug.cgi?id=268796 rdar://122359957 Reviewed by Eric Carlson. If the MediaSource object lives in a worker thread, it will not be possible for it to access the HTMLMediaElement directly. We remove most access from the MediaSource to the media element. One attribute accessed often is the HTMLMediaElement's currentTime value. Instead we access the MediaPlayerPrivate value. As the HTMLMediaElement returns the seekTime if a seek has been started we need a way to reproduce a similar behaviour from the MediaPlayerPrivate. We add a `willSeekToTarget()` and `pendingSeekTime()` method that will receive the seek time from the HTMLMediaElement. To differentiate the behaviour between the actual player's time and what the time according to the media element is, we add a `currentOrPendingSeekTime` method. The handling of the Tracks hasn't been converted yet and will be done in a follow-up change. The MediaSourcePrivate::mediaTime method was duplicated in all implementations. To simplify, we move it to the base class. Fly-By: there were 3 virtual methods in the MediaPlayerPrivateInterface class to retrieve the current time. We only leave on: currentMediaTime. Fly-By: the static implementation to retrieve a SourceBuffer maximum size was living in the MediaElementSession. We move it to the SourceBuffer instead. Fly-By: The MockMediaPlayerMediaSource::isSeeking() would have always returned true before seeking at least once. Correct logic. Covered by existing tests, no change in observable behaviour. * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::isOpen const): Deleted. (WebCore::ManagedMediaSource::ensurePrefsRead): (WebCore::ManagedMediaSource::monitorSourceBuffers): (WebCore::ManagedMediaSource::isOpen const): * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::setPrivateAndOpen): (WebCore::MediaSource::currentMediaTime const): For consistency with other classes naming, rename currentTime() to currentMediaTime(). (WebCore::MediaSource::buffered const): (WebCore::MediaSource::completeSeek): (WebCore::MediaSource::hasBufferedTime): (WebCore::MediaSource
[webkit-changes] [WebKit/WebKit] 90086f: [MSE] Run MediaSourcePrivateRemote and SourceBuffe...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 90086fffd11ed100b343d615c03cf446a59734e0 https://github.com/WebKit/WebKit/commit/90086fffd11ed100b343d615c03cf446a59734e0 Author: Jean-Yves Avenard Date: 2024-02-09 (Fri, 09 Feb 2024) Changed paths: M Source/WTF/wtf/Forward.h M Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp M Source/WebCore/Modules/mediasource/ManagedMediaSource.h M Source/WebCore/Modules/mediasource/MediaSource.cpp M Source/WebCore/Modules/mediasource/MediaSource.h M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/graphics/MediaSourcePrivate.cpp M Source/WebCore/platform/graphics/MediaSourcePrivate.h M Source/WebCore/platform/graphics/MediaSourcePrivateClient.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/SourceBufferPrivate.h M Source/WebCore/platform/graphics/SourceBufferPrivateClient.h M Source/WebKit/CMakeLists.txt M Source/WebKit/DerivedSources-input.xcfilelist M Source/WebKit/DerivedSources-output.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp M Source/WebKit/WebKit.xcodeproj/project.pbxproj M Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h R Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.messages.in A Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemoteMessageReceiver.h A Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemoteMessageReceiver.messages.in M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h R Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in A Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemoteMessageReceiver.h A Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemoteMessageReceiver.messages.in Log Message: --- [MSE] Run MediaSourcePrivateRemote and SourceBufferPrivateRemote in a dedicated work queue https://bugs.webkit.org/show_bug.cgi?id=265982 rdar://119296319 Reviewed by Jer Noble. Make the MediaSourcePrivateRemote and SourceBufferPrivateRemote use a WorkQueueMessageReceiver with a dedicated WorkQueue. The threading model in the GPU process remains unchanged as the current implementations and relationship between SourceBufferPrivate and MediaPlayerPrivate rely heavily on the objects being main-thread only (in particular the extensive use of AVSampleBufferDisplayerLayer). >From an observer point of view in the content process, the various MSE objects >operations are now fully parallelised. The threading flow as such is now: Content Process: MediaSource (main thread) -> MediaSourcePrivateRemote (workqueue) SourceBuffer (main thread) -> SourceBufferPrivateRemote (workqueue) GPU Process: RemoteMediaSourceProxy (main thread) -> MediaSourcePrivate (main thread) RemoteSourceBufferProxy (main thread) -> SourceBufferPrivate (main thread) The MediaPlayerPrivate/MediaPlayerPrivateRemote runs on the main thread. Some MediaSourcePrivate methods had to be made thread-safe to more easily synchronise member attributes. Covered by existing tests, no change in observable behaviour. * Source/WTF/wtf/Forward.h: Add SerialFunctionDispatcher and RefCountedSerialFunctionDispatcher forward declaration. * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::elementDetached): (WebCore::ManagedMediaSource::setStreaming): (WebCore::ManagedMediaSource::monitorSourceBuffers): * Source/WebCore/Modules/mediasource/ManagedMediaSource.h: * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::MediaSource): (WebCore::MediaSource::waitForTarget): (WebCore::MediaSource::completeSeek): (WebCore::MediaSource::seekToTime): (WebCore::MediaSource::seekable): (WebCore::MediaSource::setLiveSeekableRange): (WebCore::MediaSource::clearLiveSeekableRange): (WebCore::MediaSource::hasBufferedTime): (WebCore::MediaSource::hasFutureTime): (WebCore::MediaSource::monitorSourceBuffers): (WebCore::MediaSource::setDuration): (We
[webkit-changes] [WebKit/WebKit] f9a82e: Add TimeProgressEstimator class
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: f9a82eb37c5e5616212cd4f208bb17b6cc45cc2f https://github.com/WebKit/WebKit/commit/f9a82eb37c5e5616212cd4f208bb17b6cc45cc2f Author: Jean-Yves Avenard Date: 2024-02-08 (Thu, 08 Feb 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h Log Message: --- Add TimeProgressEstimator class https://bugs.webkit.org/show_bug.cgi?id=268911 rdar://122463053 Reviewed by Eric Carlson and Youenn Fablet. Simplify and move the emulated time progress management to its own class. Fly-by: the time would have continued to progress when pause() was called (until we got a new time update from the GPU process), reading the time following a call to pause() would have temporarily returned the wrong value. When seeking, the time should have stopped until the GPU process signalled we had completed the seek. The class is thread-safe when used with MediaSource, when used with CRABS it will only be called from the main thread. Covered by existing tests. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::TimeProgressEstimator): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::currentTime const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::cachedTime const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::timeIsProgressing const): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::pause): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::setTime): (WebKit::MediaPlayerPrivateRemote::TimeProgressEstimator::setRate): (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::pause): (WebKit::MediaPlayerPrivateRemote::durationMediaTime const): (WebKit::MediaPlayerPrivateRemote::currentMediaTime const): (WebKit::MediaPlayerPrivateRemote::seekToTarget): (WebKit::MediaPlayerPrivateRemote::seeked): (WebKit::MediaPlayerPrivateRemote::rateChanged): (WebKit::MediaPlayerPrivateRemote::playbackStateChanged): (WebKit::MediaPlayerPrivateRemote::currentTimeChanged): (WebKit::MediaPlayerPrivateRemote::performTaskAtMediaTime): fly-by: completionHandler wasn't called under some circumstances. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/274278@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] b44284: Have MediaDescription stop using AtomString
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b4428489b41ebbeaa275341b74aec164fb693faa https://github.com/WebKit/WebKit/commit/b4428489b41ebbeaa275341b74aec164fb693faa Author: Jean-Yves Avenard Date: 2024-02-08 (Thu, 08 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/platform/MediaDescription.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.h M Source/WebCore/platform/mock/mediasource/MockBox.h M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp M Source/WebKit/GPUProcess/media/MediaDescriptionInfo.h M Source/WebKit/GPUProcess/media/MediaDescriptionInfo.serialization.in M Source/WebKit/GPUProcess/media/RemoteMediaDescription.h Log Message: --- Have MediaDescription stop using AtomString https://bugs.webkit.org/show_bug.cgi?id=268728 rdar://122292724 Reviewed by Youenn Fablet. Sub-task of 265982. To be used in WorkQueues, MediaDescription needs to stop using AtomString. Instead we make this object use ThreadSafeRefCount, and return a StringView which explicitly enforce that you can't extend the lifetime of the string outside the lifetime of the MediaDescription container. No change in observable behaviour. * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): (WebCore::SourceBuffer::validateInitializationSegment): * Source/WebCore/platform/MediaDescription.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp: * Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp: (WebCore::GStreamerMediaDescription::codec const): (WebCore::GStreamerMediaDescription::extractCodecName const): (WebCore::GStreamerMediaDescription::extractCodecName): Deleted. * Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.h: (WebCore::GStreamerMediaDescription::GStreamerMediaDescription): * Source/WebCore/platform/mock/mediasource/MockBox.h: * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp: * Source/WebKit/GPUProcess/media/MediaDescriptionInfo.h: (WebKit::MediaDescriptionInfo::MediaDescriptionInfo): * Source/WebKit/GPUProcess/media/MediaDescriptionInfo.serialization.in: * Source/WebKit/GPUProcess/media/RemoteMediaDescription.h: (WebKit::RemoteMediaDescription::RemoteMediaDescription): Canonical link: https://commits.webkit.org/274276@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 8904da: Have MediaDescription stop using AtomString
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8904da90987b4e0a99d4ea716053ee65a613e15b https://github.com/WebKit/WebKit/commit/8904da90987b4e0a99d4ea716053ee65a613e15b Author: Jean-Yves Avenard Date: 2024-02-06 (Tue, 06 Feb 2024) Changed paths: M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/platform/MediaDescription.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp M Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.h M Source/WebCore/platform/mock/mediasource/MockBox.h M Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp M Source/WebKit/GPUProcess/media/MediaDescriptionInfo.h M Source/WebKit/GPUProcess/media/MediaDescriptionInfo.serialization.in M Source/WebKit/GPUProcess/media/RemoteMediaDescription.h Log Message: --- Have MediaDescription stop using AtomString https://bugs.webkit.org/show_bug.cgi?id=268728 rdar://122292724 Reviewed by Youenn Fablet. Sub-task of 265982. To be used in WorkQueues, MediaDescription needs to stop using AtomString. Instead we make this object use ThreadSafeRefCount, and return a StringView which explicitly enforce that you can't extend the lifetime of the string outside the lifetime of the MediaDescription container. No change in observable behaviour. * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): (WebCore::SourceBuffer::validateInitializationSegment): * Source/WebCore/platform/MediaDescription.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm: * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp: * Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp: (WebCore::GStreamerMediaDescription::codec const): (WebCore::GStreamerMediaDescription::extractCodecName const): (WebCore::GStreamerMediaDescription::extractCodecName): Deleted. * Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaDescription.h: (WebCore::GStreamerMediaDescription::GStreamerMediaDescription): * Source/WebCore/platform/mock/mediasource/MockBox.h: * Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp: * Source/WebKit/GPUProcess/media/MediaDescriptionInfo.h: (WebKit::MediaDescriptionInfo::MediaDescriptionInfo): * Source/WebKit/GPUProcess/media/MediaDescriptionInfo.serialization.in: * Source/WebKit/GPUProcess/media/RemoteMediaDescription.h: (WebKit::RemoteMediaDescription::RemoteMediaDescription): Canonical link: https://commits.webkit.org/274178@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 0c04de: REGRESSION ( 273804@main?): [ Monterey+ wk2 Debug ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0c04dee512b16bccedaeab3981d30ad2e93b903c https://github.com/WebKit/WebKit/commit/0c04dee512b16bccedaeab3981d30ad2e93b903c Author: Jean-Yves Avenard Date: 2024-02-01 (Thu, 01 Feb 2024) Changed paths: M LayoutTests/platform/mac-wk2/TestExpectations Log Message: --- REGRESSION ( 273804@main?): [ Monterey+ wk2 Debug ] http/tests/media/video-useragent.html is a consistent crash https://bugs.webkit.org/show_bug.cgi?id=268507 rdar://122049030 Unreviewed test gardening. Cause for failures was fixed in 273892@main. * LayoutTests/platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/273899@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] e70021: REGRESSION (273804@main): [ macOS wk1 Debug ] http...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: e70021fd8743d5ae2174bbf43aaa707dc505b02b https://github.com/WebKit/WebKit/commit/e70021fd8743d5ae2174bbf43aaa707dc505b02b Author: Jean-Yves Avenard Date: 2024-02-01 (Thu, 01 Feb 2024) Changed paths: M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm Log Message: --- REGRESSION (273804@main): [ macOS wk1 Debug ] http/tests/media/video-throttled-load-metadata.html is a constant crash https://bugs.webkit.org/show_bug.cgi?id=268480 rdar://122025990 Reviewed by Youenn Fablet. 273804@main incorrectly removed the delayed task removal to perform the operation immediately. However, this method is called while iterating the HashTable from which we are removing the task causing the iterator to become invalid. Re-introduce the delayed operation, add comment in code. Covered by existing tests. * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm: (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived): Canonical link: https://commits.webkit.org/273892@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 05e445: [ SonomaB wk2 Debug arm64 ] http/tests/inspector/d...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 05e445aaf98a0afb586f0e5bfa9df422d082034a https://github.com/WebKit/WebKit/commit/05e445aaf98a0afb586f0e5bfa9df422d082034a Author: Jean-Yves Avenard Date: 2024-01-31 (Wed, 31 Jan 2024) Changed paths: M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/html/HTMLVideoElement.cpp Log Message: --- [ SonomaB wk2 Debug arm64 ] http/tests/inspector/dom/didFireEvent.html is a flaky crash https://bugs.webkit.org/show_bug.cgi?id=268423 rdar://121970654 Reviewed by Youenn Fablet. If the RenderLayerCompositor had queried the element's MediaPlayer::supportsAcceleratedRendering prior the player having been created it would have been set to false. Follow-up render after the MediaPlayerPrivate had been created would trigger an assertion. Prior 273406@main, the MediaPlayerPrivateRemote would call mediaPlayerRenderingModeChanged in its constructor hiding the issue. Generalise the fix to all MediaPlayerPrivate. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::mediaPlayerEngineUpdated): Canonical link: https://commits.webkit.org/273867@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 75bfd7: Perform media networking operations off the main t...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 75bfd79c190e9b11ce6e4677f6321d5d6432663a https://github.com/WebKit/WebKit/commit/75bfd79c190e9b11ce6e4677f6321d5d6432663a Author: Jean-Yves Avenard Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M Source/WebCore/loader/MediaResourceLoader.cpp M Source/WebCore/loader/MediaResourceLoader.h M Source/WebCore/loader/cache/CachedRawResourceClient.h M Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h M Source/WebCore/platform/graphics/WebMResourceClient.cpp M Source/WebCore/platform/graphics/WebMResourceClient.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h M Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.h M Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.h M Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaResource.cpp M Source/WebKit/GPUProcess/media/RemoteMediaResource.h M Source/WebKit/GPUProcess/media/RemoteMediaResourceLoader.cpp M Source/WebKit/GPUProcess/media/RemoteMediaResourceLoader.h M Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp M Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp Log Message: --- Perform media networking operations off the main thread https://bugs.webkit.org/show_bug.cgi?id=235353 rdar://84517825 Reviewed by Eric Carlson. We run the media's networking operation and IPC service into a new dedicated WorkQueue. A MediaResource still need to be created on the main thread due to the current architecture but all other operations will now run on a WorkQueue when the GPU Process is enabled. For WK1 or if no GPU process is in use, we continue to use the main thread. We use the IPC::Connection::WorkQueueMessageReceiver characteristics to proxy the network operations from the content process main thread to the GPU Process MediaResourceLoader's WorkQueue. Side-by fixes: various thread-safety fixes in WebCoreNSURLSession, access to some members weren't thread-safe. To make the code flow easier to follow, we use the new assertIsCurrent(WorkQueue&) extensively. Most methods will now assert that it runs on the thread it's supposed to. * Source/WebCore/loader/MediaResourceLoader.cpp: (WebCore::MediaResourceLoader::MediaResourceLoader): (WebCore::MediaResourceLoader::~MediaResourceLoader): (WebCore::MediaResourceLoader::contextDestroyed): (WebCore::MediaResourceLoader::sendH2Ping): (WebCore::MediaResourceLoader::requestResource): (WebCore::MediaResourceLoader::removeResource): (WebCore::MediaResourceLoader::addResponseForTesting): (WebCore::MediaResourceLoader::document): (WebCore::MediaResourceLoader::crossOriginMode const): (WebCore::MediaResourceLoader::responsesForTesting const): (WebCore::MediaResource::MediaResource): (WebCore::MediaResource::~MediaResource): (WebCore::MediaResource::shutdown): (WebCore::MediaResource::responseReceived): (WebCore::MediaResource::shouldCacheResponse): (WebCore::MediaResource::redirectReceived): (WebCore::MediaResource::dataSent): (WebCore::MediaResource::dataReceived): (WebCore::MediaResource::notifyFinished): (WebCore::MediaResource::ensureShutdown): (WebCore::MediaResource::stop): Deleted. * Source/WebCore/loader/MediaResourceLoader.h: * Source/WebCore/loader/cache/CachedRawResourceClient.h: * Source/WebCore/platform/graphics/PlatformMediaResourceLoader.h: (WebCore::PlatformMediaResourceLoader::targetQueue): (WebCore::PlatformMediaResource::didPassAccessControlCheck const): (WebCore::PlatformMediaResource::shutdown): (WebCore::PlatformMediaResource::setClient): (WebCore::PlatformMediaResource::client const): (WebCore::PlatformMediaResource::stop): Deleted. (WebCore::PlatformMediaResource::client): Deleted. * Source/WebCore/platform/graphics/WebMResourceClient.cpp: (WebCore::WebMResourceClient::stop): (WebCore::WebMResourceClient::dataReceived): (WebCore::WebMResourceClient::loadFailed): (WebCore::WebMResourceClient::loadFinished): * Source/WebCore/platform/graphics/WebMResourceClient.h: * Source/WebCore/plat
[webkit-changes] [WebKit/WebKit] 0ac4c7: Crash in fast/canvas/webgl/tex-image-and-uniform-b...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 0ac4c71a6f85d5ad6990964406778f007ee957b8 https://github.com/WebKit/WebKit/commit/0ac4c71a6f85d5ad6990964406778f007ee957b8 Author: Jean-Yves Avenard Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm Log Message: --- Crash in fast/canvas/webgl/tex-image-and-uniform-binding test https://bugs.webkit.org/show_bug.cgi?id=268372 rdar://121921205 Reviewed by Youenn Fablet. It was possible for m_videoLayer to be set to zero before we accessed it in the VideoPlaybackQualityMetrics WorkQueue. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics): (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics const): (WebCore::MediaPlayerPrivateAVFoundationObjC::asyncVideoPlaybackQualityMetrics): (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableHDR): Canonical link: https://commits.webkit.org/273785@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 54068d: Have ResourceResponse use String members instead o...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 54068d0bb01823cccf54d42a42187487e0c4b7c7 https://github.com/WebKit/WebKit/commit/54068d0bb01823cccf54d42a42187487e0c4b7c7 Author: Jean-Yves Avenard Date: 2024-01-30 (Tue, 30 Jan 2024) Changed paths: M Source/WebCore/Modules/fetch/FetchResponse.cpp M Source/WebCore/Modules/websockets/WebSocketHandshake.cpp M Source/WebCore/Modules/websockets/WebSocketHandshake.h M Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp M Source/WebCore/loader/DocumentLoader.cpp M Source/WebCore/loader/DocumentLoader.h M Source/WebCore/platform/network/BlobResourceHandle.cpp M Source/WebCore/platform/network/ResourceResponseBase.cpp M Source/WebCore/platform/network/ResourceResponseBase.h M Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp M Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp M Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp M Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp M Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp M Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp Log Message: --- Have ResourceResponse use String members instead of AtomString https://bugs.webkit.org/show_bug.cgi?id=268367 rdar://121916584 Reviewed by Youenn Fablet. To be usable with WorkQueue, we can't use AtomString with ResourceResponse. So we change the members to be String instead. No change in observable behaviour. * Source/WebCore/Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::create): * Source/WebCore/Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::readServerHandshake): (WebCore::WebSocketHandshake::readStatusLine): * Source/WebCore/Modules/websockets/WebSocketHandshake.h: * Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::interceptWithResponse): (WebCore::InspectorNetworkAgent::interceptRequestWithResponse): * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setResponseMIMEType): * Source/WebCore/loader/DocumentLoader.h: * Source/WebCore/platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnSuccess): * Source/WebCore/platform/network/ResourceResponseBase.cpp: (WebCore::m_textEncodingName): (WebCore::m_httpStatusText): (WebCore::m_httpVersion): (WebCore::ResourceResponseBase::crossThreadData const): (WebCore::ResourceResponseBase::fromCrossThreadData): (WebCore::ResourceResponseBase::mimeType const): (WebCore::ResourceResponseBase::setMimeType): (WebCore::ResourceResponseBase::textEncodingName const): (WebCore::ResourceResponseBase::setTextEncodingName): (WebCore::ResourceResponseBase::httpStatusText const): (WebCore::ResourceResponseBase::setHTTPStatusText): (WebCore::ResourceResponseBase::httpVersion const): (WebCore::ResourceResponseBase::setHTTPVersion): (WebCore::ResourceResponseBase::getResponseData const): * Source/WebCore/platform/network/ResourceResponseBase.h: * Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::appendHTTPHeaderField): * Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::ResourceResponse): * Source/WebKit/NetworkProcess/NetworkDataTaskBlob.cpp: (WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponse): * Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp: (WebKit::ServiceWorkerFetchTask::processResponse): * Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp: (WebKit::NetworkDataTaskSoup::didGetFileInfo): * Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp: (webkit_uri_response_get_mime_type): * Source/WebKit/UIProcess/API/glib/WebKitURISchemeRequest.cpp: (webkitURISchemeRequestReadCallback): Canonical link: https://commits.webkit.org/273784@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] d7e3d4: Add MessageSender::sendWithPromisedReply
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d7e3d4c8f5ed075596a97e505ae06c542cfbafb6 https://github.com/WebKit/WebKit/commit/d7e3d4c8f5ed075596a97e505ae06c542cfbafb6 Author: Jean-Yves Avenard Date: 2024-01-29 (Mon, 29 Jan 2024) Changed paths: M Source/WebKit/Platform/IPC/MessageSender.h M Source/WebKit/Platform/IPC/MessageSenderInlines.h M Tools/TestWebKitAPI/Tests/IPC/MessageSenderTests.cpp Log Message: --- Add MessageSender::sendWithPromisedReply https://bugs.webkit.org/show_bug.cgi?id=268032 rdar://121551204 Reviewed by Youenn Fablet. Add sendWithPromisedReply methods to MessageSender for consistency with Connection. * Source/WebKit/Platform/IPC/MessageSender.h: * Source/WebKit/Platform/IPC/MessageSenderInlines.h: (IPC::MessageSender::sendWithPromisedReply): * Tools/TestWebKitAPI/Tests/IPC/MessageSenderTests.cpp: (TestWebKitAPI::TEST_P): Canonical link: https://commits.webkit.org/273713@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] d7e69a: [AVFObjC] [AVPlayerLayer videoPerformanceMetrics] ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d7e69a605f2ae52d006f4716edccd688fc6cba17 https://github.com/WebKit/WebKit/commit/d7e69a605f2ae52d006f4716edccd688fc6cba17 Author: Jean-Yves Avenard Date: 2024-01-26 (Fri, 26 Jan 2024) Changed paths: M LayoutTests/media/media-source/media-source-video-playback-quality-expected.txt M LayoutTests/media/media-source/media-source-video-playback-quality.html M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/platform/PlatformMediaError.cpp M Source/WebCore/platform/PlatformMediaError.h M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/VideoPlaybackQualityMetrics.h M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in Log Message: --- [AVFObjC] [AVPlayerLayer videoPerformanceMetrics] may deadlock https://bugs.webkit.org/show_bug.cgi?id=268136 rdar://121637422 Reviewed by Youenn Fablet. A call to [AVPlayerLayer videoPerformanceMetrics] may deadlock if the AVPlayer is also waiting in the main thread for more data to be delivered. This commonly occurs when there are lots of videos playing at once and result in a blocked GPU process. Dealing with getting the networking data being delivered on the main thread will be dealt in bug 235353. For now, call [AVPlayerLayer videoPerformanceMetrics] on a different WorkQueue. The RemoteMediaPlayerProxy already regularly polls the MediaPlayerPrivate for the videoPlaybackQualityMetrics, so performing the actions asynchronously doesn't have a measurable impact. And it does prevent the GPU process to be deadlock. Fly-by: While the VideoPlaybackQualityMetrics were properly calculated and updated in the GPU process at a set interval, the values weren't being sent to the Content Process except under some limited circumstances (video got paused, started playing or stall). As such, retrieving the VideoPlaybackQuality from the video element would typically always return the same values. * LayoutTests/media/media-source/media-source-video-playback-quality-expected.txt: * LayoutTests/media/media-source/media-source-video-playback-quality.html: The quality metrics are calculated every 0.25s (250ms) but we were only waiting for 50ms. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::getVideoPlaybackQuality): * Source/WebCore/platform/PlatformMediaError.cpp: Adding new error code. A prior change was incomplete and failed to add the serialisation data. (WebCore::convertEnumerationToString): * Source/WebCore/platform/PlatformMediaError.h: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::asyncVideoPlaybackQualityMetrics): * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.cpp: (WebCore::MediaPlayerPrivateInterface::asyncVideoPlaybackQualityMetrics): * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: * Source/WebCore/platform/graphics/VideoPlaybackQualityMetrics.h: (WebCore::VideoPlaybackQualityMetrics::operator+=): * Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::asyncVideoPlaybackQualityMetrics): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::maybeUpdateCachedVideoMetrics): (WebKit::RemoteMediaPlayerProxy::updateCachedVideoMetrics): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::updatePlaybackQualityMetrics): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: Add specific message for sending the VideoPlaybackQualityMetrics, as sending the entire cached state is expensive (particularly reading the video time). Canonical link: https://commits.webkit.org/273580@main ___ webkit-changes mailing list webkit-changes
[webkit-changes] [WebKit/WebKit] 898046: REGRESSION (268393@main?): [Monterey wk2 ] importe...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 8980462404361da0de70d600de61b1361ebd88be https://github.com/WebKit/WebKit/commit/8980462404361da0de70d600de61b1361ebd88be Author: Jean-Yves Avenard Date: 2024-01-26 (Fri, 26 Jan 2024) Changed paths: M LayoutTests/platform/mac-monterey-wk2/TestExpectations R LayoutTests/platform/mac-monterey-wk2/imported/w3c/web-platform-tests/mimesniff/media/media-sniff.window-expected.txt M LayoutTests/platform/mac-wk2/TestExpectations Log Message: --- REGRESSION (268393@main?): [Monterey wk2 ] imported/w3c/web-platform-tests/mimesniff/media/media-sniff.window.html is a consistent failure https://bugs.webkit.org/show_bug.cgi?id=268095 rdar://121611809 Unreviewed TestExpectations update. WebM is now supported on all platforms by WK1 * LayoutTests/platform/mac-monterey-wk2/TestExpectations: * LayoutTests/platform/mac-monterey-wk2/imported/w3c/web-platform-tests/mimesniff/media/media-sniff.window-expected.txt: Removed. * LayoutTests/platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/273558@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 82020f: Unused member WebMResourceClientParent::m_buffer
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 82020f502c2444bfa7923579957e4e3fe7096593 https://github.com/WebKit/WebKit/commit/82020f502c2444bfa7923579957e4e3fe7096593 Author: Jean-Yves Avenard Date: 2024-01-24 (Wed, 24 Jan 2024) Changed paths: M Source/WebCore/platform/graphics/WebMResourceClient.cpp M Source/WebCore/platform/graphics/WebMResourceClient.h Log Message: --- Unused member WebMResourceClientParent::m_buffer https://bugs.webkit.org/show_bug.cgi?id=268041 rdar://121560631 Reviewed by Eric Carlson. Remove member. No change in observable behaviour. * Source/WebCore/platform/graphics/WebMResourceClient.cpp: (WebCore::WebMResourceClient::dataReceived): * Source/WebCore/platform/graphics/WebMResourceClient.h: Canonical link: https://commits.webkit.org/273466@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 6bf767: REGRESSION (268393@main): [ Monterey Ventura Debug...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 6bf767bc41419a266bac5b934afcbe5c6f74d0b3 https://github.com/WebKit/WebKit/commit/6bf767bc41419a266bac5b934afcbe5c6f74d0b3 Author: Jean-Yves Avenard Date: 2024-01-24 (Wed, 24 Jan 2024) Changed paths: M LayoutTests/platform/ios/TestExpectations M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h Log Message: --- REGRESSION (268393@main): [ Monterey Ventura Debug wk2 ] ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData) https://bugs.webkit.org/show_bug.cgi?id=267661 rdar://121154236 Reviewed by Eric Carlson and Simon Fraser. It was possible the MediaPlayerPrivate's accelerated rendering capability to change without a required match to MediaPlayer::renderingModeChanged. We were querying the old value of MediaPlayer::renderingCanBeAccelerated after modifying a class member that would impact what the new value would be. Compare with the previous value and call renderingModeChanged if required. Covered by existing tests. * LayoutTests/platform/ios/TestExpectations: Remove obsolete expectations as original bug got fixed. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Remove unnecessary call to renderModeChanged as removing the audio layer doesn't impact how images are rendered. * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::destroyAudioRenderers): Same as above. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): There's no need to send to the GPU process that the rendering has mode has changed as both content process and GPU process' player values are initialised to false. (WebKit::MediaPlayerPrivateRemote::readyStateChanged): (WebKit::MediaPlayerPrivateRemote::acceleratedRenderingStateChanged): (WebKit::MediaPlayerPrivateRemote::updateConfiguration): (WebKit::MediaPlayerPrivateRemote::setVideoFullscreenLayer): (WebKit::MediaPlayerPrivateRemote::checkAcceleratedRenderingState): Deleted. * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/273406@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] cb6bd9: [iOS] Prefer video sources with hardware accelerat...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cb6bd9411341625cedfc80e421782d3e47c08fc3 https://github.com/WebKit/WebKit/commit/cb6bd9411341625cedfc80e421782d3e47c08fc3 Author: Jean-Yves Avenard Date: 2024-01-20 (Sat, 20 Jan 2024) Changed paths: A LayoutTests/media/content/h264-aac-good.mp4 A LayoutTests/media/content/h264-aac-good.png A LayoutTests/media/content/vp8-opus-bad.png A LayoutTests/media/content/vp8-opus-bad.webm A LayoutTests/media/ios/media-sources-selection-expected.html A LayoutTests/media/ios/media-sources-selection.html A LayoutTests/media/media-sources-selection-expected.html A LayoutTests/media/media-sources-selection.html M LayoutTests/platform/ios/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/MediaPlayerPrivate.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h Log Message: --- [iOS] Prefer video sources with hardware accelerated decoder. https://bugs.webkit.org/show_bug.cgi?id=267753 rdar://120679553 Reviewed by Youenn Fablet. The MediaPlayer::shouldCheckHardwareSupport got broken when the GPU process was enabled and the code to ensure that hardware decoding was required to allow playback became non-functional. We correct this problem and make use of it with the WebM player so that if a VP8 or VP9 track is present without a hardware decoder decoding will fail and we will fallback to the next source alternative. Adding tests * LayoutTests/media/content/h264-aac-good.mp4: Added. * LayoutTests/media/content/h264-aac-good.png: Added. * LayoutTests/media/content/vp8-opus-bad.png: Added. * LayoutTests/media/content/vp8-opus-bad.webm: Added. * LayoutTests/media/ios/media-sources-selection-expected.html: Added. * LayoutTests/media/ios/media-sources-selection.html: Added. * LayoutTests/media/media-sources-selection-expected.html: Added. * LayoutTests/media/media-sources-selection.html: Added. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::loadWithNextMediaEngine): (WebCore::MediaPlayer::setShouldCheckHardwareSupport): (WebCore::MediaPlayer::shouldCheckHardwareSupport const): Deleted. * Source/WebCore/platform/graphics/MediaPlayer.h: * Source/WebCore/platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setShouldCheckHardwareSupport): (WebCore::MediaPlayerPrivateInterface::shouldCheckHardwareSupport const): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::trackIsPlayable const): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldCheckHardwareSupport const): Deleted. * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::didParseInitializationData): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::mediaPlayerShouldCheckHardwareSupport const): (WebKit::RemoteMediaPlayerProxy::setShouldCheckHardwareSupport): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in: * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::setShouldCheckHardwareSupport): * Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/273271@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 3ed8ad: WebMResourceClientParent::loadFinished parameter i...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3ed8adb00eb77e854ded172772b928e2d30ab534 https://github.com/WebKit/WebKit/commit/3ed8adb00eb77e854ded172772b928e2d30ab534 Author: Jean-Yves Avenard Date: 2024-01-17 (Wed, 17 Jan 2024) Changed paths: M Source/WebCore/platform/graphics/WebMResourceClient.cpp M Source/WebCore/platform/graphics/WebMResourceClient.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm Log Message: --- WebMResourceClientParent::loadFinished parameter is unused https://bugs.webkit.org/show_bug.cgi?id=267669 rdar://121158587 Reviewed by Eric Carlson. The parameter provided to WebMResourceClientParent::loadFinished is unused. It could also potentially cause an issue if somehow loadFinished was incorrectly called before dataReceived. * Source/WebCore/platform/graphics/WebMResourceClient.cpp: (WebCore::WebMResourceClient::loadFinished): * Source/WebCore/platform/graphics/WebMResourceClient.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::loadFinished): Canonical link: https://commits.webkit.org/273164@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 7da407: [ Sonoma wk2 x86_64 ] media/media-vp8-webm.html i...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7da407dc476c22e70f16c06b1f26eebcba0a0cb4 https://github.com/WebKit/WebKit/commit/7da407dc476c22e70f16c06b1f26eebcba0a0cb4 Author: Jean-Yves Avenard Date: 2024-01-17 (Wed, 17 Jan 2024) Changed paths: M LayoutTests/media/media-vp8-webm.html M LayoutTests/platform/mac-wk2/TestExpectations Log Message: --- [ Sonoma wk2 x86_64 ] media/media-vp8-webm.html is consistent image failure (267650) https://bugs.webkit.org/show_bug.cgi?id=267657 rdar://121144438 Unreviewed test gardening. The reference image only differs by a few pixels for unknown reasons. It looks like that colours are bleeding in the black background on intel different to apple silicon. * LayoutTests/media/media-vp8-webm.html: Loosen range. * LayoutTests/platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/273155@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 925970: MediaPlayerPrivateWebM caused the seeked event to ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 925970b7979d9517eebb9014b76ef399c9572f4a https://github.com/WebKit/WebKit/commit/925970b7979d9517eebb9014b76ef399c9572f4a Author: Jean-Yves Avenard Date: 2024-01-16 (Tue, 16 Jan 2024) Changed paths: A LayoutTests/media/content/test-vp8.webm A LayoutTests/media/content/test-vp8.webm.png A LayoutTests/media/media-vp8-webm-expected.html A LayoutTests/media/media-vp8-webm.html M LayoutTests/platform/mac-wk1/TestExpectations M LayoutTests/platform/mac-wk2/TestExpectations M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Log Message: --- MediaPlayerPrivateWebM caused the seeked event to be fired before the seek has completed. https://bugs.webkit.org/show_bug.cgi?id=267326 rdar://120776794 Reviewed by Youenn Fablet. MediaPlayerPrivateWebM only implemented the most basic of seeking operation. We copy the logic from the MediaPlayerPrivateMediaSourceAVFObjC into the WebM player. Now the seeked event will only be fired once the seek operation has completed and once the frame at the seek operation has completed. The WebM player would also always start playback after a seek regardless of the element playing prior the operation, only resume playback if we were seeking before. Following a call to flush() WebCoreDecompressionSession could continue delivering in-flight decompressed frame. We modify it so that we can guarantee that no frames enqueued before the call to flush() can get delivered. This is done by using NativePromise to track the actual decoding and storing the flushId value at the start of the decoding, and to stop delivering the frame if that flushId has changed. Add tests. On macOS < 14 and iOS < 17; the required `isReadyForDisplay` API to accurately determine that a frame got painted doesn't exist. * LayoutTests/media/content/test-vp8.webm: Added. * LayoutTests/media/content/test-vp8.webm.png: Added. * LayoutTests/media/media-vp8-webm-expected.html: Added. * LayoutTests/media/media-vp8-webm.html: Added. * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::MediaPlayerPrivateWebM): (WebCore::MediaPlayerPrivateWebM::~MediaPlayerPrivateWebM): (WebCore::MediaPlayerPrivateWebM::play): (WebCore::MediaPlayerPrivateWebM::pause): (WebCore::MediaPlayerPrivateWebM::seekToTarget): (WebCore::MediaPlayerPrivateWebM::seekInternal): (WebCore::MediaPlayerPrivateWebM::maybeCompleteSeek): (WebCore::MediaPlayerPrivateWebM::seeking const): (WebCore::MediaPlayerPrivateWebM::clampTimeToLastSeekTime const): (WebCore::MediaPlayerPrivateWebM::shouldBePlaying const): (WebCore::MediaPlayerPrivateWebM::setRateDouble): (WebCore::MediaPlayerPrivateWebM::setHasAvailableVideoFrame): (WebCore::MediaPlayerPrivateWebM::enqueueSample): (WebCore::MediaPlayerPrivateWebM::destroyDecompressionSession): (WebCore::MediaPlayerPrivateWebM::layerDidReceiveError): (WebCore::MediaPlayerPrivateWebM::layerReadyForDisplayChanged): * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: Remove unused m_consumerQueue related code * Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm: (WebCore::WebCoreDecompressionSession::enqueueSample): (WebCore::WebCoreDecompressionSession::enqueueCompressedSample): (WebCore::WebCoreDecompressionSession::maybeDecodeNextSample): (WebCore::WebCoreDecompressionSession::decodeSample): (WebCore::WebCoreDecompressionSession::handleDecompressionOutput): (WebCore::WebCoreDecompressionSession::isReadyForMoreMediaData const): (WebCore::WebCoreDecompressionSession::flush): (WebCore::WebCoreDecompressionSession::finishCurrentDecodingAndReportError): Deleted. (WebCore::WebCoreDecompressionSession::finishCurrentDecodingAndDecodeNextSample): Deleted. Canonical link: https://commits.webkit.org/273109@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 9c7ab0: [MSE] Occasional crash when running imported/w3c/w...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 9c7ab02cddd074e5a299ba77cdf6ca2948c30d53 https://github.com/WebKit/WebKit/commit/9c7ab02cddd074e5a299ba77cdf6ca2948c30d53 Author: Jean-Yves Avenard Date: 2024-01-16 (Tue, 16 Jan 2024) Changed paths: M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp Log Message: --- [MSE] Occasional crash when running imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html https://bugs.webkit.org/show_bug.cgi?id=267608 rdar://121011624 Reviewed by Jer Noble. WeakPtr value wasn't checked. * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp: (WebKit::SourceBufferPrivateRemote::append): Canonical link: https://commits.webkit.org/273104@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] ac3459: MediaPlayerPrivateWebM doesn't handle decoding err...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ac3459ad6236a13dcf9c63728c820c6eb722f56d https://github.com/WebKit/WebKit/commit/ac3459ad6236a13dcf9c63728c820c6eb722f56d Author: Jean-Yves Avenard Date: 2024-01-12 (Fri, 12 Jan 2024) Changed paths: A LayoutTests/media/content/garbage.webm A LayoutTests/media/media-vp8-webm-error-expected.txt A LayoutTests/media/media-vp8-webm-error.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/PlatformMac.cmake M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj A Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.h A Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm M Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm Log Message: --- MediaPlayerPrivateWebM doesn't handle decoding errors. https://bugs.webkit.org/show_bug.cgi?id=267165 rdar://120570295 Reviewed by Youenn Fablet. The MediaPlayerPrivateWebM didn't listen for error from either the AVSampleBufferDisplayLayer nor the AVSampleBufferAudioRenderer. We extract the code from the SourceBufferPrivateAVFObjC and create a new WebAVSampleBufferListener class. Add test. * LayoutTests/media/content/garbage.webm: Added. * LayoutTests/media/media-vp8-webm-error-expected.txt: Added. * LayoutTests/media/media-vp8-webm-error.html: Added. * Source/WebCore/PlatformMac.cmake: * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.h: Added. (WebCore::WebAVSampleBufferListenerClient::layerDidReceiveError): (WebCore::WebAVSampleBufferListenerClient::layerRequiresFlushToResumeDecodingChanged): (WebCore::WebAVSampleBufferListenerClient::layerReadyForDisplayChanged): (WebCore::WebAVSampleBufferListenerClient::rendererDidReceiveError): (WebCore::WebAVSampleBufferListenerClient::rendererWasAutomaticallyFlushed): (WebCore::WebAVSampleBufferListenerClient::outputObscuredDueToInsufficientExternalProtectionChanged): * Source/WebCore/platform/graphics/avfoundation/WebAVSampleBufferListener.mm: Added. (-[WebAVSampleBufferListenerPrivate initWithClient:]): (-[WebAVSampleBufferListenerPrivate invalidate]): (-[WebAVSampleBufferListenerPrivate beginObservingLayer:]): (-[WebAVSampleBufferListenerPrivate stopObservingLayer:]): (-[WebAVSampleBufferListenerPrivate beginObservingRenderer:]): (-[WebAVSampleBufferListenerPrivate stopObservingRenderer:]): (-[WebAVSampleBufferListenerPrivate observeValueForKeyPath:ofObject:change:context:]): (-[WebAVSampleBufferListenerPrivate layerFailedToDecode:]): (-[WebAVSampleBufferListenerPrivate layerRequiresFlushToResumeDecodingChanged:]): (-[WebAVSampleBufferListenerPrivate layerReadyForDisplayChanged:]): (-[WebAVSampleBufferListenerPrivate audioRendererWasAutomaticallyFlushed:]): (WebCore::WebAVSampleBufferListener::WebAVSampleBufferListener): (WebCore::WebAVSampleBufferListener::invalidate): (WebCore::WebAVSampleBufferListener::beginObservingLayer): (WebCore::WebAVSampleBufferListener::stopObservingLayer): (WebCore::WebAVSampleBufferListener::beginObservingRenderer): (WebCore::WebAVSampleBufferListener::stopObservingRenderer): * Source/WebCore/platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): (-[WebAVSampleBufferListener initWithParent:]): Deleted. (-[WebAVSampleBufferListener dealloc]): Deleted. (-[WebAVSampleBufferListener invalidate]): Deleted. (-[WebAVSampleBufferListener beginObservingLayer:]): Deleted. (-[WebAVSampleBufferListener stopObservingLayer:]): Deleted. (-[WebAVSampleBufferListener beginObservingRenderer:]): Deleted. (-[WebAVSampleBufferListener stopObservingRenderer:]): Deleted. (-[WebAVSampleBufferListener observeValueForKeyPath:ofObject:change:context:]): Deleted. (-[WebAVSampleBufferListener layerFailedToDecode:]): Deleted. (-[WebAVSampleBufferListener layerRequiresFlushToResumeDecodingChanged:]): Deleted. (-[WebAVSampleBufferListener layerReadyForDisplayChanged:]): Deleted
[webkit-changes] [WebKit/WebKit] 709636: [iOS] WebM video does not display
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 7096369deae13feb0406190c08315fb99d5ae28d https://github.com/WebKit/WebKit/commit/7096369deae13feb0406190c08315fb99d5ae28d Author: Jean-Yves Avenard Date: 2024-01-08 (Mon, 08 Jan 2024) Changed paths: M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/platform/PlatformMediaError.h M Source/WebCore/platform/VideoDecoder.cpp M Source/WebCore/platform/VideoDecoder.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm A Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h A Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.cpp M Source/WebCore/platform/graphics/gstreamer/VideoDecoderGStreamer.h M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp M Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.h M Source/WebKit/WebProcess/GPU/media/RemoteVideoCodecFactory.cpp Log Message: --- [iOS] WebM video does not display https://bugs.webkit.org/show_bug.cgi?id=266748 rdar://119493652 Reviewed by Youenn Fablet. We registered the VP8 decoder in both the content and GPU process but on iOS decoding was done in mediaserverd. So instead we decode in the GPU process before passing the decoded frames to the AVSBDL. This is achieved with a new VideoMediaSampleRenderer AVSBDL wrapper which will first decode as necessary. For VP8 and VP9 (where hardware decoding isn't available), on iOS we use the WebCodec's VideoDecoder as the decoders aren't available in mediaserverd process. To not have to rely on WebCodec being conditionally enabled, we make VideoDecoder available even when ENABLE_WEB_CODECS isn't set. Add VideoDecoder config option to use a CVPixelBufferPool as CoreMedia requires the use of IOSurface backed CVPixelBuffer. We don't make this option the default to prevent unexpected regressions that would impact WebCodecs. Manually tested on iOS as currently all webm tests are disabled on iOS. * Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp: (WebCore::createVideoDecoderConfig): * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/PlatformMediaError.h: * Source/WebCore/platform/VideoDecoder.cpp: (WebCore::VideoDecoder::fourCCToCodecString): (WebCore::VideoDecoder::createLocalDecoder): * Source/WebCore/platform/VideoDecoder.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): (WebCore::SourceBufferPrivateAVFObjC::setCDMInstance): (WebCore::SourceBufferPrivateAVFObjC::flushIfNeeded): (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged): (WebCore::SourceBufferPrivateAVFObjC::layerRequiresFlushToResumeDecodingChanged): (WebCore::SourceBufferPrivateAVFObjC::layerReadyForDisplayChanged): (WebCore::SourceBufferPrivateAVFObjC::flushVideo): (WebCore::SourceBufferPrivateAVFObjC::canEnqueueSample): (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): (WebCore::SourceBufferPrivateAVFObjC::enqueueSampleBuffer): (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): (WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const): (WebCore::SourceBufferPrivateAVFObjC::setMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivateAVFObjC::clearMinimumUpcomingPresentationTime): (WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h: * Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm: (WebCore::MediaPlayerPrivateWebM::platformLayer const): (WebCore::MediaPlayerPrivateWebM::updateLastPixelBuffer): (WebCore::MediaPlayerPrivateWebM::shouldEnsureLayer const): (WebCore::MediaPlayerPrivateWebM::setPresentationSize): (WebCore::MediaPlayerPrivateWebM::enqueueSample): (WebCore::MediaPlayerPrivateWebM::notifyClientWhenReadyForMoreSamples): (WebCore::MediaPlayerPrivateWebM::setMinimumUpcomingPresentationTime): (WebCore::MediaPlayerPrivateWebM::clearMinimumUpcomingPresentationTime): (WebCore
[webkit-changes] [WebKit/WebKit] ab512f: [MSE] MediaSourcePrivateRemote hiding base m_sourc...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ab512fb562c34ab3f456c6af0ca4e69bde3d5b85 https://github.com/WebKit/WebKit/commit/ab512fb562c34ab3f456c6af0ca4e69bde3d5b85 Author: Jean-Yves Avenard Date: 2023-12-15 (Fri, 15 Dec 2023) Changed paths: M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h Log Message: --- [MSE] MediaSourcePrivateRemote hiding base m_sourceBuffers member https://bugs.webkit.org/show_bug.cgi?id=266447 rdar://119694935 Reviewed by Jer Noble. Missed in 270354@main. * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::mediaSourcePrivateShuttingDown): * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h: * Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h: (isType): Adding TypeTrait for downcast to work. Canonical link: https://commits.webkit.org/272098@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 9f3ddc: REGRESSION (271514@main): MSE Live playback fails ...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 9f3ddc119f3ec5ccf79bf50cc76d3e81f03b1cba https://github.com/WebKit/WebKit/commit/9f3ddc119f3ec5ccf79bf50cc76d3e81f03b1cba Author: Jean-Yves Avenard Date: 2023-12-14 (Thu, 14 Dec 2023) Changed paths: A LayoutTests/media/media-source/media-source-append-buffer-durationchange-expected.txt A LayoutTests/media/media-source/media-source-append-buffer-durationchange.html M Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm M Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp M Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp Log Message: --- REGRESSION (271514@main): MSE Live playback fails on umediaserver.net https://bugs.webkit.org/show_bug.cgi?id=266385 rdar://119615258 Reviewed by Jer Noble. Changes in 271514@main exposed an underlying existing issue. The MediaSource's duration was initialised to NaN but the GPU process one was initialised to 0. Following 271514@main the inital value would be identical. If the media source duration was set prior any sourcebuffer being created, we wouldn't set the SourceBuffer initial duration, and the step `If the media segment contains data beyond the current duration, then run the duration change algorithm with new duration set to the maximum of the current duration and the [[group end timestamp]].` would always be skipped. We set the initial duration to the sourceBuffer when created. Add tests. * LayoutTests/media/media-source/media-source-append-buffer-durationchange-expected.txt: Added. * LayoutTests/media/media-source/media-source-append-buffer-durationchange.html: Added. * Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer): * Source/WebCore/platform/graphics/gstreamer/mse/MediaSourcePrivateGStreamer.cpp: (WebCore::MediaSourcePrivateGStreamer::addSourceBuffer): * Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp: (WebCore::MockMediaSourcePrivate::addSourceBuffer): Canonical link: https://commits.webkit.org/272025@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [WebKit/WebKit] 28e996: [ManagedMSE] bufferedchange event isn't fired when...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 28e996fdbabd4690fb1937ca2f261ceb42b7883f https://github.com/WebKit/WebKit/commit/28e996fdbabd4690fb1937ca2f261ceb42b7883f Author: Jean-Yves Avenard Date: 2023-12-11 (Mon, 11 Dec 2023) Changed paths: A LayoutTests/media/media-source/content/test-fragmented.webm A LayoutTests/media/media-source/media-managedmse-multipletracks-bufferedchange-expected.txt A LayoutTests/media/media-source/media-managedmse-multipletracks-bufferedchange.html M LayoutTests/media/media-source/mock-managedmse-bufferedchange-expected.txt M LayoutTests/media/media-source/mock-managedmse-bufferedchange.html M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/mac-wk1/TestExpectations M Source/WebCore/Modules/mediasource/SourceBuffer.cpp M Source/WebCore/Modules/mediasource/SourceBuffer.h M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp M Source/WebCore/platform/graphics/SourceBufferPrivate.h M Source/WebCore/platform/graphics/SourceBufferPrivateClient.h M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h M Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h M Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in Log Message: --- [ManagedMSE] bufferedchange event isn't fired when MediaSource::endOfStream is called https://bugs.webkit.org/show_bug.cgi?id=266169 rdar://119451536 Reviewed by Youenn Fablet. The buffered range was calculated and held in the SourceBufferPrivate, however when endOfStream() is called, it requires to synchronously change the value of the buffered attribute. To allow to simulate synchronicity, we used to keep a cache in the MediaSourcePrivateRemote but this was fragile and incompatible with MSE in a worker. We can remove this caching and have the SourceBuffer hold the track buffered ranges instead and perform all the calculations there. The SourceBufferPrivate no longer need to be notified synchronously when the MediaSource is ended either which simplifies the threading model. We can simplify the IPC calls between the GPU process and the content process and only send the track buffered ranges when they are changing. And finally, by having the SourceBuffer owns the track buffered ranges, we can correctly fire the `bufferedchange` when mediaSource.endOfStream() is called. * LayoutTests/media/media-source/content/test-fragmented.webm: Added. * LayoutTests/media/media-source/media-managedmse-multipletracks-bufferedchange-expected.txt: Added. * LayoutTests/media/media-source/media-managedmse-multipletracks-bufferedchange.html: Added. * LayoutTests/media/media-source/mock-managedmse-bufferedchange-expected.txt: * LayoutTests/media/media-source/mock-managedmse-bufferedchange.html: * LayoutTests/platform/mac-wk1/TestExpectations: * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::appendBufferInternal): (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): (WebCore::SourceBuffer::sourceBufferPrivateBufferedChanged): (WebCore::SourceBuffer::updateBuffered): (WebCore::SourceBuffer::setMediaSourceEnded): (WebCore::SourceBuffer::sourceBufferPrivateReportExtraMemoryCost): Deleted. * Source/WebCore/Modules/mediasource/SourceBuffer.h: (WebCore::SourceBuffer::bufferedInternal const): * Source/WebCore/platform/graphics/SourceBufferPrivate.cpp: (WebCore::SourceBufferPrivate::updateBuffered): (WebCore::SourceBufferPrivate::clearTrackBuffers): (WebCore::SourceBufferPrivate::setMediaSourceEnded): (WebCore::SourceBufferPrivate::removeCodedFrames): (WebCore::SourceBufferPrivate::removeCodedFramesInternal): (WebCore::SourceBufferPrivate::append): (WebCore::SourceBufferPrivate::memoryPressure): (WebCore::SourceBufferPrivate::minimumBufferedTime const): (WebCore::SourceBufferPrivate::maximumBufferedTime const): (WebCore::SourceBufferPrivate::evictFrames): (WebCore::SourceBufferPrivate::setBufferedRanges): Deleted. (WebCore::SourceBufferPrivate::updateBufferedFromTrackBuffers): Deleted. * Source/WebCore/platform/graphics/SourceBufferPrivate.h: (WebCore::SourceBufferPrivate::buffered const): Deleted. (WebCore::SourceBufferPrivate::queue): Deleted. * Source/WebCore/platform/graphics/SourceBufferPrivateClient.h: (WebCore::SourceBufferPrivateClient::sourceBufferPrivateTrackBuffersChanged): Deleted. * Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp: (WebKit::RemoteSourceBufferProxy::sourceBufferPrivateBufferedChanged): (WebKit::RemoteSourceBufferProxy::append): (WebKit::RemoteSourceBufferProxy::removeCodedFrames): we instead rely on sourceBufferPrivateBufferedChanged to have been called. (WebKit::RemoteSourceBufferProxy::evictCodedFrames): (WebKit
[webkit-changes] [WebKit/WebKit] cfe5a3: [WTF] Distinguish SerialFunctionDispatcher that ar...
Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: cfe5a3b9ba53fba674b45ad476a8a5c8bbfaea95 https://github.com/WebKit/WebKit/commit/cfe5a3b9ba53fba674b45ad476a8a5c8bbfaea95 Author: Jean-Yves Avenard Date: 2023-12-11 (Mon, 11 Dec 2023) Changed paths: M Source/WTF/wtf/FunctionDispatcher.h M Source/WTF/wtf/NativePromise.h M Source/WTF/wtf/RunLoop.h M Source/WTF/wtf/WorkQueue.cpp M Source/WTF/wtf/WorkQueue.h Log Message: --- [WTF] Distinguish SerialFunctionDispatcher that are refcounted and guarantee that the function will be run. https://bugs.webkit.org/show_bug.cgi?id=266199 rdar://119476929 Reviewed by Youenn Fablet. A SerialFunctionDispatcher has an explicit lifetime, while most implementations are ref-counted, their API contract do not guarantee that a dispatched function would be run (such as a WorkerThread that can be stopped at any time). To distinguish those, we create a RefCountedSerialFunctionDispatcher, that is both refcounted and that has an API contract lifetime that matches its owner. For now, only WorkQueue and RunLoop satisfy the requirement. NativePromise is modified to take this type as the NativePromise API contract requires that the settled method be called. No change in observable behaviour. * Source/WTF/wtf/FunctionDispatcher.h: * Source/WTF/wtf/NativePromise.h: * Source/WTF/wtf/RunLoop.h: * Source/WTF/wtf/WorkQueue.cpp: (WTF::WorkQueue::ref const): (WTF::WorkQueue::deref const): * Source/WTF/wtf/WorkQueue.h: Canonical link: https://commits.webkit.org/271860@main ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes