[GStreamer] Bump required version to 1.8.3
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2018 12:07:16 +0000 (12:07 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2018 12:07:16 +0000 (12:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186558

Reviewed by Xabier Rodriguez-Calvar.

.:

* Source/cmake/GStreamerChecks.cmake: Bump to 1.8.3 which is the
version shipped in the current Ubuntu LTS we support (16.04).

Source/WebCore:

* platform/GStreamer.cmake: Remove useless file.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcChangeState): Remove useless version check.
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp:
Removed. createDecryptor() is dead code since the decryptors moved
to the MSE playback pipeline.
* platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
(WebCore::GStreamerEMEUtilities::keySystemToUuid):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232749 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/GStreamer.cmake
Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp [deleted file]
Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h
Source/cmake/GStreamerChecks.cmake

index b6c82cc..f92cf44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2018-06-12  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] Bump required version to 1.8.3
+        https://bugs.webkit.org/show_bug.cgi?id=186558
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * Source/cmake/GStreamerChecks.cmake: Bump to 1.8.3 which is the
+        version shipped in the current Ubuntu LTS we support (16.04).
+
 2018-06-12  Zan Dobersek  <zdobersek@igalia.com>
 
         Add run-web-platform-tests script
index 9f8c091..8d1f27f 100644 (file)
@@ -1,3 +1,19 @@
+2018-06-12  Philippe Normand  <pnormand@igalia.com>
+
+        [GStreamer] Bump required version to 1.8.3
+        https://bugs.webkit.org/show_bug.cgi?id=186558
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * platform/GStreamer.cmake: Remove useless file.
+        * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
+        (webKitWebAudioSrcChangeState): Remove useless version check.
+        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp:
+        Removed. createDecryptor() is dead code since the decryptors moved
+        to the MSE playback pipeline.
+        * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
+        (WebCore::GStreamerEMEUtilities::keySystemToUuid):
+
 2018-06-11  Philippe Normand  <philn@igalia.com>
 
         [GStreamer] flush video sample upon DRAIN query
index 50b2d20..d26e757 100644 (file)
@@ -21,7 +21,6 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
         platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
         platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
 
-        platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp
         platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp
         platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
 
index a046d18..55cdb42 100644 (file)
@@ -419,9 +419,7 @@ static GstStateChangeReturn webKitWebAudioSrcChangeState(GstElement* element, Gs
     case GST_STATE_CHANGE_PAUSED_TO_READY:
         GST_DEBUG_OBJECT(src, "PAUSED->READY");
 
-#if GST_CHECK_VERSION(1, 4, 0)
         gst_buffer_pool_set_flushing(src->priv->pool.get(), TRUE);
-#endif
         if (!gst_task_join(src->priv->task.get()))
             returnValue = GST_STATE_CHANGE_FAILURE;
         gst_buffer_pool_set_active(src->priv->pool.get(), FALSE);
diff --git a/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp b/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp
deleted file mode 100644 (file)
index 0aa880c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* GStreamer EME Utilities class
- *
- * Copyright (C) 2017 Metrological
- * Copyright (C) 2017 Igalia S.L
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "GStreamerEMEUtilities.h"
-
-#if ENABLE(ENCRYPTED_MEDIA) && USE(GSTREAMER)
-
-GST_DEBUG_CATEGORY_EXTERN(webkit_media_player_debug);
-#define GST_CAT_DEFAULT webkit_media_player_debug
-
-namespace WebCore {
-
-const char* GStreamerEMEUtilities::s_ClearKeyUUID = WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID;
-const char* GStreamerEMEUtilities::s_ClearKeyKeySystem = "org.w3.clearkey";
-
-#if GST_CHECK_VERSION(1, 5, 3)
-GstElement* GStreamerEMEUtilities::createDecryptor(const char* protectionSystem)
-{
-    GstElement* decryptor = nullptr;
-    GList* decryptors = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_DECRYPTOR, GST_RANK_MARGINAL);
-
-    GST_TRACE("looking for decryptor for %s", protectionSystem);
-
-    for (GList* walk = decryptors; !decryptor && walk; walk = g_list_next(walk)) {
-        GstElementFactory* factory = reinterpret_cast<GstElementFactory*>(walk->data);
-
-        GST_TRACE("checking factory %s", GST_OBJECT_NAME(factory));
-
-        for (const GList* current = gst_element_factory_get_static_pad_templates(factory); current && !decryptor; current = g_list_next(current)) {
-            GstStaticPadTemplate* staticPadTemplate = static_cast<GstStaticPadTemplate*>(current->data);
-            GRefPtr<GstCaps> caps = adoptGRef(gst_static_pad_template_get_caps(staticPadTemplate));
-            unsigned length = gst_caps_get_size(caps.get());
-
-            GST_TRACE("factory %s caps has size %u", GST_OBJECT_NAME(factory), length);
-            for (unsigned i = 0; !decryptor && i < length; ++i) {
-                GstStructure* structure = gst_caps_get_structure(caps.get(), i);
-                GST_TRACE("checking structure %s", gst_structure_get_name(structure));
-                if (gst_structure_has_field_typed(structure, GST_PROTECTION_SYSTEM_ID_CAPS_FIELD, G_TYPE_STRING)) {
-                    const char* sysId = gst_structure_get_string(structure, GST_PROTECTION_SYSTEM_ID_CAPS_FIELD);
-                    GST_TRACE("structure %s has protection system %s", gst_structure_get_name(structure), sysId);
-                    if (!g_ascii_strcasecmp(protectionSystem, sysId)) {
-                        GST_DEBUG("found decryptor %s for %s", GST_OBJECT_NAME(factory), protectionSystem);
-                        decryptor = gst_element_factory_create(factory, nullptr);
-                        break;
-                    }
-                }
-            }
-        }
-    }
-    gst_plugin_feature_list_free(decryptors);
-    GST_TRACE("returning decryptor %p", decryptor);
-    return decryptor;
-}
-#else
-#error "At least a GStreamer version 1.5.3 is required to enable ENCRYPTED_MEDIA."
-#endif
-
-}
-
-#endif // ENABLE(ENCRYPTED_MEDIA) && USE(GSTREAMER)
index 0cff539..5f1dd22 100644 (file)
@@ -36,8 +36,8 @@ using InitData = String;
 class GStreamerEMEUtilities {
 
 public:
-    static const char* s_ClearKeyUUID;
-    static const char* s_ClearKeyKeySystem;
+    static const char* s_ClearKeyUUID = WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID;
+    static const char* s_ClearKeyKeySystem = "org.w3.clearkey";
 
     static bool isClearKeyKeySystem(const String& keySystem)
     {
@@ -52,8 +52,6 @@ public:
         ASSERT_NOT_REACHED();
         return { };
     }
-
-    static GstElement* createDecryptor(const char* protectionSystem);
 };
 
 }
index 97af7d1..0d63ea6 100644 (file)
@@ -10,7 +10,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
         SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
     endif ()
 
-    find_package(GStreamer 1.2.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
+    find_package(GStreamer 1.8.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 
     if (ENABLE_WEB_AUDIO)
         if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
@@ -32,12 +32,6 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
         endif ()
     endif ()
 
-    if (ENABLE_MEDIA_SOURCE)
-        if (PC_GSTREAMER_VERSION VERSION_LESS "1.8")
-            message(FATAL_ERROR "GStreamer 1.8 is needed for ENABLE_MEDIA_SOURCE.")
-        endif ()
-    endif ()
-
     if (USE_GSTREAMER_GL)
         if (PC_GSTREAMER_VERSION VERSION_LESS "1.10")
             message(FATAL_ERROR "GStreamer 1.10 is needed for USE_GSTREAMER_GL.")