[webkit-changes] [WebKit/WebKit] 48b51f: [MSE] Improved coded frame eviction algorithm

Xabier Rodríguez noreply at github.com
Tue Nov 8 00:52:07 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 48b51f0536c90a12e3acd596d36ef82324acd3a5
      https://github.com/WebKit/WebKit/commit/48b51f0536c90a12e3acd596d36ef82324acd3a5
  Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
  Date:   2022-11-08 (Tue, 08 Nov 2022)

  Changed paths:
    M LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt
    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-quota-exceeded-error-expected.txt
    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-expected.txt
    M Source/WebCore/Modules/mediasource/SourceBuffer.cpp
    M Source/WebCore/platform/graphics/PlatformTimeRanges.cpp
    M Source/WebCore/platform/graphics/PlatformTimeRanges.h
    M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
    M Source/WebCore/platform/graphics/SourceBufferPrivate.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

  Log Message:
  -----------
  [MSE] Improved coded frame eviction algorithm
https://bugs.webkit.org/show_bug.cgi?id=246144

Reviewed by Alicia Boya Garcia.

I made it in two aspects, first is that now it does not begin at 0, it
begins at the first buffered range.

A fix would be that sometimes you need to evict frames but a window of
30s is too much and it can easily happen it does not evict anything,
so we need to reduce the partition to be able to effectively evict
something. We do it in windows from 30 to 3s.

This is tested by several tests that needed a rebase line or small tweaks.

* LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded-expected.txt:
* LayoutTests/media/media-source/media-source-append-before-last-range-no-quota-exceeded.html:
* LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt:
* LayoutTests/media/media-source/media-source-append-buffer-full-quota-exceeded-error.html:
* LayoutTests/media/media-source/media-source-evict-codedframe-after-seek-expected.txt:
* Source/WebCore/Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferInternal):
* Source/WebCore/platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::minimumBufferedTime const):
* Source/WebCore/platform/graphics/PlatformTimeRanges.h:
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::evictCodedFrames):
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:
(WebKit::RemoteSourceBufferProxy::evictCodedFrames):
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h:
* Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.messages.in:
* Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
(WebKit::SourceBufferPrivateRemote::evictCodedFrames):
* Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h:

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




More information about the webkit-changes mailing list