diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2024-01-19 15:08:47 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-01-23 02:21:39 +0200 |
commit | ebc396fc7aef5a3a07a0ec2c32ab5ae72d31c513 (patch) | |
tree | 1f176a7f86f83393e595bce9cc625aa51cc74ece /src | |
parent | 81791d2cac70a3f549db85fb2e40e385b24e76fc (diff) |
gstreamer: Add meson devenv support
This change to the build system will prepend the plugin build directory
to GST_PLUGIN_PATH environment. This makes the built plugin visible to
GStreamer inside meson devenv enabling uninstalled testing. In order to
avoid polluting the user registry, the GST_REGISTRY environment is also
set.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gstreamer/meson.build | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build index 20784b71..c2a01e7b 100644 --- a/src/gstreamer/meson.build +++ b/src/gstreamer/meson.build @@ -46,3 +46,15 @@ libcamera_gst = shared_library('gstlibcamera', install : true, install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')), ) + +# Make the plugin visible to GStreamer inside meson devenv. +fs = import('fs') +gst_plugin_path = fs.parent(libcamera_gst.full_path()) + +gst_env = environment() +gst_env.prepend('GST_PLUGIN_PATH', gst_plugin_path) + +# Avoid polluting the system registry. +gst_env.set('GST_REGISTRY', gst_plugin_path / 'registry.data') + +meson.add_devenv(gst_env) |