Skip to content

Commit 138cbb7

Browse files
committed
Revert "[GStreamer] Ensure GStreamer is initialized before using the Quirks"
This reverts commit dd19f4d.
1 parent d15368c commit 138cbb7

File tree

4 files changed

+1
-25
lines changed

4 files changed

+1
-25
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -347,22 +347,6 @@ Vector<String> extractGStreamerOptionsFromCommandLine()
347347
return options;
348348
}
349349

350-
bool ensureGStreamerInitializedNonWebProcess()
351-
{
352-
RELEASE_ASSERT(!isInWebProcess());
353-
354-
static std::once_flag onceFlag;
355-
static bool isGStreamerInitialized;
356-
std::call_once(onceFlag, [] {
357-
GUniqueOutPtr<GError> error;
358-
isGStreamerInitialized = gst_init_check(nullptr, nullptr, &error.outPtr());
359-
ASSERT_WITH_MESSAGE(isGStreamerInitialized, "GStreamer initialization failed: %s", error ? error->message : "unknown error occurred");
360-
GST_DEBUG_CATEGORY_INIT(webkit_gst_common_debug, "webkitcommon", 0, "WebKit Common utilities");
361-
});
362-
363-
return isGStreamerInitialized;
364-
}
365-
366350
bool ensureGStreamerInitialized()
367351
{
368352
// 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
@@ -80,7 +80,6 @@ bool doCapsHaveType(const GstCaps*, const char*);
8080
bool areEncryptedCaps(const GstCaps*);
8181
Vector<String> extractGStreamerOptionsFromCommandLine();
8282
void setGStreamerOptionsFromUIProcess(Vector<String>&&);
83-
bool ensureGStreamerInitializedNonWebProcess();
8483
bool ensureGStreamerInitialized();
8584
void registerWebKitGStreamerElements();
8685
void registerWebKitGStreamerVideoEncoder();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ GStreamerRegistryScanner::GStreamerRegistryScanner(bool isMediaSource)
362362
else {
363363
// This is still needed, mostly because of the webkit_web_view_can_show_mime_type() public API (so
364364
// running from UIProcess).
365-
ensureGStreamerInitializedNonWebProcess();
365+
gst_init(nullptr, nullptr);
366366
}
367367

368368
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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "GStreamerQuirkWesteros.h"
3939
#include <wtf/NeverDestroyed.h>
4040
#include <wtf/OptionSet.h>
41-
#include <wtf/RuntimeApplicationChecks.h>
4241
#include <wtf/text/StringView.h>
4342

4443
namespace WebCore {
@@ -57,12 +56,6 @@ GStreamerQuirksManager::GStreamerQuirksManager(bool isForTesting, bool loadQuirk
5756
{
5857
static std::once_flag debugRegisteredFlag;
5958
std::call_once(debugRegisteredFlag, [] {
60-
if (isInWebProcess())
61-
ensureGStreamerInitialized();
62-
else
63-
// This is needed, e.g. when running in NetworkProcess to determine MIME type support
64-
ensureGStreamerInitializedNonWebProcess();
65-
6659
GST_DEBUG_CATEGORY_INIT(webkit_quirks_debug, "webkitquirks", 0, "WebKit Quirks");
6760
});
6861

0 commit comments

Comments
 (0)