[GST] Expose VIDEO_DECODING_LIMIT through env variable#1626
Open
asurdej-comcast wants to merge 4 commits intoWebPlatformForEmbedded:wpe-2.38from
Open
[GST] Expose VIDEO_DECODING_LIMIT through env variable#1626asurdej-comcast wants to merge 4 commits intoWebPlatformForEmbedded:wpe-2.38from
asurdej-comcast wants to merge 4 commits intoWebPlatformForEmbedded:wpe-2.38from
Conversation
https://bugs.webkit.org/show_bug.cgi?id=248961 Reviewed by Philippe Normand. Moved the same functionality to one place - from MediaPlayerPrivateGStreamerMSE::supportsType to GStreamerRegistryScanner::isContentTypeSupported. * Source/WebCore/platform/GStreamer.cmake: * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: (videoDecoderLimitsDefaults): (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): * Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType): (videoDecoderLimitsDefaults): Deleted. Canonical link: https://commits.webkit.org/263408@main
https://bugs.webkit.org/show_bug.cgi?id=264941 Reviewed by Philippe Normand. When VIDEO_DECODING_LIMIT support is enabled, after a first call of isContentTypeSupported() with Configuration::Decoding, the video limits are remembered in a static variable. They were then used for all subsequent isContentTypeSupported() calls, regardless of the configuration. This should be limited to Configuration::Decoding. * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Canonical link: https://commits.webkit.org/270877@main
https://bugs.webkit.org/show_bug.cgi?id=296572 Reviewed by Philippe Normand. Decoder limits are set by a build configuration in the form of widthxheight@framerate. However, framerate limit is only considered when the width and height are the ones in the build config. If the actual requested resolution is different, no framerate limit is ever considered. See: WebPlatformForEmbedded#1547 This change introduces a behavior where limits where considered for each variable independently. While not ideal, as lower resolutions might support higher frame rates, and the way the build config ties semantically the framerate to the resolution specified, an alternative fix would require either an absolute max rate to be specified, or possibly different sets of resolution + framerate limits, which might be overkill to this purpose. Original autor: Filipe Norte <filipe_norte@comcast.com> * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Limit framerate even when the dimensions are smaller than the max limit set for them. Canonical link: https://commits.webkit.org/297974@main
WEBKIT_GST_VIDEO_DECODING_LIMIT can now be set in runtime and it takes precedence over compile time definition VIDEO_DECODING_LIMIT.
eocanha
added a commit
to eocanha/WebKit
that referenced
this pull request
Mar 2, 2026
https://bugs.webkit.org/show_bug.cgi?id=308969 Reviewed by NOBODY (OOPS!). The RDK-E downstream platform would like to have a single unified build for many kind of devices. For that reason, the platform compile-time VIDEO_DECODING_LIMIT restriction aren't appropriate anymore, since the same build can be used for devices with different runtime limits. A way to specify the decoding limit ar runtime would be desirable. An environment variable looks like a better way to do it than a runtime setting, since the limit is unlikely to change at runtime and likely to change per device (with a value consistent on every execution). Moreover, having a setting would mean extra changes in the dependent packages that embed WebKit, while having en environmente variable would be less intrusive and would only mean a change in the (easier to maintain) startup scripts. This change adds WEBKIT_GST_VIDEO_DECODING_LIMIT env on top of VIDEO_DECODING_LIMIT compile time option to limit video decoding capabilities. WEBKIT_GST_VIDEO_DECODING_LIMIT can now be set in runtime and it takes precedence over compile time definition VIDEO_DECODING_LIMIT. See: WebPlatformForEmbedded/WPEWebKit#1625 WebPlatformForEmbedded/WPEWebKit#1626 Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com> * Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Parse env var and only require the build ifdefs when strictly needed. (videoDecoderLimitsDefaults): Deleted.
This was referenced Mar 2, 2026
Member
|
The VIDEO_DECODING_LIMIT commit was submitted upstream for review as https://bugs.webkit.org/show_bug.cgi?id=308969 / WebKit/WebKit#59726 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With RDK-E and common webkit build we can't use per platform compile time option any more. This change adds WEBKIT_GST_VIDEO_DECODING_LIMIT env on top of VIDEO_DECODING_LIMIT compile time option to limit video decoding capabilities.
This PR also backports couple of related changes to align with 2.46 version