From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/
Date: Sun, 7 Jul 2019 15:56:03 +0000 (UTC) [thread overview]
Message-ID: <1562514661.862fe9600d20ddb26d990f1b509ff337637e70a2.asturm@gentoo> (raw)
commit: 862fe9600d20ddb26d990f1b509ff337637e70a2
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 7 15:09:07 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 7 15:51:01 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=862fe960
media-video/pipewire: New package, 0.2.6 initial version
Bug: https://bugs.gentoo.org/667014
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-video/pipewire/Manifest | 1 +
.../files/pipewire-0.2.6-alsa-lib-1.1.9.patch | 66 ++++++++++
...pewire-0.2.6-fix-probing-without-starting.patch | 63 ++++++++++
.../pipewire-0.2.6-reuse-fd-in-pipewiresrc.patch | 137 +++++++++++++++++++++
.../pipewire-0.2.6-revert-combine-all-perms.patch | 34 +++++
media-video/pipewire/metadata.xml | 15 +++
media-video/pipewire/pipewire-0.2.6.ebuild | 88 +++++++++++++
7 files changed, 404 insertions(+)
diff --git a/media-video/pipewire/Manifest b/media-video/pipewire/Manifest
new file mode 100644
index 00000000000..edaa0d8055e
--- /dev/null
+++ b/media-video/pipewire/Manifest
@@ -0,0 +1 @@
+DIST pipewire-0.2.6.tar.gz 421137 BLAKE2B 155667d14fe5380e21f0b70accea72dc4478085916a9126185136f6d33bd7729d91b790c171dcf7b6aea2c52894462d16516f8821229ca0bf9f6cde15df524d9 SHA512 3d1db41f5beb42a0ee15ae7bc8afb89b54a37c3a6a414e88b5e33ceaf98ec6dda0d9a2d03ac47a8dfce48e9637e647291919e6670bb70589b0d1951fbcbd3ff8
diff --git a/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch b/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch
new file mode 100644
index 00000000000..7b2b4c894da
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.6-alsa-lib-1.1.9.patch
@@ -0,0 +1,66 @@
+From 37613b67ba52b5ad4e81d7ea38adc04027d9f9e5 Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Thu, 23 May 2019 09:25:51 +0200
+Subject: [PATCH] alsa: handle alsa-lib 1.1.9
+
+alsa-lib 1.1.9 removed /usr/include/alsa from the include path, we
+must include <alsa/asoundlib.h>
+---
+ spa/plugins/alsa/alsa-monitor.c | 2 +-
+ spa/plugins/alsa/alsa-sink.c | 2 +-
+ spa/plugins/alsa/alsa-source.c | 2 +-
+ spa/plugins/alsa/alsa-utils.h | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/spa/plugins/alsa/alsa-monitor.c b/spa/plugins/alsa/alsa-monitor.c
+index d8935cd7..16a01302 100644
+--- a/spa/plugins/alsa/alsa-monitor.c
++++ b/spa/plugins/alsa/alsa-monitor.c
+@@ -25,7 +25,7 @@
+ #include <poll.h>
+
+ #include <libudev.h>
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <spa/support/log.h>
+ #include <spa/support/type-map.h>
+diff --git a/spa/plugins/alsa/alsa-sink.c b/spa/plugins/alsa/alsa-sink.c
+index c31fe3e2..3c252fab 100644
+--- a/spa/plugins/alsa/alsa-sink.c
++++ b/spa/plugins/alsa/alsa-sink.c
+@@ -19,7 +19,7 @@
+
+ #include <stddef.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <spa/node/node.h>
+ #include <spa/param/audio/format.h>
+diff --git a/spa/plugins/alsa/alsa-source.c b/spa/plugins/alsa/alsa-source.c
+index 74bbb3c0..8efc8fde 100644
+--- a/spa/plugins/alsa/alsa-source.c
++++ b/spa/plugins/alsa/alsa-source.c
+@@ -19,7 +19,7 @@
+
+ #include <stddef.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <spa/node/node.h>
+ #include <spa/utils/list.h>
+diff --git a/spa/plugins/alsa/alsa-utils.h b/spa/plugins/alsa/alsa-utils.h
+index 5ba57bc5..3b590007 100644
+--- a/spa/plugins/alsa/alsa-utils.h
++++ b/spa/plugins/alsa/alsa-utils.h
+@@ -26,7 +26,7 @@ extern "C" {
+
+ #include <stddef.h>
+
+-#include <asoundlib.h>
++#include <alsa/asoundlib.h>
+
+ #include <spa/support/type-map.h>
+ #include <spa/support/loop.h>
diff --git a/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch b/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch
new file mode 100644
index 00000000000..9b3aed33b96
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.6-fix-probing-without-starting.patch
@@ -0,0 +1,63 @@
+From 37e66c9e55f556558088d9f6b2200d4341a37f04 Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Tue, 18 Jun 2019 09:53:12 +0200
+Subject: [PATCH] deviceprovider: fix probing without starting
+
+self->type is needed in registry_event_global() so it must be set in
+gst_pipewire_device_provider_probe() as well.
+
+self->devices is initialized as NULL when probing is started. So it should
+be just a simple GList* pointer.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ src/gst/gstpipewiredeviceprovider.c | 8 ++++++--
+ src/gst/gstpipewiredeviceprovider.h | 2 +-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/gst/gstpipewiredeviceprovider.c b/src/gst/gstpipewiredeviceprovider.c
+index b6472d96..02b38c2e 100644
+--- a/src/gst/gstpipewiredeviceprovider.c
++++ b/src/gst/gstpipewiredeviceprovider.c
+@@ -265,7 +265,7 @@ static void do_add_node(void *data)
+ nd->dev = new_node (self, nd);
+ if (nd->dev) {
+ if(self->list_only)
+- *self->devices = g_list_prepend (*self->devices, gst_object_ref_sink (nd->dev));
++ self->devices = g_list_prepend (self->devices, gst_object_ref_sink (nd->dev));
+ else
+ gst_device_provider_device_add (GST_DEVICE_PROVIDER (self), nd->dev);
+ }
+@@ -555,6 +555,8 @@ gst_pipewire_device_provider_probe (GstDeviceProvider * provider)
+
+ t = pw_core_get_type(c);
+
++ self->type = pw_core_get_type (c);
++
+ if (!(r = pw_remote_new (c, NULL, sizeof(*data))))
+ goto failed;
+
+@@ -612,7 +614,9 @@ gst_pipewire_device_provider_probe (GstDeviceProvider * provider)
+ pw_core_destroy (c);
+ pw_loop_destroy (l);
+
+- return *self->devices;
++ self->type = NULL;
++
++ return self->devices;
+
+ failed:
+ pw_loop_destroy (l);
+diff --git a/src/gst/gstpipewiredeviceprovider.h b/src/gst/gstpipewiredeviceprovider.h
+index 81622605..3cf2d41b 100644
+--- a/src/gst/gstpipewiredeviceprovider.h
++++ b/src/gst/gstpipewiredeviceprovider.h
+@@ -98,7 +98,7 @@ struct _GstPipeWireDeviceProvider {
+
+ gboolean end;
+ gboolean list_only;
+- GList **devices;
++ GList *devices;
+ };
+
+ struct _GstPipeWireDeviceProviderClass {
diff --git a/media-video/pipewire/files/pipewire-0.2.6-reuse-fd-in-pipewiresrc.patch b/media-video/pipewire/files/pipewire-0.2.6-reuse-fd-in-pipewiresrc.patch
new file mode 100644
index 00000000000..a1176d3e1b3
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.6-reuse-fd-in-pipewiresrc.patch
@@ -0,0 +1,137 @@
+From 151b2b266e1dae3679584f38b954e4357cf1e5cc Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Wed, 19 Jun 2019 10:49:28 +0200
+Subject: [PATCH] connection: add do_close flag to connect_fd
+
+Make pw_remote_connect_fd() not automatically close the provided
+fd but let the caller take care of that. This allows us to reuse
+the fd in pipewiresrc.
+
+Fixes #155
+---
+ src/modules/module-protocol-native.c | 7 ++++---
+ src/modules/module-protocol-native/local-socket.c | 2 +-
+ src/pipewire/protocol.h | 4 ++--
+ src/pipewire/remote.c | 8 ++++----
+ src/pipewire/remote.h | 3 ++-
+ 5 files changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/src/modules/module-protocol-native.c b/src/modules/module-protocol-native.c
+index 131657f6..0e7b7e27 100644
+--- a/src/modules/module-protocol-native.c
++++ b/src/modules/module-protocol-native.c
+@@ -619,7 +619,7 @@ static const struct pw_protocol_native_connection_events conn_events = {
+ .need_flush = on_need_flush,
+ };
+
+-static int impl_connect_fd(struct pw_protocol_client *client, int fd)
++static int impl_connect_fd(struct pw_protocol_client *client, int fd, bool do_close)
+ {
+ struct client *impl = SPA_CONTAINER_OF(client, struct client, this);
+ struct pw_remote *remote = client->remote;
+@@ -638,14 +638,15 @@ static int impl_connect_fd(struct pw_protocol_client *client, int fd)
+ impl->source = pw_loop_add_io(remote->core->main_loop,
+ fd,
+ SPA_IO_IN | SPA_IO_HUP | SPA_IO_ERR,
+- true, on_remote_data, impl);
++ do_close, on_remote_data, impl);
+ if (impl->source == NULL)
+ goto error_close;
+
+ return 0;
+
+ error_close:
+- close(fd);
++ if (do_close)
++ close(fd);
+ return -ENOMEM;
+ }
+
+diff --git a/src/modules/module-protocol-native/local-socket.c b/src/modules/module-protocol-native/local-socket.c
+index 5ab5a210..0e68eea9 100644
+--- a/src/modules/module-protocol-native/local-socket.c
++++ b/src/modules/module-protocol-native/local-socket.c
+@@ -84,7 +84,7 @@ int pw_protocol_native_connect_local_socket(struct pw_protocol_client *client,
+ goto error_close;
+ }
+
+- res = pw_protocol_client_connect_fd(client, fd);
++ res = pw_protocol_client_connect_fd(client, fd, true);
+
+ done_callback(data, res);
+
+diff --git a/src/pipewire/protocol.h b/src/pipewire/protocol.h
+index 2b6592d1..4a0845fb 100644
+--- a/src/pipewire/protocol.h
++++ b/src/pipewire/protocol.h
+@@ -44,14 +44,14 @@ struct pw_protocol_client {
+ int (*connect) (struct pw_protocol_client *client,
+ void (*done_callback) (void *data, int result),
+ void *data);
+- int (*connect_fd) (struct pw_protocol_client *client, int fd);
++ int (*connect_fd) (struct pw_protocol_client *client, int fd, bool close);
+ int (*steal_fd) (struct pw_protocol_client *client);
+ void (*disconnect) (struct pw_protocol_client *client);
+ void (*destroy) (struct pw_protocol_client *client);
+ };
+
+ #define pw_protocol_client_connect(c,cb,d) ((c)->connect(c,cb,d))
+-#define pw_protocol_client_connect_fd(c,fd) ((c)->connect_fd(c,fd))
++#define pw_protocol_client_connect_fd(c,fd,cl) ((c)->connect_fd(c,fd,cl))
+ #define pw_protocol_client_steal_fd(c) ((c)->steal_fd(c))
+ #define pw_protocol_client_disconnect(c) ((c)->disconnect(c))
+ #define pw_protocol_client_destroy(c) ((c)->destroy(c))
+diff --git a/src/pipewire/remote.c b/src/pipewire/remote.c
+index f63a973a..472b2684 100644
+--- a/src/pipewire/remote.c
++++ b/src/pipewire/remote.c
+@@ -305,7 +305,7 @@ void pw_remote_destroy(struct pw_remote *remote)
+ spa_list_consume(stream, &remote->stream_list, link)
+ pw_stream_destroy(stream);
+
+- pw_protocol_client_destroy (remote->conn);
++ pw_protocol_client_destroy(remote->conn);
+
+ spa_list_remove(&remote->link);
+
+@@ -413,7 +413,7 @@ int pw_remote_connect(struct pw_remote *remote)
+
+ pw_remote_update_state(remote, PW_REMOTE_STATE_CONNECTING, NULL);
+
+- if ((res = pw_protocol_client_connect (remote->conn, done_connect, remote)) < 0) {
++ if ((res = pw_protocol_client_connect(remote->conn, done_connect, remote)) < 0) {
+ pw_remote_update_state(remote, PW_REMOTE_STATE_ERROR,
+ "connect failed %s", spa_strerror(res));
+ return res;
+@@ -428,7 +428,7 @@ int pw_remote_connect_fd(struct pw_remote *remote, int fd)
+
+ pw_remote_update_state(remote, PW_REMOTE_STATE_CONNECTING, NULL);
+
+- if ((res = pw_protocol_client_connect_fd (remote->conn, fd)) < 0) {
++ if ((res = pw_protocol_client_connect_fd(remote->conn, fd, false)) < 0) {
+ pw_remote_update_state(remote, PW_REMOTE_STATE_ERROR,
+ "connect_fd failed %s", spa_strerror(res));
+ return res;
+@@ -462,7 +462,7 @@ int pw_remote_disconnect(struct pw_remote *remote)
+ pw_proxy_destroy(proxy);
+ remote->core_proxy = NULL;
+
+- pw_protocol_client_disconnect (remote->conn);
++ pw_protocol_client_disconnect(remote->conn);
+
+ pw_map_clear(&remote->objects);
+ pw_map_clear(&remote->types);
+diff --git a/src/pipewire/remote.h b/src/pipewire/remote.h
+index df0c496c..2974a04a 100644
+--- a/src/pipewire/remote.h
++++ b/src/pipewire/remote.h
+@@ -177,7 +177,8 @@ void pw_remote_add_listener(struct pw_remote *remote,
+ int pw_remote_connect(struct pw_remote *remote);
+
+ /** Connect to a remote PipeWire on the given socket \memberof pw_remote
+- * \param fd the connected socket to use
++ * \param fd the connected socket to use, the socket will not be closed
++ * automatically on disconnect or error.
+ * \return 0 on success, < 0 on error */
+ int pw_remote_connect_fd(struct pw_remote *remote, int fd);
+
diff --git a/media-video/pipewire/files/pipewire-0.2.6-revert-combine-all-perms.patch b/media-video/pipewire/files/pipewire-0.2.6-revert-combine-all-perms.patch
new file mode 100644
index 00000000000..57ada7d5fb4
--- /dev/null
+++ b/media-video/pipewire/files/pipewire-0.2.6-revert-combine-all-perms.patch
@@ -0,0 +1,34 @@
+From 4350bd624f165de81de10293a8ec5a59e8b7ce64 Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans@redhat.com>
+Date: Fri, 28 Jun 2019 12:22:33 +0200
+Subject: [PATCH] Revert "global: combine all permissions of the object tree"
+
+This reverts commit 83bc033837f7525d898f1de91119f669f9bf97f5.
+
+This needs some more work.
+---
+ src/pipewire/global.c | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/src/pipewire/global.c b/src/pipewire/global.c
+index c963965e..00258ff8 100644
+--- a/src/pipewire/global.c
++++ b/src/pipewire/global.c
+@@ -38,15 +38,9 @@ uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_client *c
+ {
+ uint32_t perms = PW_PERM_RWX;
+
+- if (client->permission_func == NULL)
+- return perms;
+-
+- perms = client->permission_func(global, client, client->permission_data);
+-
+- while (global != global->parent) {
+- global = global->parent;
++ if (client->permission_func != NULL)
+ perms &= client->permission_func(global, client, client->permission_data);
+- }
++
+ return perms;
+ }
+
diff --git a/media-video/pipewire/metadata.xml b/media-video/pipewire/metadata.xml
new file mode 100644
index 00000000000..a5d6bb1343a
--- /dev/null
+++ b/media-video/pipewire/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>asturm@gentoo.org</email>
+ <name>Andreas Sturmlechner</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">PipeWire/pipewire</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/pipewire/pipewire-0.2.6.ebuild b/media-video/pipewire/pipewire-0.2.6.ebuild
new file mode 100644
index 00000000000..53944bcd82f
--- /dev/null
+++ b/media-video/pipewire/pipewire-0.2.6.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/PipeWire/pipewire.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/PipeWire/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Multimedia processing graphs"
+HOMEPAGE="https://pipewire.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="bluetooth doc ffmpeg libav gstreamer sdl systemd vaapi X"
+
+BDEPEND="
+ app-doc/xmltoman
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+"
+DEPEND="
+ media-libs/alsa-lib
+ sys-apps/dbus
+ virtual/libudev
+ bluetooth? ( media-libs/sbc )
+ ffmpeg? (
+ !libav? ( media-video/ffmpeg:= )
+ libav? ( media-video/libav:= )
+ )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ )
+ sdl? ( media-libs/libsdl2 )
+ systemd? ( sys-apps/systemd )
+ vaapi? ( x11-libs/libva )
+ X? ( x11-libs/libX11 )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-alsa-lib-1.1.9.patch
+ "${FILESDIR}"/${P}-reuse-fd-in-pipewiresrc.patch
+ "${FILESDIR}"/${P}-fix-probing-without-starting.patch
+ "${FILESDIR}"/${P}-revert-combine-all-perms.patch
+)
+
+src_prepare() {
+ spa_use() {
+ if ! use ${1}; then
+ sed -e "/.*dependency.*'${2-$1}'/s/'${2-$1}'/'${2-$1}-disabled-by-USE-no-${1}'/" \
+ -i spa/meson.build || die
+ fi
+ }
+
+ default
+ spa_use bluetooth sbc
+ spa_use ffmpeg libavcodec
+ spa_use ffmpeg libavformat
+ spa_use ffmpeg libavfilter
+ spa_use vaapi libva
+ spa_use sdl sdl2
+ spa_use X x11
+}
+
+src_configure() {
+ local emesonargs=(
+ -Dman=true
+ $(meson_use doc docs)
+ $(meson_feature gstreamer)
+ $(meson_use systemd)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ elog "Package has optional sys-auth/rtkit RUNTIME support that may be"
+ elog "disabled by setting DISABLE_RTKIT env var."
+}
next reply other threads:[~2019-07-07 15:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-07 15:56 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-28 15:36 [gentoo-commits] repo/gentoo:master commit in: media-video/pipewire/, media-video/pipewire/files/ Andreas Sturmlechner
2021-01-01 19:12 Andreas Sturmlechner
2021-04-12 21:55 Thomas Deutschmann
2021-09-13 23:07 Sam James
2021-09-16 21:55 Sam James
2021-10-01 0:00 Sam James
2021-10-13 21:11 Andreas Sturmlechner
2021-10-24 1:58 Sam James
2021-11-26 19:37 Andreas Sturmlechner
2022-02-21 3:30 Sam James
2022-05-01 19:52 Sam James
2022-05-01 19:52 Sam James
2022-07-04 23:36 Sam James
2022-07-12 23:23 Sam James
2022-07-12 23:23 Sam James
2022-07-31 3:40 Sam James
2022-10-14 19:33 Sam James
2022-11-17 19:20 Sam James
2022-12-14 8:45 Sam James
2022-12-16 4:56 Sam James
2023-01-15 22:32 Sam James
2023-05-11 1:21 Sam James
2023-09-12 0:43 Sam James
2024-03-19 5:48 Sam James
2024-07-01 8:19 Sam James
2025-02-28 12:08 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1562514661.862fe9600d20ddb26d990f1b509ff337637e70a2.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox