Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[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@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
- Loading branch information
Showing
4 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters