Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 319ff9c5625fd6ae70ffbe89e765bdd1eaee929d https://github.com/WebKit/WebKit/commit/319ff9c5625fd6ae70ffbe89e765bdd1eaee929d Author: Xabier Rodriguez-Calvar <calva...@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_mutav...@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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes