Commit 7e0e10a
committed
[GStreamer] Ensure GStreamer is initialized before using the Quirks
https://bugs.webkit.org/show_bug.cgi?id=303326
Reviewed by Philippe Normand.
GStreamerQuirksManager requires GStreamer to be initialized, which
does not happen soon enough if neither canPlayType() nor isTypeSupported() has
been called before, so in those cases no quirks are applied.
However, the quirks manager may be used in other processes, e.g. NetworkProcess
when determining support for a MIME type. To avoid issues, we should
only fully init GStreamer if on the WebProcess, and otherwise go for
a minimal initialization.
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::ensureGStreamerInitializedNonWebProcess):
Added as a counterpart to ensureGStreamerInitialized, only does minimal init.
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::GStreamerRegistryScanner):
Use the new function to initialize gst if in the UIProcess
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp:
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager):
Init GStreamer using either of the two methods
Original author: Andrzej Surdej <[email protected]>
See: #1584
Canonical link: https://commits.webkit.org/303982@main1 parent 330317a commit 7e0e10a
File tree
4 files changed
+25
-1
lines changed- Source/WebCore/platform
- graphics/gstreamer
- gstreamer
4 files changed
+25
-1
lines changedLines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
264 | 280 | | |
265 | 281 | | |
266 | 282 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
0 commit comments