From 6c8fd3c29d0b84844fcabbed0b3db7313e143ed5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 13 Jan 2020 16:27:46 +0100 Subject: [PATCH] media-session: instal media session Install the example media-session Load the media session according to the PATH Include the example directory in the PATH so we can run the media session. --- Makefile.in | 1 + pw-uninstalled.sh | 2 +- src/daemon/command.c | 2 +- src/daemon/pipewire.conf.in | 2 +- src/examples/meson.build | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index 376df425f..29e4355f4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -13,6 +13,7 @@ clean: run: all SPA_PLUGIN_DIR=@BUILD_ROOT@/spa/plugins \ PIPEWIRE_MODULE_DIR=@BUILD_ROOT@ \ + PATH=@BUILD_ROOT@/src/examples:$(PATH) \ PIPEWIRE_CONFIG_FILE=@BUILD_ROOT@/src/daemon/pipewire.conf \ $(DBG) @BUILD_ROOT@/src/daemon/pipewire diff --git a/pw-uninstalled.sh b/pw-uninstalled.sh index af6652117..84620aee2 100755 --- a/pw-uninstalled.sh +++ b/pw-uninstalled.sh @@ -31,7 +31,7 @@ fi export PIPEWIRE_CONFIG_FILE="${BUILDDIR}/src/daemon/pipewire.conf" export SPA_PLUGIN_DIR="${BUILDDIR}/spa/plugins" export PIPEWIRE_MODULE_DIR="${BUILDDIR}/src/modules" -export PATH="${BUILDDIR}/src/daemon:${BUILDDIR}/src/tools:${PATH}" +export PATH="${BUILDDIR}/src/daemon:${BUILDDIR}/src/tools:${BUILDDIR}/src/examples:${PATH}" export LD_LIBRARY_PATH="${BUILDDIR}/pipewire-pulseaudio/src/:${BUILDDIR}/src/pipewire/:${BUILDDIR}/pipewire-jack/src/:${LD_LIBRARY_PATH}" export GST_PLUGIN_PATH="${BUILDDIR}/src/gst/:${GST_PLUGIN_PATH}" diff --git a/src/daemon/command.c b/src/daemon/command.c index b42521122..3a16e3738 100644 --- a/src/daemon/command.c +++ b/src/daemon/command.c @@ -223,7 +223,7 @@ execute_command_exec(struct pw_command *command, struct pw_context *context, cha if (pid == 0) { pw_log_info("exec %s", command->args[1]); - res = execv(command->args[1], command->args); + res = execvp(command->args[1], command->args); if (res == -1) { res = -errno; asprintf(err, "'%s': %m", command->args[1]); diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index 1a7c8d714..4bfb96b1d 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -36,4 +36,4 @@ load-module libpipewire-module-access load-module libpipewire-module-adapter load-module libpipewire-module-link-factory load-module libpipewire-module-session-manager -exec build/src/examples/media-session +exec pipewire-media-session diff --git a/src/examples/meson.build b/src/examples/meson.build index 4f82d286d..f760ad926 100644 --- a/src/examples/meson.build +++ b/src/examples/meson.build @@ -44,7 +44,7 @@ executable('export-spa-device', dependencies : [pipewire_dep, mathlib], ) -executable('media-session', +executable('pipewire-media-session', 'media-session/alsa-midi.c', 'media-session/alsa-monitor.c', 'media-session/alsa-endpoint.c', @@ -60,7 +60,7 @@ executable('media-session', 'media-session/v4l2-endpoint.c', 'media-session/suspend-node.c', c_args : [ '-D_GNU_SOURCE' ], - install: false, + install: true, dependencies : [dbus_dep, pipewire_dep, alsa_dep, mathlib], )