Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a12fb9d56204e823d6d504b8847c15b3e4a1fe0a
      
https://github.com/WebKit/WebKit/commit/a12fb9d56204e823d6d504b8847c15b3e4a1fe0a
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2024-11-13 (Wed, 13 Nov 2024)

  Changed paths:
    M LayoutTests/media/media-video-fullrange-expected.txt
    A LayoutTests/media/media-video-fullrange-offscreen-expected.txt
    A LayoutTests/media/media-video-fullrange-offscreen.html
    M LayoutTests/media/media-video-fullrange.html
    M LayoutTests/media/media-video-videorange-expected.txt
    A LayoutTests/media/media-video-videorange-offscreen-expected.txt
    A LayoutTests/media/media-video-videorange-offscreen.html
    M LayoutTests/media/media-video-videorange.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm

  Log Message:
  -----------
  [iOS] media/media-video-fullrange.html is an intermittent failure
https://bugs.webkit.org/show_bug.cgi?id=282969
rdar://139698133

Reviewed by Youenn Fablet.

In a WebM container, a video sample doesn't have a duration set. It is to be 
displayed until the next one starts.
When the video element isn't in the DOM, we don't use a 
AVSampleBufferDisplayLayer to decode the video
but a WebCoreDecompressionSession. It decodes the video sample, and store them 
in a CMBufferQueue where the MediaPlayerPrivate
can query which frame is available for a given time.

The logic to search for a videeo frame or determine which one is expired as 
it's now in the past, required a duration to be
set on each sample.
There were two issues causing the tests to fail:
1- It wouldn't notify that a frame was now available (it always considered that 
the frame was in the past)
2- It would evict the last sample before the MediaPlayerPrivateWebM had a 
chance to retrieve it.

To fix those we now always consider that the last frame in the queue, if it has 
no duration and its presentationTime is in the past, is still valid.

Added tests. We split the two existing tests, with one testing colours with a 
video element not in the DOM which this change corrects
and the one using a visible video element. This one still times out due to 
webkit.org/b/282782 (rVFC is broken when the video is paused).

* LayoutTests/media/media-video-fullrange-expected.txt:
* LayoutTests/media/media-video-fullrange-offscreen-expected.txt: Copied from 
LayoutTests/media/media-video-fullrange-expected.txt.
* LayoutTests/media/media-video-fullrange-offscreen.html: Copied from 
LayoutTests/media/media-video-fullrange.html.
* LayoutTests/media/media-video-fullrange.html:
* LayoutTests/media/media-video-videorange-expected.txt:
* LayoutTests/media/media-video-videorange-offscreen-expected.txt: Copied from 
LayoutTests/media/media-video-videorange-expected.txt.
* LayoutTests/media/media-video-videorange-offscreen.html: Copied from 
LayoutTests/media/media-video-videorange.html.
* LayoutTests/media/media-video-videorange.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::automaticDequeue):
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
(WebCore::WebCoreDecompressionSession::imageForTime):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to