Title: [295483] trunk/Tools/MiniBrowser
Revision
295483
Author
commit-qu...@webkit.org
Date
2022-06-13 01:09:29 -0700 (Mon, 13 Jun 2022)

Log Message

REGRESSION(r265492): Removed ability to pass GStreamer options from MiniBrowser to WebProcess
https://bugs.webkit.org/show_bug.cgi?id=241507

Patch by Philippe Normand <ph...@igalia.com> on 2022-06-13
Reviewed by Xabier Rodriguez-Calvar.

When the static gstreamer-full library is disabled at build time we should still have the
possibility to add the GStreamer CLI init group to the UIProcess commandline.

* Tools/MiniBrowser/gtk/CMakeLists.txt:
* Tools/MiniBrowser/gtk/main.c:
(main):
* Tools/MiniBrowser/wpe/CMakeLists.txt:
* Tools/MiniBrowser/wpe/main.cpp:
(main):

Canonical link: https://commits.webkit.org/251488@main

Modified Paths

Diff

Modified: trunk/Tools/MiniBrowser/gtk/CMakeLists.txt (295482 => 295483)


--- trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/gtk/CMakeLists.txt	2022-06-13 08:09:29 UTC (rev 295483)
@@ -46,6 +46,11 @@
     WebProcess
 )
 
+if (NOT USE_GSTREAMER_FULL)
+  list(APPEND MiniBrowser_PRIVATE_INCLUDE_DIRECTORIES ${GSTREAMER_INCLUDE_DIRS})
+  list(APPEND MiniBrowser_PRIVATE_LIBRARIES ${GSTREAMER_LIBRARIES})
+endif ()
+
 add_custom_command(
     OUTPUT ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c
            ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h

Modified: trunk/Tools/MiniBrowser/gtk/main.c (295482 => 295483)


--- trunk/Tools/MiniBrowser/gtk/main.c	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/gtk/main.c	2022-06-13 08:09:29 UTC (rev 295483)
@@ -34,6 +34,10 @@
 #include <string.h>
 #include <webkit2/webkit2.h>
 
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+#include <gst/gst.h>
+#endif
+
 #define MINI_BROWSER_ERROR (miniBrowserErrorQuark())
 
 static const gchar **uriArguments = NULL;
@@ -804,6 +808,9 @@
 #if !GTK_CHECK_VERSION(3, 98, 0)
     g_option_context_add_group(context, gtk_get_option_group(TRUE));
 #endif
+#if !USE_GSTREAMER_FULL && (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 (295482 => 295483)


--- trunk/Tools/MiniBrowser/wpe/CMakeLists.txt	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/wpe/CMakeLists.txt	2022-06-13 08:09:29 UTC (rev 295483)
@@ -26,6 +26,11 @@
     WebKit::WebKit
 )
 
+if (NOT USE_GSTREAMER_FULL)
+  list(APPEND MiniBrowser_PRIVATE_INCLUDE_DIRECTORIES ${GSTREAMER_INCLUDE_DIRS})
+  list(APPEND MiniBrowser_PRIVATE_LIBRARIES ${GSTREAMER_LIBRARIES})
+endif ()
+
 if (DEVELOPER_MODE)
     list(APPEND MiniBrowser_PRIVATE_DEFINITIONS WEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
 endif ()

Modified: trunk/Tools/MiniBrowser/wpe/main.cpp (295482 => 295483)


--- trunk/Tools/MiniBrowser/wpe/main.cpp	2022-06-13 07:15:12 UTC (rev 295482)
+++ trunk/Tools/MiniBrowser/wpe/main.cpp	2022-06-13 08:09:29 UTC (rev 295483)
@@ -31,6 +31,10 @@
 #include <memory>
 #include <wpe/webkit.h>
 
+#if !USE_GSTREAMER_FULL && (ENABLE_WEB_AUDIO || ENABLE_VIDEO)
+#include <gst/gst.h>
+#endif
+
 #if defined(ENABLE_ACCESSIBILITY) && ENABLE_ACCESSIBILITY
 #include <atk/atk.h>
 #endif
@@ -188,6 +192,10 @@
     GOptionContext* context = g_option_context_new(nullptr);
     g_option_context_add_main_entries(context, commandLineOptions, nullptr);
 
+#if !USE_GSTREAMER_FULL && (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)) {
         g_printerr("Cannot parse arguments: %s\n", error->message);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to