[webkit-changes] [WebKit/WebKit] c3bf8d: [MSE] Reuse "fudge factor" when samples are removed
Przemyslaw Gorszkowski
noreply at github.com
Thu Jul 27 07:22:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c3bf8dd554481b04a008756c79c53040279ca936
https://github.com/WebKit/WebKit/commit/c3bf8dd554481b04a008756c79c53040279ca936
Author: Przemyslaw Gorszkowski <pgorszkowski at igalia.com>
Date: 2023-07-27 (Thu, 27 Jul 2023)
Changed paths:
M Source/WebCore/html/TimeRanges.cpp
M Source/WebCore/html/TimeRanges.h
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/WebCore/platform/graphics/TrackBuffer.cpp
M Source/WebCore/platform/graphics/TrackBuffer.h
M Tools/TestWebKitAPI/Tests/WebCore/TimeRanges.cpp
Log Message:
-----------
[MSE] Reuse "fudge factor" when samples are removed
https://bugs.webkit.org/show_bug.cgi?id=258869
Reviewed by Xabier Rodriguez-Calvar.
Currently when TrackBuffer::removeSamples is called and erasedRanged is created from the samples,
removing small gaps between samples is not done. It causes that in some cases many separated ranges
are created which has impact on performance of removing samples.
Reusing "eliminate small gap" mechanism from SourceBufferPrivate::processMediaSample solves the problem.
* Source/WebCore/html/TimeRanges.cpp:
(WebCore::TimeRanges::add):
* Source/WebCore/html/TimeRanges.h:
* Source/WebCore/platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::timeFudgeFactor):
(WebCore::PlatformTimeRanges::add):
* Source/WebCore/platform/graphics/PlatformTimeRanges.h:
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::processMediaSample):
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::timeFudgeFactor const):
* Source/WebCore/platform/graphics/TrackBuffer.cpp:
(WebCore::TrackBuffer::addBufferedRange):
(WebCore::TrackBuffer::removeSamples):
* Source/WebCore/platform/graphics/TrackBuffer.h:
* Tools/TestWebKitAPI/Tests/WebCore/TimeRanges.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/266357@main
More information about the webkit-changes
mailing list