Skip to content
Permalink
Browse files
REGRESSION(r265492): Removed ability to pass GStreamer options from M…
…iniBrowser to WebProcess

https://bugs.webkit.org/show_bug.cgi?id=241507

Patch by Philippe Normand <philn@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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Jun 13, 2022
1 parent 97543a1 commit e3e4479f5a2c1c8e24a44f61a8817dc4a00c5747
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
@@ -46,6 +46,11 @@ set(MiniBrowser_DEPENDENCIES
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
@@ -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 @@ int main(int argc, char *argv[])
#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);
@@ -26,6 +26,11 @@ set(MiniBrowser_PRIVATE_LIBRARIES
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 ()
@@ -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 @@ int main(int argc, char *argv[])
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);

0 comments on commit e3e4479

Please sign in to comment.