Update to 0.5.0

This commit is contained in:
Aleksei Bavshin 2021-11-05 08:41:45 -07:00
parent 2d8f5142de
commit eb41439575
No known key found for this signature in database
GPG Key ID: 4F071603387A382A
3 changed files with 7 additions and 64 deletions

View File

@ -1,2 +1,2 @@
SHA512 (xdg-desktop-portal-wlr-0.4.0.tar.gz) = 544dea4601ce8aa8649d15b7c249aa5b0099fa5a6aec1b7a1433439265acede9ac442092da53080c36b372dd0ef5aaa15747b13a56f4a648e1c00ed3c2435e19
SHA512 (xdg-desktop-portal-wlr-0.4.0.tar.gz.sig) = 95aee1ba332a5e5fc1124efdeb8cb2880f4d1d4e1271e001b8c5fc3f94cc96c2c6f04b410d54202ec98a9c140854863d1abc10bf0fe487439ae05307c385c8f7
SHA512 (xdg-desktop-portal-wlr-0.5.0.tar.gz) = 9ece46f2381e83cac8002a8175a13b0c29c0a2dab49cf11ed5ffa3448f176802b9d324b7e4fe9c15d3fb65087be42299f21a0ef505088e6281787f4067d256ac
SHA512 (xdg-desktop-portal-wlr-0.5.0.tar.gz.sig) = 0810fcdfbe4577d32589b10b8ff11a8251c6ecbf7b2db967f9924431e4294ce3f4622f2e243a52c02bca1a45ca8a8c60f159ab8ef9d124cf64beb0975f2cf02f

View File

@ -1,6 +1,6 @@
Name: xdg-desktop-portal-wlr
Version: 0.4.0
Release: 3%{?dist}
Version: 0.5.0
Release: 1%{?dist}
Summary: xdg-desktop-portal backend for wlroots
License: MIT
@ -8,8 +8,6 @@ URL: https://github.com/emersion/%{name}
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig
Source2: https://emersion.fr/.well-known/openpgpkey/hu/dj3498u4hyyarh35rkjfnghbjxug6b19#/gpgkey-0FDE7BE0E88F5E48.gpg
# emersion/xdg-desktop-portal-wlr#168, upstream commit 5f5a29c
Patch0: xdpw-0.4.0-screencast-fix-pipewire-default-id_node.patch
BuildRequires: gcc
BuildRequires: gnupg2
@ -75,6 +73,9 @@ remote-desktop xdg-desktop-portal interfaces for wlroots based compositors.
%changelog
* Fri Nov 05 2021 Aleksei Bavshin <alebastr@fedoraproject.org> - 0.5.0-1
- Update to 0.5.0
* Wed Nov 03 2021 Aleksei Bavshin <alebastr@fedoraproject.org> - 0.4.0-3
- Apply upstream patch for invalid screencast node_id (#2008645)

View File

@ -1,58 +0,0 @@
From 5f5a29ccfdbd24e7efd874eb8317fb01e908a301 Mon Sep 17 00:00:00 2001
From: columbarius <co1umbarius@protonmail.com>
Date: Tue, 10 Aug 2021 11:56:39 +0200
Subject: [PATCH] screencast: fix pipewire default id_node
The default node_id is SPA_ID_INVALID.
We are casting pipewire uint32_t node_id to int for printing since they are
currently staying in the range of low integer numbers. This makes
spotting an uninitialized node_id (casted to -1) much easier. Should be
corrected if that becomes an issue in the future.
---
src/screencast/pipewire_screencast.c | 2 +-
src/screencast/screencast.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/screencast/pipewire_screencast.c b/src/screencast/pipewire_screencast.c
index d8efb10..b6fe54a 100644
--- a/src/screencast/pipewire_screencast.c
+++ b/src/screencast/pipewire_screencast.c
@@ -111,7 +111,7 @@ static void pwr_handle_stream_state_changed(void *data,
logprint(INFO, "pipewire: stream state changed to \"%s\"",
pw_stream_state_as_string(state));
- logprint(INFO, "pipewire: node id is %d", cast->node_id);
+ logprint(INFO, "pipewire: node id is %d", (int)cast->node_id);
switch (state) {
case PW_STREAM_STATE_STREAMING:
diff --git a/src/screencast/screencast.c b/src/screencast/screencast.c
index a6b09ce..676dd82 100644
--- a/src/screencast/screencast.c
+++ b/src/screencast/screencast.c
@@ -59,6 +59,7 @@ void xdpw_screencast_instance_init(struct xdpw_screencast_context *ctx,
cast->framerate = out->framerate;
cast->with_cursor = with_cursor;
cast->refcount = 1;
+ cast->node_id = SPA_ID_INVALID;
logprint(INFO, "xdpw: screencast instance %p has %d references", cast, cast->refcount);
wl_list_insert(&ctx->screencast_instances, &cast->link);
logprint(INFO, "xdpw: %d active screencast instances",
@@ -419,7 +420,7 @@ static int method_screencast_start(sd_bus_message *msg, void *data,
start_screencast(cast);
}
- while (cast->node_id == 0) {
+ while (cast->node_id == SPA_ID_INVALID) {
int ret = pw_loop_iterate(state->pw_loop, 0);
if (ret != 0) {
logprint(ERROR, "pipewire_loop_iterate failed: %s", spa_strerror(ret));
@@ -432,6 +433,7 @@ static int method_screencast_start(sd_bus_message *msg, void *data,
return ret;
}
+ logprint(DEBUG, "dbus: start: returning node %d", (int)cast->node_id);
ret = sd_bus_message_append(reply, "ua{sv}", PORTAL_RESPONSE_SUCCESS, 1,
"streams", "a(ua{sv})", 1,
cast->node_id, 2,