mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
wpe: Install WebExtension in pkglibdir
The uninstalled WebExtension takes precedence over the installed one, so that audio support works in local developer builds as well. Fixes #975 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1602>
This commit is contained in:
parent
f1449ac116
commit
8e4cce6cd3
5 changed files with 10 additions and 6 deletions
|
@ -183,7 +183,10 @@ gpointer WPEContextThread::s_viewThread(gpointer data)
|
|||
static void
|
||||
initialize_web_extensions (WebKitWebContext *context)
|
||||
{
|
||||
webkit_web_context_set_web_extensions_directory (context, gst_wpe_get_extension_path ());
|
||||
const gchar *local_path = gst_wpe_get_uninstalled_extension_path ();
|
||||
const gchar *path = g_file_test (local_path, G_FILE_TEST_IS_DIR) ? local_path : G_STRINGIFY (WPE_EXTENSION_INSTALL_DIR);
|
||||
GST_INFO ("Loading WebExtension from %s", path);
|
||||
webkit_web_context_set_web_extensions_directory (context, path);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -33,7 +33,7 @@ GST_DEBUG_CATEGORY (wpe_video_src_debug);
|
|||
GST_DEBUG_CATEGORY (wpe_view_debug);
|
||||
GST_DEBUG_CATEGORY (wpe_src_debug);
|
||||
|
||||
const gchar *gst_wpe_get_extension_path (void)
|
||||
const gchar *gst_wpe_get_uninstalled_extension_path (void)
|
||||
{
|
||||
return extension_path;
|
||||
}
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
const gchar *gst_wpe_get_extension_path (void);
|
||||
const gchar *gst_wpe_get_uninstalled_extension_path (void);
|
||||
|
|
|
@ -16,11 +16,13 @@ if not wpe_dep.found() or not wpe_fdo_dep.found() or not egl_dep.found() or not
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
wpe_extension_install_dir = get_option('prefix') / get_option('libdir') / meson.project_name() / 'wpe-extension'
|
||||
|
||||
giounix_dep = dependency('gio-unix-2.0', required: false)
|
||||
gstwpe = library('gstwpe',
|
||||
['WPEThreadedView.cpp', 'gstwpe.cpp', 'gstwpevideosrc.cpp', 'gstwpesrcbin.cpp'],
|
||||
dependencies : [egl_dep, wpe_dep, wpe_fdo_dep, gstallocators_dep, gstaudio_dep, gstvideo_dep, gstbase_dep, gstgl_dep, xkbcommon_dep, wl_server_dep, giounix_dep],
|
||||
cpp_args : gst_plugins_bad_args + ['-DHAVE_CONFIG_H=1'],
|
||||
cpp_args : gst_plugins_bad_args + ['-DHAVE_CONFIG_H=1', '-DWPE_EXTENSION_INSTALL_DIR=' + wpe_extension_install_dir],
|
||||
include_directories : [configinc],
|
||||
install : true,
|
||||
install_dir : plugins_install_dir)
|
||||
|
|
|
@ -4,5 +4,4 @@ library('gstwpeextension',
|
|||
c_args : ['-DHAVE_CONFIG_H=1'],
|
||||
include_directories : [configinc],
|
||||
install : true,
|
||||
install_dir : plugins_install_dir / 'wpe-extension')
|
||||
|
||||
install_dir : wpe_extension_install_dir)
|
||||
|
|
Loading…
Reference in a new issue