Title: [256436] trunk/Source/WebCore
Revision
256436
Author
[email protected]
Date
2020-02-12 07:49:07 -0800 (Wed, 12 Feb 2020)

Log Message

[GStreamer][EME] Fix build with ENCRYPTED_MEDIA=OFF
https://bugs.webkit.org/show_bug.cgi?id=207628

Unreviewed build fix.

Covered by existing tests.


* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
(WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (256435 => 256436)


--- trunk/Source/WebCore/ChangeLog	2020-02-12 15:42:17 UTC (rev 256435)
+++ trunk/Source/WebCore/ChangeLog	2020-02-12 15:49:07 UTC (rev 256436)
@@ -1,3 +1,16 @@
+2020-02-12  Charles Turner  <[email protected]>
+
+        [GStreamer][EME] Fix build with ENCRYPTED_MEDIA=OFF
+        https://bugs.webkit.org/show_bug.cgi?id=207628
+
+        Unreviewed build fix.
+
+        Covered by existing tests.
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage):
+        (WebCore::MediaPlayerPrivateGStreamer::waitForCDMAttachment):
+
 2020-02-12  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] Move expansion struct out of Display::Run::TextContext to Display::Run

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (256435 => 256436)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-02-12 15:42:17 UTC (rev 256435)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-02-12 15:49:07 UTC (rev 256436)
@@ -1789,50 +1789,6 @@
     }, this, nullptr);
 }
 
-InitData MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage(GstMessage* message)
-{
-    ASSERT(!isMainThread());
-
-    InitData initData;
-    {
-        LockHolder lock(m_protectionMutex);
-        ProtectionSystemEvents protectionSystemEvents(message);
-        GST_TRACE_OBJECT(pipeline(), "found %zu protection events, %zu decryptors available", protectionSystemEvents.events().size(), protectionSystemEvents.availableSystems().size());
-
-        for (auto& event : protectionSystemEvents.events()) {
-            const char* eventKeySystemId = nullptr;
-            GstBuffer* data = ""
-            gst_event_parse_protection(event.get(), &eventKeySystemId, &data, nullptr);
-
-            initData.append({eventKeySystemId, data});
-            m_handledProtectionEvents.add(GST_EVENT_SEQNUM(event.get()));
-        }
-    }
-
-    return initData;
-}
-
-bool MediaPlayerPrivateGStreamer::waitForCDMAttachment()
-{
-    if (isMainThread()) {
-        GST_ERROR_OBJECT(pipeline(), "can't block the main thread waiting for a CDM instance");
-        ASSERT_NOT_REACHED();
-        return false;
-    }
-
-    GST_INFO_OBJECT(pipeline(), "waiting for a CDM instance");
-
-    bool didCDMAttach = false;
-    {
-        auto cdmAttachmentLocker = holdLock(m_cdmAttachmentMutex);
-        didCDMAttach = m_cdmAttachmentCondition.waitFor(m_cdmAttachmentMutex, 4_s, [this]() {
-            return isCDMAttached();
-        });
-    }
-
-    return didCDMAttach;
-}
-
 bool MediaPlayerPrivateGStreamer::handleSyncMessage(GstMessage* message)
 {
     if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_STREAM_COLLECTION && !m_isLegacyPlaybin) {
@@ -3702,6 +3658,50 @@
 }
 
 #if ENABLE(ENCRYPTED_MEDIA)
+InitData MediaPlayerPrivateGStreamer::parseInitDataFromProtectionMessage(GstMessage* message)
+{
+    ASSERT(!isMainThread());
+
+    InitData initData;
+    {
+        LockHolder lock(m_protectionMutex);
+        ProtectionSystemEvents protectionSystemEvents(message);
+        GST_TRACE_OBJECT(pipeline(), "found %zu protection events, %zu decryptors available", protectionSystemEvents.events().size(), protectionSystemEvents.availableSystems().size());
+
+        for (auto& event : protectionSystemEvents.events()) {
+            const char* eventKeySystemId = nullptr;
+            GstBuffer* data = ""
+            gst_event_parse_protection(event.get(), &eventKeySystemId, &data, nullptr);
+
+            initData.append({eventKeySystemId, data});
+            m_handledProtectionEvents.add(GST_EVENT_SEQNUM(event.get()));
+        }
+    }
+
+    return initData;
+}
+
+bool MediaPlayerPrivateGStreamer::waitForCDMAttachment()
+{
+    if (isMainThread()) {
+        GST_ERROR_OBJECT(pipeline(), "can't block the main thread waiting for a CDM instance");
+        ASSERT_NOT_REACHED();
+        return false;
+    }
+
+    GST_INFO_OBJECT(pipeline(), "waiting for a CDM instance");
+
+    bool didCDMAttach = false;
+    {
+        auto cdmAttachmentLocker = holdLock(m_cdmAttachmentMutex);
+        didCDMAttach = m_cdmAttachmentCondition.waitFor(m_cdmAttachmentMutex, 4_s, [this]() {
+            return isCDMAttached();
+        });
+    }
+
+    return didCDMAttach;
+}
+
 void MediaPlayerPrivateGStreamer::initializationDataEncountered(InitData&& initData)
 {
     ASSERT(!isMainThread());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to