Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ WK2 ] http/wpt/webcodecs/videoFrame-video-element.html is a flaky TEXT failure #15974

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Jul 21, 2023

1d29e0e

[ WK2 ] http/wpt/webcodecs/videoFrame-video-element.html is a flaky TEXT failure
https://bugs.webkit.org/show_bug.cgi?id=259379
rdar://112628818

Reviewed by Eric Carlson.

GPUProcess is sending to WebProcess MediaPlayer::ReadyState::HaveCurrentData signal even if it has not yet received any video frame in the output queue.
This creates a race between WebProcess firing the loadeddata event and creation of a VideoFrame object from the media element and GPUProcess actually getting the underlying pixel buffer.
Before the patch, creation of the VideoFrame object would sometimes fail if the WebProcess wins the race.
To prevent this, if there is no pixel buffer, we wait for one.
This makes the WebProcess sync IPC wait a little bit longer in some cases.

Covered by http/wpt/webcodecs/videoFrame-video-element.html no longer being flaky locally.

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoFrameForCurrentTime):

Canonical link: https://commits.webkit.org/268339@main

97ff584

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac   πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2   πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
  πŸ›  watch-sim

@youennf youennf self-assigned this Jul 21, 2023
@youennf youennf added the Media Bugs related to the HTML 5 Media elements. label Jul 21, 2023
@youennf youennf force-pushed the eng/-WK2--httpwptwebcodecsvideoFrame-video-element-html-is-a-flaky-TEXT-failure branch from 0a6798f to acd7ea8 Compare July 21, 2023 08:18
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 21, 2023
@youennf youennf removed the merging-blocked Applied to prevent a change from being merged label Jul 21, 2023
@youennf youennf marked this pull request as ready for review July 21, 2023 13:17
@bls1999 bls1999 force-pushed the eng/-WK2--httpwptwebcodecsvideoFrame-video-element-html-is-a-flaky-TEXT-failure branch 2 times, most recently from a0b4e08 to 97ff584 Compare September 22, 2023 21:23
@bls1999 bls1999 added the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2023
…EXT failure

https://bugs.webkit.org/show_bug.cgi?id=259379
rdar://112628818

Reviewed by Eric Carlson.

GPUProcess is sending to WebProcess MediaPlayer::ReadyState::HaveCurrentData signal even if it has not yet received any video frame in the output queue.
This creates a race between WebProcess firing the loadeddata event and creation of a VideoFrame object from the media element and GPUProcess actually getting the underlying pixel buffer.
Before the patch, creation of the VideoFrame object would sometimes fail if the WebProcess wins the race.
To prevent this, if there is no pixel buffer, we wait for one.
This makes the WebProcess sync IPC wait a little bit longer in some cases.

Covered by http/wpt/webcodecs/videoFrame-video-element.html no longer being flaky locally.

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::videoFrameForCurrentTime):

Canonical link: https://commits.webkit.org/268339@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/-WK2--httpwptwebcodecsvideoFrame-video-element-html-is-a-flaky-TEXT-failure branch from 97ff584 to 1d29e0e Compare September 22, 2023 22:54
@webkit-commit-queue webkit-commit-queue merged commit 1d29e0e into WebKit:main Sep 22, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 268339@main (1d29e0e): https://commits.webkit.org/268339@main

Reviewed commits have been landed. Closing PR #15974 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
6 participants