package/pipewire: add option to enable media-session support
authorJames Hilliard <james.hilliard1@gmail.com>
Sun, 12 Sep 2021 20:47:41 +0000 (14:47 -0600)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 21 Sep 2021 20:39:11 +0000 (22:39 +0200)
The example media-session pipewire session manager requires
pipewire to be built with examples enabled, add support for
enabling this while depending on examples being enabled.

To simplify adding support for additional session managers in
the future such as wireplumber we pass a comma separated list
to the -Dsession-managers meson config option. This also will
ensure that systemd services that depend on media-session are
only installed if media-session support is enabled.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/pipewire/Config.in
package/pipewire/pipewire.mk

index b15bbfa8d3e4743d9dd61b8b9a7218a2035483a1..506b85e856f447f7b90d30936eb82c917aeee1a2 100644 (file)
@@ -19,6 +19,12 @@ config BR2_PACKAGE_PIPEWIRE_EXAMPLES
        help
          Build pipewire examples
 
+config BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION
+       bool "pipewire media-session"
+       depends on BR2_PACKAGE_PIPEWIRE_EXAMPLES
+       help
+         Build pipewire media-session support
+
 config BR2_PACKAGE_PIPEWIRE_GSTREAMER
        bool "pipewire gstreamer plugins"
        depends on BR2_USE_WCHAR # libglib2
index d0887108272fe479a4ae3d99fb3677f1362f7866..d6cbe1605f940e7aebf6e0a2a915396f367e17e2 100644 (file)
@@ -156,6 +156,12 @@ else
 PIPEWIRE_CONF_OPTS += -Decho-cancel-webrtc=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_PIPEWIRE_MEDIA_SESSION),y)
+PIPEWIRE_SESSION_MANAGERS_LIST = media-session
+endif
+
+PIPEWIRE_CONF_OPTS += -Dsession-managers='$(subst $(space),$(comma),$(PIPEWIRE_SESSION_MANAGERS_LIST))'
+
 define PIPEWIRE_USERS
        pipewire -1 pipewire -1 * - - - PipeWire System Daemon
 endef