Commit 0c2e1d0
[GStreamer] Expose VIDEO_DECODING_LIMIT through an environment variable
https://bugs.webkit.org/show_bug.cgi?id=308969
Reviewed by Alicia Boya Garcia and Xabier Rodriguez-Calvar.
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: #1625
#1626
Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com>
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(videoDecoderLimitsDefaults): Deleted.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::parseVideoDecodingLimit): Use a StringView to prevent extra copies.
(WebCore::resolveVideoDecodingLimits): Decide the right decoding limits considering the build time option and the environment variable value.
(WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Parse env var and only require the build ifdefs when strictly needed.
(videoDecoderLimitsDefaults): Deleted.
Canonical link: https://commits.webkit.org/308552@main1 parent 28d39a4 commit 0c2e1d0
1 file changed
Lines changed: 49 additions & 31 deletions
Lines changed: 49 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
57 | 65 | | |
58 | | - | |
59 | | - | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 104 | | |
103 | | - | |
104 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
105 | 137 | | |
106 | 138 | | |
107 | 139 | | |
| |||
758 | 790 | | |
759 | 791 | | |
760 | 792 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
| 793 | + | |
| 794 | + | |
777 | 795 | | |
778 | 796 | | |
779 | 797 | | |
| |||
0 commit comments