[webkit-changes] [WebKit/WebKit] 319ff9: [MSE] Limit the number of samples stored in Source...
Xabier Rodríguez
noreply at github.com
Wed Jun 21 07:37:06 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 319ff9c5625fd6ae70ffbe89e765bdd1eaee929d
https://github.com/WebKit/WebKit/commit/319ff9c5625fd6ae70ffbe89e765bdd1eaee929d
Author: Xabier Rodriguez-Calvar <calvaris at igalia.com>
Date: 2023-06-21 (Wed, 21 Jun 2023)
Changed paths:
M Source/WebCore/platform/graphics/SourceBufferPrivate.cpp
M Source/WebCore/platform/graphics/SourceBufferPrivate.h
M Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp
M Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h
Log Message:
-----------
[MSE] Limit the number of samples stored in SourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=258299
Reviewed by Philippe Normand.
Applications may append a lot of samples without triggering eviction algorithm (> 500K), which results in cleanup (on
player destruction) taking too long time.
This can easily happen in videos with a static image, for example a black screen, that are only focused on audio. Then
the video samples number can grow a lot because the samples themselves are not big and to achieve a big size, you can
need many of them. The result is that we have lots of objects if little data and it can take a long time to destruct them.
This change is no-op for non GStreamer ports and in GStreamer ports it allows to define an environment variable to limit
the number of samples.
Based on a patch by Eugene Mutavchi <Ievgen_Mutavchi at comcast.com>.
* Source/WebCore/platform/graphics/SourceBufferPrivate.cpp:
(WebCore::SourceBufferPrivate::platformEvictionThreshold const):
(WebCore::SourceBufferPrivate::hasTooManySamples const):
(WebCore::SourceBufferPrivate::evictCodedFrames):
* Source/WebCore/platform/graphics/SourceBufferPrivate.h:
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::platformEvictionThreshold const):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
Canonical link: https://commits.webkit.org/265355@main
More information about the webkit-changes
mailing list