Commit dd19f4d
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 aa01883 commit dd19f4d
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 | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
350 | 366 | | |
351 | 367 | | |
352 | 368 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
| 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