Release 0.1.4

Remove spec file
Fix systemd service file
Send error on link errors
Init socket to -1 so that we don't close anything on error
Wait for all proxy objects in device monitor
This commit is contained in:
Wim Taymans 2017-08-23 10:45:08 +02:00
parent 5cc4c5c378
commit b7e334e55d
6 changed files with 22 additions and 181 deletions

View file

@ -16,8 +16,7 @@ Description=Multimedia Service
Requires=pipewire.socket
[Service]
# Note that notify will only work if --daemonize=no
Type=notify
Type=simple
ExecStart=@PW_BINARY@
Restart=on-failure

View file

@ -297,8 +297,11 @@ on_sync_reply (void *data, uint32_t seq)
GstPipeWireDeviceProvider *self = data;
if (seq == 1)
pw_core_proxy_sync(self->core_proxy, 2);
else if (seq == 2)
else if (seq == 2) {
self->end = true;
if (self->main_loop)
pw_thread_loop_signal (self->main_loop, FALSE);
}
}
static void
@ -563,6 +566,13 @@ gst_pipewire_device_provider_start (GstDeviceProvider * provider)
pw_registry_proxy_add_listener(self->registry, &data->registry_listener, &registry_events, data);
pw_core_proxy_sync(self->core_proxy, 1);
for (;;) {
if (self->end)
break;
pw_thread_loop_wait (self->main_loop);
}
GST_DEBUG_OBJECT (self, "started");
pw_thread_loop_unlock (self->main_loop);
return TRUE;

View file

@ -117,8 +117,15 @@ link_state_changed(void *data, enum pw_link_state old, enum pw_link_state state,
switch (state) {
case PW_LINK_STATE_ERROR:
{
struct pw_resource *owner = pw_node_get_owner(info->node);
pw_log_debug("module %p: link %p: state error: %s", impl, link, error);
if (owner)
pw_resource_error(owner, SPA_RESULT_ERROR, error);
break;
}
case PW_LINK_STATE_UNLINKED:
pw_log_debug("module %p: link %p: unlinked", impl, link);

View file

@ -625,7 +625,8 @@ impl_new_client(struct pw_protocol *protocol,
this->disconnect = impl_disconnect;
this->destroy = impl_destroy;
impl->flush_event = pw_loop_add_event(remote->core->main_loop, do_flush_event, impl);
impl->fd = -1;
impl->flush_event = pw_loop_add_event(remote->core->main_loop, do_flush_event, impl);
spa_list_append(&protocol->client_list, &this->link);