Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GStreamer][MiniBrowser] Honor GStreamer command line parameters in M…
…iniBrowser https://bugs.webkit.org/show_bug.cgi?id=173655 <rdar://problem/37706341> Reviewed by Philippe Normand. Source/WebCore: Do not assume gst is only used in the WebProcess, the MIMETypeRegistry also uses gst to get the list of supported media types. Move the code to extract gst options from the process command line to a helper function and use it in the UI process to pass the options to the WebProcess, but also in the current process when gst is initialized without providing options. Fixes several unit tests that use MIMETypeRegistry in the UI process. * platform/graphics/gstreamer/GStreamerUtilities.cpp: (WebCore::extractGStreamerOptionsFromCommandLine): Helper to get the gst options from the current process command line. (WebCore::initializeGStreamer): Ensure this is called once. Get the gst options from the given vector or extract it from the command line if not provided. * platform/graphics/gstreamer/GStreamerUtilities.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: (WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Bring back the gst initialization here. Source/WebKit: Actually pass the gst command line options to the WebProcess. The options in /proc/self/cmdline are separated by null characters, so we are effectively passing always the first option only, which is the program name. Then, in the web process we always ignore the first option and providing WebProcess unconditionally, so we were doing nothing. * UIProcess/gtk/WebProcessPoolGtk.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): Use WebCore::extractGStreamerOptionsFromCommandLine() * UIProcess/wpe/WebProcessPoolWPE.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): Ditto. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Move the vector. Canonical link: https://commits.webkit.org/198813@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 101 additions and 28 deletions.
- +25 −0 Source/WebCore/ChangeLog
- +43 −22 Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp
- +2 −1 Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h
- +3 −0 Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
- +20 −0 Source/WebKit/ChangeLog
- +2 −4 Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp
- +5 −0 Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp
- +1 −1 Source/WebKit/WebProcess/soup/WebProcessSoup.cpp