[webkit-changes] [WebKit/WebKit] 74481e: REGRESSION(262863 at main) [Cocoa] video.buffered ran...

Jer Noble noreply at github.com
Sat May 27 09:21:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 74481ec4b07546952d73c80f973f5f2f08a30841
      https://github.com/WebKit/WebKit/commit/74481ec4b07546952d73c80f973f5f2f08a30841
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-05-27 (Sat, 27 May 2023)

  Changed paths:
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
    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/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in

  Log Message:
  -----------
  REGRESSION(262863 at main) [Cocoa] video.buffered ranges are always empty; breaks Shaka Player
https://bugs.webkit.org/show_bug.cgi?id=257400
rdar://108202807

Reviewed by Eric Carlson and Jean-Yves Avenard.

In 262863 at main, a change was made to no longer create TimeRanges and PlatformTimeRanges objects
in the course of returning bufferedRanges(). However, in so doing, development code was left in
the patch which would always return empty ranges from MediaPlayerPrivateAVFoundation::buffered().
Additionally, existing code that cleared buffered ranges from RemoteMediaPlayerState was changed
in such a ways as subsequent updates would always get empty ranges. The test which would have
caught this breakage has been disabled since 2013 (143932 at main).

Re-enable the media/video-buffered.html test.

Don't re-create m_buffered every time a client calls platformBufferedTimeRanges(). Instead, re-create
m_buffered only when loadedTimeRangesDidChange(). Send an optional<> buffered range across the GPU
process boundary in RemoteMediaPlayerState, and only update MediaplayerPrivateRemote's buffered
value when the state has a valid buffered range.

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::buffered const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::sendCachedState):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::updateCachedState):
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h:
* Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.serialization.in:

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




More information about the webkit-changes mailing list