<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[237794] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/237794">237794</a></dd>
<dt>Author</dt> <dd>philn@webkit.org</dd>
<dt>Date</dt> <dd>2018-11-05 02:00:19 -0800 (Mon, 05 Nov 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GStreamer] Move elements registration to GStreamerCommon
https://bugs.webkit.org/show_bug.cgi?id=191189

Reviewed by Xabier Rodriguez-Calvar.

It was a bit odd to have this in the base player class and to have
sub-classes calling a static function of the super-class.

Covered by existing tests.

* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::initializeGStreamerAndRegisterWebKitElements):
* platform/graphics/gstreamer/GStreamerCommon.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::isAvailable):
(WebCore::MediaPlayerPrivateGStreamer::loadFull):
(WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine):
(WebCore::MediaPlayerPrivateGStreamerMSE::load):
(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerGStreamerCommoncpp">trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerGStreamerCommonh">trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBasecpp">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBaseh">trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsgstreamermseMediaPlayerPrivateGStreamerMSEcpp">trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/ChangeLog      2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2018-11-05  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] Move elements registration to GStreamerCommon
+        https://bugs.webkit.org/show_bug.cgi?id=191189
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        It was a bit odd to have this in the base player class and to have
+        sub-classes calling a static function of the super-class.
+
+        Covered by existing tests.
+
+        * platform/graphics/gstreamer/GStreamerCommon.cpp:
+        (WebCore::initializeGStreamerAndRegisterWebKitElements):
+        * platform/graphics/gstreamer/GStreamerCommon.h:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::isAvailable):
+        (WebCore::MediaPlayerPrivateGStreamer::loadFull):
+        (WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine):
+        (WebCore::MediaPlayerPrivateGStreamerMSE::load):
+        (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
+        (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
+
</ins><span class="cx"> 2018-11-04  Rob Buis  <rbuis@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Remove ENABLE_OPENCL fully
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerGStreamerCommoncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp     2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp        2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -38,6 +38,22 @@
</span><span class="cx"> #undef GST_USE_UNSTABLE_API
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(MEDIA_SOURCE)
+#include "WebKitMediaSourceGStreamer.h"
+#endif
+
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
+#include "GStreamerMediaStreamSource.h"
+#endif
+
+#if ENABLE(ENCRYPTED_MEDIA)
+#include "WebKitClearKeyDecryptorGStreamer.h"
+#endif
+
+#if ENABLE(VIDEO)
+#include "WebKitWebSourceGStreamer.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTemplate* staticPadTemplate, const gchar* name, GstPad* target)
</span><span class="lines">@@ -234,6 +250,34 @@
</span><span class="cx">     return isGStreamerInitialized;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool initializeGStreamerAndRegisterWebKitElements()
+{
+    if (!initializeGStreamer())
+        return false;
+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+#if ENABLE(ENCRYPTED_MEDIA)
+        if (webkitGstCheckVersion(1, 6, 1))
+            gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_CK_DECRYPT);
+#endif
+
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
+        if (webkitGstCheckVersion(1, 10, 0))
+            gst_element_register(nullptr, "mediastreamsrc", GST_RANK_PRIMARY, WEBKIT_TYPE_MEDIA_STREAM_SRC);
+#endif
+
+#if ENABLE(MEDIA_SOURCE)
+        gst_element_register(nullptr, "webkitmediasrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_SRC);
+#endif
+
+#if ENABLE(VIDEO)
+        gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
+#endif
+    });
+    return true;
+}
+
</ins><span class="cx"> unsigned getGstPlayFlag(const char* nick)
</span><span class="cx"> {
</span><span class="cx">     static GFlagsClass* flagsClass = static_cast<GFlagsClass*>(g_type_class_ref(g_type_from_name("GstPlayFlags")));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerGStreamerCommonh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h       2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h  2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -68,6 +68,7 @@
</span><span class="cx"> bool areEncryptedCaps(const GstCaps*);
</span><span class="cx"> Vector<String> extractGStreamerOptionsFromCommandLine();
</span><span class="cx"> bool initializeGStreamer(std::optional<Vector<String>>&& = std::nullopt);
</span><ins>+bool initializeGStreamerAndRegisterWebKitElements();
</ins><span class="cx"> unsigned getGstPlayFlag(const char* nick);
</span><span class="cx"> uint64_t toGstUnsigned64Time(const MediaTime&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp    2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateGStreamer::registerMediaEngine(MediaEngineRegistrar registrar)
</span><span class="cx"> {
</span><ins>+    MediaPlayerPrivateGStreamerBase::initializeDebugCategory();
</ins><span class="cx">     if (isAvailable()) {
</span><span class="cx">         registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateGStreamer>(player); },
</span><span class="cx">             getSupportedTypes, supportsType, nullptr, nullptr, nullptr, supportsKeySystem);
</span><span class="lines">@@ -121,7 +122,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool MediaPlayerPrivateGStreamer::isAvailable()
</span><span class="cx"> {
</span><del>-    if (!MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements())
</del><ins>+    if (!initializeGStreamerAndRegisterWebKitElements())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     GRefPtr<GstElementFactory> factory = adoptGRef(gst_element_factory_find("playbin"));
</span><span class="lines">@@ -258,9 +259,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements())
-        return;
-
</del><span class="cx">     URL url(URL(), urlString);
</span><span class="cx">     if (url.protocolIsAbout())
</span><span class="cx">         return;
</span><span class="lines">@@ -2214,7 +2212,7 @@
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> mimeTypes = []()
</span><span class="cx">     {
</span><del>-        MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements();
</del><ins>+        initializeGStreamerAndRegisterWebKitElements();
</ins><span class="cx">         HashSet<String, ASCIICaseInsensitiveHash> set;
</span><span class="cx"> 
</span><span class="cx">         GList* audioDecoderFactories = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO, GST_RANK_MARGINAL);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp     2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp        2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include "MediaPlayer.h"
</span><span class="cx"> #include "NotImplemented.h"
</span><span class="cx"> #include "VideoSinkGStreamer.h"
</span><del>-#include "WebKitWebSourceGStreamer.h"
</del><span class="cx"> #include <wtf/glib/GUniquePtr.h>
</span><span class="cx"> #include <wtf/text/AtomicString.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="lines">@@ -51,17 +50,8 @@
</span><span class="cx"> #include "CDMInstance.h"
</span><span class="cx"> #include "GStreamerEMEUtilities.h"
</span><span class="cx"> #include "SharedBuffer.h"
</span><del>-#include "WebKitClearKeyDecryptorGStreamer.h"
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(MEDIA_SOURCE)
-#include "WebKitMediaSourceGStreamer.h"
-#endif
-
-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
-#include "GStreamerMediaStreamSource.h"
-#endif
-
</del><span class="cx"> #if USE(GSTREAMER_GL)
</span><span class="cx"> #if G_BYTE_ORDER == G_LITTLE_ENDIAN
</span><span class="cx"> #define GST_GL_CAPS_FORMAT "{ BGRx, BGRA }"
</span><span class="lines">@@ -142,33 +132,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> using namespace std;
</span><span class="cx"> 
</span><del>-bool MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements()
-{
-    if (!initializeGStreamer())
-        return false;
-
-    static std::once_flag onceFlag;
-    std::call_once(onceFlag, [] {
-        GST_DEBUG_CATEGORY_INIT(webkit_media_player_debug, "webkitmediaplayer", 0, "WebKit media player");
-#if ENABLE(ENCRYPTED_MEDIA)
-        if (webkitGstCheckVersion(1, 6, 1))
-            gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_CK_DECRYPT);
-#endif
-
-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
-        if (webkitGstCheckVersion(1, 10, 0))
-            gst_element_register(nullptr, "mediastreamsrc", GST_RANK_PRIMARY, WEBKIT_TYPE_MEDIA_STREAM_SRC);
-#endif
-
-#if ENABLE(MEDIA_SOURCE)
-        gst_element_register(nullptr, "webkitmediasrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_SRC);
-#endif
-
-        gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
-    });
-    return true;
-}
-
</del><span class="cx"> static int greatestCommonDivisor(int a, int b)
</span><span class="cx"> {
</span><span class="cx">     while (b) {
</span><span class="lines">@@ -277,6 +240,11 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+void MediaPlayerPrivateGStreamerBase::initializeDebugCategory()
+{
+    GST_DEBUG_CATEGORY_INIT(webkit_media_player_debug, "webkitmediaplayer", 0, "WebKit media player");
+}
+
</ins><span class="cx"> MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase(MediaPlayer* player)
</span><span class="cx">     : m_notifier(MainThreadNotifier<MainThreadNotification>::create())
</span><span class="cx">     , m_player(player)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamerMediaPlayerPrivateGStreamerBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h       2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h  2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -76,6 +76,8 @@
</span><span class="cx"> {
</span><span class="cx"> 
</span><span class="cx"> public:
</span><ins>+    static void initializeDebugCategory();
+
</ins><span class="cx">     virtual ~MediaPlayerPrivateGStreamerBase();
</span><span class="cx"> 
</span><span class="cx">     FloatSize naturalSize() const override;
</span><span class="lines">@@ -87,7 +89,6 @@
</span><span class="cx">     bool ensureGstGLContext();
</span><span class="cx">     GstContext* requestGLContext(const char* contextType);
</span><span class="cx"> #endif
</span><del>-    static bool initializeGStreamerAndRegisterWebKitElements();
</del><span class="cx">     bool supportsMuting() const override { return true; }
</span><span class="cx">     void setMuted(bool) override;
</span><span class="cx">     bool muted() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsgstreamermseMediaPlayerPrivateGStreamerMSEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp (237793 => 237794)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp  2018-11-05 09:34:01 UTC (rev 237793)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp     2018-11-05 10:00:19 UTC (rev 237794)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaPlayerPrivateGStreamerMSE::registerMediaEngine(MediaEngineRegistrar registrar)
</span><span class="cx"> {
</span><ins>+    initializeGStreamerAndRegisterWebKitElements();
</ins><span class="cx">     GST_DEBUG_CATEGORY_INIT(webkit_mse_debug, "webkitmse", 0, "WebKit MSE media player");
</span><span class="cx">     if (isAvailable()) {
</span><span class="cx">         registrar([](MediaPlayer* player) { return std::make_unique<MediaPlayerPrivateGStreamerMSE>(player); },
</span><span class="lines">@@ -117,10 +118,6 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-
-    if (UNLIKELY(!MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements()))
-        return;
-
</del><span class="cx">     if (!m_playbackPipeline)
</span><span class="cx">         m_playbackPipeline = PlaybackPipeline::create();
</span><span class="cx"> 
</span><span class="lines">@@ -689,7 +686,7 @@
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> cache = []()
</span><span class="cx">     {
</span><del>-        MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements();
</del><ins>+        initializeGStreamerAndRegisterWebKitElements();
</ins><span class="cx">         HashSet<String, ASCIICaseInsensitiveHash> set;
</span><span class="cx">         const char* mimeTypes[] = {
</span><span class="cx">             "video/mp4",
</span><span class="lines">@@ -733,7 +730,7 @@
</span><span class="cx"> {
</span><span class="cx">     static NeverDestroyed<HashSet<AtomicString>> codecTypes = []()
</span><span class="cx">     {
</span><del>-        MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements();
</del><ins>+        initializeGStreamerAndRegisterWebKitElements();
</ins><span class="cx">         HashSet<AtomicString> set;
</span><span class="cx"> 
</span><span class="cx">         GList* audioDecoderFactories = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO, GST_RANK_MARGINAL);
</span></span></pre>
</div>
</div>

</body>
</html>