Diff
Modified: trunk/ChangeLog (265491 => 265492)
--- trunk/ChangeLog 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/ChangeLog 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1,3 +1,14 @@
+2020-08-11 Philippe Normand <[email protected]>
+
+ [GStreamer] gst-full standalone library support
+ https://bugs.webkit.org/show_bug.cgi?id=215262
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ * Source/cmake/FindGStreamer.cmake:
+ * Source/cmake/GStreamerChecks.cmake:
+ * Source/cmake/GStreamerDefinitions.cmake:
+
2020-08-03 Wenson Hsieh <[email protected]>
Remove the ENABLE_DATA_INTERACTION feature flag
Modified: trunk/Source/WebCore/ChangeLog (265491 => 265492)
--- trunk/Source/WebCore/ChangeLog 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebCore/ChangeLog 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1,3 +1,33 @@
+2020-08-11 Philippe Normand <[email protected]>
+
+ [GStreamer] gst-full standalone library support
+ https://bugs.webkit.org/show_bug.cgi?id=215262
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ A new CMake option is introduced to enable gst-full support: USE_GSTREAMER_FULL. By default
+ this option is disabled. WebKit distributors might want to enable this if they distribute
+ GStreamer through gst-build's gst-full library. In gst-build the following options can be
+ used to produce a usable libgstreamer-full-1.0.so:
+
+ -Dpython=disabled -Dges=disabled -Ddevtools=disabled -Dintrospection=disabled -Ddefault_library=static
+
+ Once enabled in our build, the dynamic library libgstreamer-full-1.0.so will be loaded
+ instead of all the other GStreamer libraries. Plugins are statically registered in this
+ library as well.
+
+ This can be useful when deploying WebKit in controlled embedded platform where disk space is
+ limited. One of the goals of gst-full is to enable full customization of the plugins to be
+ included in the library. Static registration can also reduce GStreamer initialization time.
+
+ * platform/GStreamer.cmake:
+ * platform/graphics/gstreamer/GStreamerCommon.cpp:
+ (WebCore::initializeGStreamer):
+ (WebCore::initializeGStreamerAndRegisterWebKitElements):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Disable missing-plugins handling when
+ gst-full is in use. The plugin installer doesn't make much sense for this scenario.
+
2020-08-10 Myles C. Maxfield <[email protected]>
Fix bad merge in r265488
Modified: trunk/Source/WebCore/platform/GStreamer.cmake (265491 => 265492)
--- trunk/Source/WebCore/platform/GStreamer.cmake 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebCore/platform/GStreamer.cmake 2020-08-11 08:17:37 UTC (rev 265492)
@@ -71,20 +71,29 @@
platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.h
)
- list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
- ${GSTREAMER_INCLUDE_DIRS}
- ${GSTREAMER_BASE_INCLUDE_DIRS}
- ${GSTREAMER_APP_INCLUDE_DIRS}
- ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
- )
+ if (USE_GSTREAMER_FULL)
+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_FULL_INCLUDE_DIRS}
+ )
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_FULL_LIBRARIES}
+ )
+ else ()
+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_INCLUDE_DIRS}
+ ${GSTREAMER_BASE_INCLUDE_DIRS}
+ ${GSTREAMER_APP_INCLUDE_DIRS}
+ ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+ )
- list(APPEND WebCore_LIBRARIES
- ${GSTREAMER_APP_LIBRARIES}
- ${GSTREAMER_BASE_LIBRARIES}
- ${GSTREAMER_LIBRARIES}
- ${GSTREAMER_PBUTILS_LIBRARIES}
- ${GSTREAMER_AUDIO_LIBRARIES}
- )
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_APP_LIBRARIES}
+ ${GSTREAMER_BASE_LIBRARIES}
+ ${GSTREAMER_LIBRARIES}
+ ${GSTREAMER_PBUTILS_LIBRARIES}
+ ${GSTREAMER_AUDIO_LIBRARIES}
+ )
+ endif ()
# Avoiding a GLib deprecation warning due to GStreamer API using deprecated classes.
set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS "GLIB_DISABLE_DEPRECATION_WARNINGS=1")
@@ -96,12 +105,14 @@
${GSTREAMER_VIDEO_INCLUDE_DIRS}
)
- list(APPEND WebCore_LIBRARIES
- ${GSTREAMER_TAG_LIBRARIES}
- ${GSTREAMER_VIDEO_LIBRARIES}
- )
+ if (NOT USE_GSTREAMER_FULL)
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_TAG_LIBRARIES}
+ ${GSTREAMER_VIDEO_LIBRARIES}
+ )
+ endif ()
- if (USE_GSTREAMER_MPEGTS)
+ if (USE_GSTREAMER_MPEGTS AND NOT USE_GSTREAMER_FULL)
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
${GSTREAMER_MPEGTS_INCLUDE_DIRS}
)
@@ -111,12 +122,14 @@
endif ()
if (USE_GSTREAMER_GL)
- list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
- ${GSTREAMER_GL_INCLUDE_DIRS}
- )
- list(APPEND WebCore_LIBRARIES
- ${GSTREAMER_GL_LIBRARIES}
- )
+ if (NOT USE_GSTREAMER_FULL)
+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_GL_INCLUDE_DIRS}
+ )
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_GL_LIBRARIES}
+ )
+ endif ()
list(APPEND WebCore_SOURCES
platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp
platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
@@ -130,9 +143,11 @@
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
${GSTREAMER_CODECPARSERS_INCLUDE_DIRS}
)
- list(APPEND WebCore_LIBRARIES
- ${GSTREAMER_CODECPARSERS_LIBRARIES}
- )
+ if (NOT USE_GSTREAMER_FULL)
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_CODECPARSERS_LIBRARIES}
+ )
+ endif ()
endif ()
endif ()
endif ()
@@ -150,14 +165,16 @@
platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
)
- list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
- ${GSTREAMER_AUDIO_INCLUDE_DIRS}
- ${GSTREAMER_FFT_INCLUDE_DIRS}
- )
+ if (NOT USE_GSTREAMER_FULL)
+ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_AUDIO_INCLUDE_DIRS}
+ ${GSTREAMER_FFT_INCLUDE_DIRS}
+ )
- list(APPEND WebCore_LIBRARIES
- ${GSTREAMER_FFT_LIBRARIES}
- )
+ list(APPEND WebCore_LIBRARIES
+ ${GSTREAMER_FFT_LIBRARIES}
+ )
+ endif ()
endif ()
if (ENABLE_ENCRYPTED_MEDIA)
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (265491 => 265492)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -34,6 +34,10 @@
#include <wtf/glib/GUniquePtr.h>
#include <wtf/glib/RunLoopSourcePriority.h>
+#if USE(GSTREAMER_FULL)
+#include <gst/gstinitstaticplugins.h>
+#endif
+
#if USE(GSTREAMER_MPEGTS)
#define GST_USE_UNSTABLE_API
#include <gst/mpegts/mpegts.h>
@@ -257,22 +261,6 @@
if (isGStreamerInitialized)
gst_mpegts_initialize();
#endif
-
- // If the FDK-AAC decoder is available, promote it and downrank the
- // libav AAC decoders, due to their broken LC support, as reported in:
- // https://ffmpeg.org/pipermail/ffmpeg-devel/2019-July/247063.html
- GRefPtr<GstElementFactory> elementFactory = adoptGRef(gst_element_factory_find("fdkaacdec"));
- if (elementFactory) {
- gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(elementFactory.get()), GST_RANK_PRIMARY);
-
- const char* const elementNames[] = {"avdec_aac", "avdec_aac_fixed", "avdec_aac_latm"};
- for (unsigned i = 0; i < G_N_ELEMENTS(elementNames); i++) {
- GRefPtr<GstElementFactory> avAACDecoderFactory = adoptGRef(gst_element_factory_find(elementNames[i]));
- if (avAACDecoderFactory)
- gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(avAACDecoderFactory.get()), GST_RANK_MARGINAL);
- }
- }
-
#endif
});
return isGStreamerInitialized;
@@ -304,6 +292,10 @@
static std::once_flag onceFlag;
std::call_once(onceFlag, [] {
+#if USE(GSTREAMER_FULL)
+ gst_init_static_plugins();
+#endif
+
#if ENABLE(ENCRYPTED_MEDIA)
gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 200, WEBKIT_TYPE_MEDIA_CK_DECRYPT);
#if ENABLE(THUNDER)
@@ -326,6 +318,21 @@
gst_element_register(0, "webkitglvideosink", GST_RANK_PRIMARY, WEBKIT_TYPE_GL_VIDEO_SINK);
#endif
#endif
+
+ // If the FDK-AAC decoder is available, promote it and downrank the
+ // libav AAC decoders, due to their broken LC support, as reported in:
+ // https://ffmpeg.org/pipermail/ffmpeg-devel/2019-July/247063.html
+ GRefPtr<GstElementFactory> elementFactory = adoptGRef(gst_element_factory_find("fdkaacdec"));
+ if (elementFactory) {
+ gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(elementFactory.get()), GST_RANK_PRIMARY);
+
+ const char* const elementNames[] = {"avdec_aac", "avdec_aac_fixed", "avdec_aac_latm"};
+ for (unsigned i = 0; i < G_N_ELEMENTS(elementNames); i++) {
+ GRefPtr<GstElementFactory> avAACDecoderFactory = adoptGRef(gst_element_factory_find(elementNames[i]));
+ if (avAACDecoderFactory)
+ gst_plugin_feature_set_rank(GST_PLUGIN_FEATURE_CAST(avAACDecoderFactory.get()), GST_RANK_MARGINAL);
+ }
+ }
});
return true;
}
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (265491 => 265492)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1965,6 +1965,7 @@
break;
case GST_MESSAGE_ELEMENT:
if (gst_is_missing_plugin_message(message)) {
+#if !USE(GSTREAMER_FULL)
if (gst_install_plugins_supported()) {
auto missingPluginCallback = MediaPlayerRequestInstallMissingPluginsCallback::create([weakThis = makeWeakPtr(*this)](uint32_t result, MediaPlayerRequestInstallMissingPluginsCallback& missingPluginCallback) {
if (!weakThis) {
@@ -1986,6 +1987,7 @@
GUniquePtr<char> description(gst_missing_plugin_message_get_description(message));
m_player->requestInstallMissingPlugins(String::fromUTF8(detail.get()), String::fromUTF8(description.get()), missingPluginCallback.get());
}
+#endif
}
#if USE(GSTREAMER_MPEGTS)
else if (GstMpegtsSection* section = gst_message_parse_mpegts_section(message)) {
Modified: trunk/Source/WebKit/ChangeLog (265491 => 265492)
--- trunk/Source/WebKit/ChangeLog 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/ChangeLog 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1,3 +1,26 @@
+2020-08-11 Philippe Normand <[email protected]>
+
+ [GStreamer] gst-full standalone library support
+ https://bugs.webkit.org/show_bug.cgi?id=215262
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Disable missing-plugins handling when gst-full is in use. The plugin installer doesn't make
+ much sense for this scenario.
+
+ * PlatformWPE.cmake:
+ * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
+ (webkitInstallMissingMediaPluginsPermissionRequestAllow):
+ (webkitInstallMissingMediaPluginsPermissionRequestDeny):
+ (webkit_install_missing_media_plugins_permission_request_get_description):
+ * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h:
+ * UIProcess/API/glib/WebKitWebView.cpp:
+ (webkitWebViewRequestInstallMissingMediaPlugins):
+ * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp:
+ * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
+ * UIProcess/gstreamer/WebPageProxyGStreamer.cpp:
+ (WebKit::WebPageProxy::requestInstallMissingMediaPlugins):
+
2020-08-10 Chris Dumez <[email protected]>
AuxiliaryProcess::didReceiveInvalidMessage() for WebPage::PerformDragControllerAction IPC
Modified: trunk/Source/WebKit/PlatformWPE.cmake (265491 => 265492)
--- trunk/Source/WebKit/PlatformWPE.cmake 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/PlatformWPE.cmake 2020-08-11 08:17:37 UTC (rev 265492)
@@ -281,10 +281,6 @@
${ATK_BRIDGE_INCLUDE_DIRS}
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
- ${GSTREAMER_INCLUDE_DIRS}
- ${GSTREAMER_AUDIO_INCLUDE_DIRS}
- ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
- ${GSTREAMER_VIDEO_INCLUDE_DIRS}
${LIBSECCOMP_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
@@ -299,11 +295,29 @@
${ATK_BRIDGE_LIBRARIES}
${GLIB_LIBRARIES}
${GLIB_GMODULE_LIBRARIES}
- ${GSTREAMER_LIBRARIES}
${LIBSECCOMP_LIBRARIES}
${LIBSOUP_LIBRARIES}
)
+if (USE_GSTREAMER_FULL)
+ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_FULL_INCLUDE_DIRS}
+ )
+ list(APPEND WebKit_LIBRARIES
+ ${GSTREAMER_FULL_LIBRARIES}
+ )
+else ()
+ list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
+ ${GSTREAMER_INCLUDE_DIRS}
+ ${GSTREAMER_AUDIO_INCLUDE_DIRS}
+ ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
+ ${GSTREAMER_VIDEO_INCLUDE_DIRS}
+ )
+ list(APPEND WebKit_LIBRARIES
+ ${GSTREAMER_LIBRARIES}
+ )
+endif ()
+
WEBKIT_BUILD_INSPECTOR_GRESOURCES(${WebInspectorUI_DERIVED_SOURCES_DIR})
list(APPEND WPEWebInspectorResources_DERIVED_SOURCES
${WebInspectorUI_DERIVED_SOURCES_DIR}/InspectorGResourceBundle.c
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -56,7 +56,7 @@
static void webkit_permission_request_interface_init(WebKitPermissionRequestIface*);
struct _WebKitInstallMissingMediaPluginsPermissionRequestPrivate {
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
RefPtr<InstallMissingMediaPluginsPermissionRequest> request;
#endif
CString description;
@@ -67,7 +67,7 @@
WebKitInstallMissingMediaPluginsPermissionRequest, webkit_install_missing_media_plugins_permission_request, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(WEBKIT_TYPE_PERMISSION_REQUEST, webkit_permission_request_interface_init))
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
static GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext(WebPageProxy& page)
{
#if PLATFORM(X11) && !USE(GTK4)
@@ -91,7 +91,7 @@
// Only one decision at a time.
if (priv->madeDecision)
return;
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
priv->request->allow(createGstInstallPluginsContext(priv->request->page()));
#endif
priv->madeDecision = true;
@@ -107,7 +107,7 @@
if (priv->madeDecision)
return;
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
priv->request->deny();
#endif
priv->madeDecision = true;
@@ -132,7 +132,7 @@
objectClass->dispose = webkitInstallMissingMediaPluginsPermissionRequestDispose;
}
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
WebKitInstallMissingMediaPluginsPermissionRequest* webkitInstallMissingMediaPluginsPermissionRequestCreate(InstallMissingMediaPluginsPermissionRequest& request)
{
WebKitInstallMissingMediaPluginsPermissionRequest* permissionRequest = WEBKIT_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST(g_object_new(WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST, nullptr));
@@ -155,7 +155,7 @@
{
g_return_val_if_fail(WEBKIT_IS_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST(request), nullptr);
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
if (!request->priv->description.isNull())
return request->priv->description.data();
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h 2020-08-11 08:17:37 UTC (rev 265492)
@@ -22,6 +22,6 @@
#include "InstallMissingMediaPluginsPermissionRequest.h"
#include "WebKitInstallMissingMediaPluginsPermissionRequest.h"
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
WebKitInstallMissingMediaPluginsPermissionRequest* webkitInstallMissingMediaPluginsPermissionRequestCreate(WebKit::InstallMissingMediaPluginsPermissionRequest&);
#endif
Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -2743,7 +2743,7 @@
void webkitWebViewRequestInstallMissingMediaPlugins(WebKitWebView* webView, InstallMissingMediaPluginsPermissionRequest& request)
{
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && !USE(GSTREAMER_FULL)
GRefPtr<WebKitInstallMissingMediaPluginsPermissionRequest> installMediaPluginsPermissionRequest = adoptGRef(webkitInstallMissingMediaPluginsPermissionRequestCreate(request));
webkitWebViewMakePermissionRequest(webView, WEBKIT_PERMISSION_REQUEST(installMediaPluginsPermissionRequest.get()));
#else
Modified: trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -26,7 +26,7 @@
#include "config.h"
#include "InstallMissingMediaPluginsPermissionRequest.h"
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(VIDEO) && USE(GSTREAMER) && !USE(GSTREAMER_FULL)
#include "WebPageMessages.h"
#include "WebPageProxy.h"
#include <wtf/text/CString.h>
@@ -80,4 +80,4 @@
} // namespace WebKit
-#endif // ENABLE(VIDEO) && USE(GSTREAMER)
+#endif // ENABLE(VIDEO) && USE(GSTREAMER) && !USE(GSTREAMER_FULL)
Modified: trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h 2020-08-11 08:17:37 UTC (rev 265492)
@@ -23,10 +23,9 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef InstallMissingMediaPluginsPermissionRequest_h
-#define InstallMissingMediaPluginsPermissionRequest_h
+#pragma once
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(VIDEO) && USE(GSTREAMER) && !USE(GSTREAMER_FULL)
#include <WebCore/GUniquePtrGStreamer.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -69,5 +68,5 @@
class InstallMissingMediaPluginsPermissionRequest;
} // namespace WebKit
-#endif // ENABLE(VIDEO) && USE(GSTREAMER)
-#endif // InstallMissingMediaPluginsPermissionRequest_h
+#endif // ENABLE(VIDEO) && USE(GSTREAMER) && !USE(GSTREAMER_FULL)
+
Modified: trunk/Source/WebKit/UIProcess/gstreamer/WebPageProxyGStreamer.cpp (265491 => 265492)
--- trunk/Source/WebKit/UIProcess/gstreamer/WebPageProxyGStreamer.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/WebKit/UIProcess/gstreamer/WebPageProxyGStreamer.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -27,7 +27,9 @@
#include "WebPageProxy.h"
#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if !USE(GSTREAMER_FULL)
#include "InstallMissingMediaPluginsPermissionRequest.h"
+#endif
#include "PageClient.h"
namespace WebKit {
@@ -34,11 +36,16 @@
void WebPageProxy::requestInstallMissingMediaPlugins(const String& details, const String& description)
{
+#if !USE(GSTREAMER_FULL)
auto request = InstallMissingMediaPluginsPermissionRequest::create(*this, details, description);
if (pageClient().decidePolicyForInstallMissingMediaPluginsPermissionRequest(request.get()))
return;
request->deny();
+#else
+ UNUSED_PARAM(details);
+ UNUSED_PARAM(description);
+#endif
}
} // namespace WebKit
Modified: trunk/Source/cmake/FindGStreamer.cmake (265491 => 265492)
--- trunk/Source/cmake/FindGStreamer.cmake 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/cmake/FindGStreamer.cmake 2020-08-11 08:17:37 UTC (rev 265492)
@@ -25,6 +25,7 @@
# gstreamer-tag: GSTREAMER_TAG_INCLUDE_DIRS and GSTREAMER_TAG_LIBRARIES
# gstreamer-video: GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES
# gstreamer-codecparser:GSTREAMER_CODECPARSERS_INCLUDE_DIRS and GSTREAMER_CODECPARSERS_LIBRARIES
+# gstreamer-full: GSTREAMER_FULL_INCLUDE_DIRS and GSTREAMER_FULL_LIBRARIES
#
# Copyright (C) 2012 Raphael Kubo da Costa <[email protected]>
#
@@ -63,8 +64,20 @@
else ()
pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
endif ()
- set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS})
+ # The gst .pc files might have their `includedir` not specify the
+ # gstreamer-1.0 suffix. In that case the `Cflags` contain
+ # ${includedir}/gstreamer-1.0 which remains correct. The issue here is that
+ # we don't rely on the `Cflags`, cmake fails to generate a proper
+ # `.._INCLUDE_DIRS` variable in this case. So we need to do it here...
+ set(_include_dir "${PC_${_component_prefix}_INCLUDEDIR}")
+ string(REGEX MATCH "(.*)/gstreamer-1.0" _dummy "${_include_dir}")
+ if ("${CMAKE_MATCH_1}" STREQUAL "")
+ set(${_component_prefix}_INCLUDE_DIRS "${_include_dir}/gstreamer-1.0;${PC_${_component_prefix}_INCLUDE_DIRS}")
+ else ()
+ set(${_component_prefix}_INCLUDE_DIRS "${PC_${_component_prefix}_INCLUDE_DIRS}")
+ endif ()
+
find_library(${_component_prefix}_LIBRARIES
NAMES ${_library}
HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
@@ -78,6 +91,7 @@
# 1.1. Find headers and libraries
FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gstreamer-1.0)
FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gstbase-1.0)
+FIND_GSTREAMER_COMPONENT(GSTREAMER_FULL gstreamer-full-1.0>=1.17.0 gstreamer-full-1.0)
# -------------------------
# 2. Find GStreamer plugins
@@ -132,4 +146,6 @@
GSTREAMER_VIDEO_LIBRARIES
GSTREAMER_CODECPARSERS_INCLUDE_DIRS
GSTREAMER_CODECPARSERS_LIBRARIES
+ GSTREAMER_FULL_INCLUDE_DIRS
+ GSTREAMER_FULL_LIBRARIES
)
Modified: trunk/Source/cmake/GStreamerChecks.cmake (265491 => 265492)
--- trunk/Source/cmake/GStreamerChecks.cmake 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/cmake/GStreamerChecks.cmake 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1,40 +1,49 @@
if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
- set(GSTREAMER_COMPONENTS app pbutils)
+
SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
- if (ENABLE_VIDEO)
- list(APPEND GSTREAMER_COMPONENTS video mpegts tag gl)
- endif ()
+ if (USE_GSTREAMER_FULL)
+ find_package(GStreamer 1.17.0 REQUIRED COMPONENTS full)
+ if (NOT PC_GSTREAMER_FULL_FOUND)
+ message(FATAL_ERROR "GStreamer static library libgstreamer-full-1.0 not found")
+ else ()
+ SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
+ SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER_FULL TRUE)
+ endif ()
+ else ()
+ set(GSTREAMER_COMPONENTS app pbutils)
+ if (ENABLE_VIDEO)
+ list(APPEND GSTREAMER_COMPONENTS video mpegts tag gl)
+ endif ()
- if (ENABLE_WEB_AUDIO)
- list(APPEND GSTREAMER_COMPONENTS audio fft)
- SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
- endif ()
+ if (ENABLE_WEB_AUDIO)
+ list(APPEND GSTREAMER_COMPONENTS audio fft)
+ SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
+ endif ()
- find_package(GStreamer 1.10.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
+ find_package(GStreamer 1.10.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
- if (ENABLE_WEB_AUDIO)
- if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
- message(FATAL_ERROR "WebAudio requires the audio and fft GStreamer libraries. Please check your gst-plugins-base installation.")
- else ()
- SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
- endif ()
- endif ()
+ if (ENABLE_WEB_AUDIO)
+ if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
+ message(FATAL_ERROR "WebAudio requires the audio and fft GStreamer libraries. Please check your gst-plugins-base installation.")
+ else ()
+ SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE)
+ endif ()
+ endif ()
- if (ENABLE_VIDEO)
- if (NOT PC_GSTREAMER_APP_FOUND OR NOT PC_GSTREAMER_PBUTILS_FOUND OR NOT PC_GSTREAMER_TAG_FOUND OR NOT PC_GSTREAMER_VIDEO_FOUND)
- message(FATAL_ERROR "Video playback requires the following GStreamer libraries: app, pbutils, tag, video. Please check your gst-plugins-base installation.")
- endif ()
- endif ()
+ if (ENABLE_VIDEO)
+ if (NOT PC_GSTREAMER_APP_FOUND OR NOT PC_GSTREAMER_PBUTILS_FOUND OR NOT PC_GSTREAMER_TAG_FOUND OR NOT PC_GSTREAMER_VIDEO_FOUND)
+ message(FATAL_ERROR "Video playback requires the following GStreamer libraries: app, pbutils, tag, video. Please check your gst-plugins-base installation.")
+ endif ()
+ endif ()
- if (USE_GSTREAMER_MPEGTS AND NOT PC_GSTREAMER_MPEGTS_FOUND)
- message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
- endif ()
+ if (USE_GSTREAMER_MPEGTS AND NOT PC_GSTREAMER_MPEGTS_FOUND)
+ message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
+ endif ()
- if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND)
- message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
- endif ()
-
- SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
+ if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND)
+ message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
+ endif ()
+ endif ()
endif ()
if (ENABLE_MEDIA_SOURCE AND PC_GSTREAMER_VERSION VERSION_LESS "1.14")
Modified: trunk/Source/cmake/GStreamerDefinitions.cmake (265491 => 265492)
--- trunk/Source/cmake/GStreamerDefinitions.cmake 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Source/cmake/GStreamerDefinitions.cmake 2020-08-11 08:17:37 UTC (rev 265492)
@@ -6,3 +6,4 @@
WEBKIT_OPTION_DEFINE(USE_GSTREAMER_GL "Whether to enable support for GStreamer GL" PRIVATE ON)
WEBKIT_OPTION_DEFINE(USE_GSTREAMER_MPEGTS "Whether to enable support for MPEG-TS" PRIVATE OFF)
WEBKIT_OPTION_DEFINE(USE_WPE_VIDEO_PLANE_DISPLAY_DMABUF "Whether to enable support for client-side video rendering" PRIVATE OFF)
+WEBKIT_OPTION_DEFINE(USE_GSTREAMER_FULL "Whether to enable support for static GStreamer builds" PRIVATE OFF)
Modified: trunk/Tools/ChangeLog (265491 => 265492)
--- trunk/Tools/ChangeLog 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Tools/ChangeLog 2020-08-11 08:17:37 UTC (rev 265492)
@@ -1,3 +1,21 @@
+2020-08-11 Philippe Normand <[email protected]>
+
+ [GStreamer] gst-full standalone library support
+ https://bugs.webkit.org/show_bug.cgi?id=215262
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Somehow unrelated with the gst-full support, disable GStreamer options command-line support
+ in MiniBrowsers. This isn't very useful and pulls GStreamer in the MiniBrowser for no much
+ gain. Use GST_* env variables instead.
+
+ * MiniBrowser/gtk/CMakeLists.txt:
+ * MiniBrowser/gtk/main.c:
+ (main):
+ * MiniBrowser/wpe/CMakeLists.txt:
+ * MiniBrowser/wpe/main.cpp:
+ (main):
+
2020-08-10 Chris Dumez <[email protected]>
AuxiliaryProcess::didReceiveInvalidMessage() for WebPage::PerformDragControllerAction IPC
Modified: trunk/Tools/MiniBrowser/gtk/CMakeLists.txt (265491 => 265492)
--- trunk/Tools/MiniBrowser/gtk/CMakeLists.txt 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Tools/MiniBrowser/gtk/CMakeLists.txt 2020-08-11 08:17:37 UTC (rev 265492)
@@ -32,12 +32,10 @@
set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
- ${GSTREAMER_INCLUDE_DIRS}
)
set(MiniBrowser_PRIVATE_LIBRARIES
${GLIB_LIBRARIES}
- ${GSTREAMER_LIBRARIES}
${_javascript_Core_LIBRARY_NAME}
${LIBSOUP_LIBRARIES}
GTK::GTK
Modified: trunk/Tools/MiniBrowser/gtk/main.c (265491 => 265492)
--- trunk/Tools/MiniBrowser/gtk/main.c 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Tools/MiniBrowser/gtk/main.c 2020-08-11 08:17:37 UTC (rev 265492)
@@ -29,9 +29,6 @@
#include "BrowserWindow.h"
#include <errno.h>
-#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
-#include <gst/gst.h>
-#endif
#include <gtk/gtk.h>
#include <string.h>
#include <webkit2/webkit2.h>
@@ -760,9 +757,6 @@
#if !GTK_CHECK_VERSION(3, 98, 0)
g_option_context_add_group(context, gtk_get_option_group(TRUE));
#endif
-#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
- g_option_context_add_group(context, gst_init_get_option_group());
-#endif
WebKitSettings *webkitSettings = webkit_settings_new();
webkit_settings_set_enable_developer_extras(webkitSettings, TRUE);
Modified: trunk/Tools/MiniBrowser/wpe/CMakeLists.txt (265491 => 265492)
--- trunk/Tools/MiniBrowser/wpe/CMakeLists.txt 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Tools/MiniBrowser/wpe/CMakeLists.txt 2020-08-11 08:17:37 UTC (rev 265492)
@@ -13,7 +13,6 @@
set(MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES
${ATK_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
- ${GSTREAMER_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${WPEBACKEND_FDO_INCLUDE_DIRS}
)
Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (265491 => 265492)
--- trunk/Tools/MiniBrowser/wpe/main.cpp 2020-08-11 07:02:50 UTC (rev 265491)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp 2020-08-11 08:17:37 UTC (rev 265492)
@@ -27,9 +27,6 @@
#include "HeadlessViewBackend.h"
#include "WindowViewBackend.h"
-#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
-#include <gst/gst.h>
-#endif
#include <memory>
#include <wpe/webkit.h>
@@ -187,9 +184,6 @@
GOptionContext* context = g_option_context_new(nullptr);
g_option_context_add_main_entries(context, commandLineOptions, nullptr);
-#if ENABLE_WEB_AUDIO || ENABLE_VIDEO
- g_option_context_add_group(context, gst_init_get_option_group());
-#endif
GError* error = nullptr;
if (!g_option_context_parse(context, &argc, &argv, &error)) {