Skip to content

Commit 330317a

Browse files
committed
Revert "[GStreamer] Ensure GStreamer is initialized before using the Quirks"
This reverts commit 4bdbd3c.
1 parent 1bb3ccc commit 330317a

File tree

4 files changed

+1
-24
lines changed

4 files changed

+1
-24
lines changed

Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,22 +261,6 @@ Vector<String> extractGStreamerOptionsFromCommandLine()
261261
return options;
262262
}
263263

264-
bool ensureGStreamerInitializedNonWebProcess()
265-
{
266-
RELEASE_ASSERT(!isInWebProcess());
267-
268-
static std::once_flag onceFlag;
269-
static bool isGStreamerInitialized;
270-
std::call_once(onceFlag, [] {
271-
GUniqueOutPtr<GError> error;
272-
isGStreamerInitialized = gst_init_check(nullptr, nullptr, &error.outPtr());
273-
ASSERT_WITH_MESSAGE(isGStreamerInitialized, "GStreamer initialization failed: %s", error ? error->message : "unknown error occurred");
274-
GST_DEBUG_CATEGORY_INIT(webkit_gst_common_debug, "webkitcommon", 0, "WebKit Common utilities");
275-
});
276-
277-
return isGStreamerInitialized;
278-
}
279-
280264
bool ensureGStreamerInitialized()
281265
{
282266
// WARNING: Please note this function can be called from any thread, for instance when creating

Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ bool doCapsHaveType(const GstCaps*, const char*);
7171
bool areEncryptedCaps(const GstCaps*);
7272
Vector<String> extractGStreamerOptionsFromCommandLine();
7373
void setGStreamerOptionsFromUIProcess(Vector<String>&&);
74-
bool ensureGStreamerInitializedNonWebProcess();
7574
bool ensureGStreamerInitialized();
7675
void registerWebKitGStreamerElements();
7776
void registerWebKitGStreamerVideoEncoder();

Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ GStreamerRegistryScanner::GStreamerRegistryScanner(bool isMediaSource)
275275
else {
276276
// This is still needed, mostly because of the webkit_web_view_can_show_mime_type() public API (so
277277
// running from UIProcess).
278-
ensureGStreamerInitializedNonWebProcess();
278+
gst_init(nullptr, nullptr);
279279
}
280280

281281
GST_DEBUG_CATEGORY_INIT(webkit_media_gst_registry_scanner_debug, "webkitregistryscanner", 0, "WebKit GStreamer registry scanner");

Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ GStreamerQuirksManager::GStreamerQuirksManager(bool isForTesting, bool loadQuirk
5656
{
5757
static std::once_flag debugRegisteredFlag;
5858
std::call_once(debugRegisteredFlag, [] {
59-
if (isInWebProcess())
60-
ensureGStreamerInitialized();
61-
else
62-
// This is needed, e.g. when running in NetworkProcess to determine MIME type support
63-
ensureGStreamerInitializedNonWebProcess();
64-
6559
GST_DEBUG_CATEGORY_INIT(webkit_quirks_debug, "webkitquirks", 0, "WebKit Quirks");
6660
});
6761

0 commit comments

Comments
 (0)