Update to 0.2.7

This commit is contained in:
Wim Taymans 2019-09-26 17:23:22 +02:00
parent 7660b8eedd
commit 2d3c81fb7a
7 changed files with 8 additions and 324 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/0.2.4.tar.gz
/0.2.5.tar.gz
/0.2.6.tar.gz
/pipewire-0.2.7.tar.gz

View File

@ -1,69 +0,0 @@
From b81a51794015cca2b2e51f200adcda013d8cbf75 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Thu, 23 May 2019 09:25:51 +0200
Subject: [PATCH 1/4] 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>
--
2.21.0

View File

@ -1,140 +0,0 @@
From ac03aa34a9b1ec11b0fa65988e53771afbdd367f Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Wed, 19 Jun 2019 10:49:28 +0200
Subject: [PATCH 2/4] 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);
--
2.21.0

View File

@ -1,66 +0,0 @@
From 1b259f746c9ad2a8155230bf733b40391ce071b8 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 3/4] 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 {
--
2.21.0

View File

@ -1,36 +0,0 @@
From a7e432eac182def74571a4e66f85d0cb1ab14539 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Wed, 19 Jun 2019 16:26:55 +0200
Subject: [PATCH 4/4] Revert "global: combine all permissions of the object
tree"
This reverts commit 83bc033837f7525d898f1de91119f669f9bf97f5.
---
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;
}
--
2.21.0

View File

@ -14,8 +14,8 @@
Name: pipewire
Summary: Media Sharing Server
Version: 0.2.6
Release: 5%{?snap:.%{snap}git%{shortcommit}}%{?dist}
Version: 0.2.7
Release: 1%{?snap:.%{snap}git%{shortcommit}}%{?dist}
License: LGPLv2+
URL: https://pipewire.org/
%if 0%{?gitrel}
@ -23,14 +23,10 @@ URL: https://pipewire.org/
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz
%else
Source0: https://github.com/PipeWire/pipewire/archive/%{version}.tar.gz
Source0: https://github.com/PipeWire/pipewire/archive/%{version}/pipewire-%{version}.tar.gz
%endif
## upstream patches
Patch0: 0001-alsa-handle-alsa-lib-1.1.9.patch
Patch1: 0002-connection-add-do_close-flag-to-connect_fd.patch
Patch2: 0003-deviceprovider-fix-probing-without-starting.patch
Patch3: 0004-Revert-global-combine-all-permissions-of-the-object-.patch
## upstreamable patches
@ -105,11 +101,6 @@ This package contains command line utilities for the PipeWire media server.
%prep
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
%patch0 -p1 -b .0000
%patch1 -p1 -b .0001
%patch2 -p1 -b .0002
%patch3 -p1 -b .0003
%build
%meson -D docs=true -D man=true -D gstreamer=enabled -D systemd=true
%meson_build
@ -171,6 +162,9 @@ exit 0
%{_bindir}/spa-inspect
%changelog
* Thu Sep 26 2019 Wim Taymans <wtaymans@redhat.com> - 0.2.7-1
- Update to 0.2.7
* Mon Sep 16 2019 Kalev Lember <klember@redhat.com> - 0.2.6-5
- Don't require the daemon package for -devel subpackage
- Move pipewire.conf man page to the daemon package

View File

@ -1 +1 @@
SHA512 (0.2.6.tar.gz) = 3d1db41f5beb42a0ee15ae7bc8afb89b54a37c3a6a414e88b5e33ceaf98ec6dda0d9a2d03ac47a8dfce48e9637e647291919e6670bb70589b0d1951fbcbd3ff8
SHA512 (pipewire-0.2.7.tar.gz) = 10d3e20cc3d233fbcd1fc39702ae3043a656ebcd9cd3c39c77f0cc2bf42ff4956fc03e7933c7b397bca446c63f45ddacea948d5ec7e4a3300499fa2794f14334