Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gpu-screen-recorder for
openSUSE:Factory checked in at 2026-01-13 21:27:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gpu-screen-recorder (Old)
and /work/SRC/openSUSE:Factory/.gpu-screen-recorder.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gpu-screen-recorder"
Tue Jan 13 21:27:25 2026 rev:28 rq:1326847 version:20260108
Changes:
--------
--- /work/SRC/openSUSE:Factory/gpu-screen-recorder/gpu-screen-recorder.changes
2026-01-07 16:03:01.091121587 +0100
+++
/work/SRC/openSUSE:Factory/.gpu-screen-recorder.new.1928/gpu-screen-recorder.changes
2026-01-13 21:27:55.483499824 +0100
@@ -1,0 +2,9 @@
+Mon Jan 12 20:20:16 UTC 2026 - Muhammad Akbar Yanuar Mantari <[email protected]>
+
+- Update to version 20260108:
+ * Correctly reconnect default audio device when changing it on
+ the system
+ * Fix application audio node getting recreated by pipewire after
+ suspended (idle) for 30 seconds
+
+-------------------------------------------------------------------
Old:
----
gpu-screen-recorder-20260107.tar.zst
New:
----
gpu-screen-recorder-20260108.tar.zst
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gpu-screen-recorder.spec ++++++
--- /var/tmp/diff_new_pack.0JyuPu/_old 2026-01-13 21:27:57.623588132 +0100
+++ /var/tmp/diff_new_pack.0JyuPu/_new 2026-01-13 21:27:57.639588793 +0100
@@ -18,7 +18,7 @@
%bcond_with test
Name: gpu-screen-recorder
-Version: 20260107
+Version: 20260108
Release: 0
Summary: An extremely fast hardware-accelerated screen recorder
License: GPL-3.0-only
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.0JyuPu/_old 2026-01-13 21:27:57.983602988 +0100
+++ /var/tmp/diff_new_pack.0JyuPu/_new 2026-01-13 21:27:58.031604969 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://repo.dec05eba.com/gpu-screen-recorder.git</param>
- <param
name="changesrevision">c4104e18cc5f70c6ba6c48f947f72706fecb9e67</param></service></servicedata>
+ <param
name="changesrevision">6cbf660afa13cac8cdffd98cb5782c7bef468e69</param></service></servicedata>
(No newline at EOF)
++++++ gpu-screen-recorder-20260107.tar.zst ->
gpu-screen-recorder-20260108.tar.zst ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gpu-screen-recorder-20260107/meson.build
new/gpu-screen-recorder-20260108/meson.build
--- old/gpu-screen-recorder-20260107/meson.build 2026-01-07
01:35:30.000000000 +0100
+++ new/gpu-screen-recorder-20260108/meson.build 2026-01-08
01:23:55.000000000 +0100
@@ -1,4 +1,4 @@
-project('gpu-screen-recorder', ['c', 'cpp'], version : '5.11.4',
default_options : ['warning_level=2'])
+project('gpu-screen-recorder', ['c', 'cpp'], version : '5.11.5',
default_options : ['warning_level=2'])
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
if get_option('buildtype') == 'debug'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gpu-screen-recorder-20260107/project.conf
new/gpu-screen-recorder-20260108/project.conf
--- old/gpu-screen-recorder-20260107/project.conf 2026-01-07
01:35:30.000000000 +0100
+++ new/gpu-screen-recorder-20260108/project.conf 2026-01-08
01:23:55.000000000 +0100
@@ -1,7 +1,7 @@
[package]
name = "gpu-screen-recorder"
type = "executable"
-version = "5.11.4"
+version = "5.11.5"
platforms = ["posix"]
[config]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gpu-screen-recorder-20260107/src/sound.cpp
new/gpu-screen-recorder-20260108/src/sound.cpp
--- old/gpu-screen-recorder-20260107/src/sound.cpp 2026-01-07
01:35:30.000000000 +0100
+++ new/gpu-screen-recorder-20260108/src/sound.cpp 2026-01-08
01:23:55.000000000 +0100
@@ -59,17 +59,26 @@
std::mutex reconnect_mutex;
DeviceType device_type;
char stream_name[256];
+ char node_name[256];
bool reconnect;
double reconnect_last_tried_seconds;
char device_name[DEVICE_NAME_MAX_SIZE];
char default_output_device_name[DEVICE_NAME_MAX_SIZE];
char default_input_device_name[DEVICE_NAME_MAX_SIZE];
+
+ pa_proplist *proplist;
+ bool connected;
};
static void pa_sound_device_free(pa_handle *p) {
assert(p);
+ if(p->proplist) {
+ pa_proplist_free(p->proplist);
+ p->proplist = NULL;
+ }
+
if (p->stream) {
pa_stream_unref(p->stream);
p->stream = NULL;
@@ -186,6 +195,7 @@
p = pa_xnew0(pa_handle, 1);
p->attr = *attr;
p->ss = *ss;
+ snprintf(p->node_name, sizeof(p->node_name), "%s", name);
snprintf(p->stream_name, sizeof(p->stream_name), "%s", stream_name);
p->reconnect = true;
@@ -206,20 +216,17 @@
p->output_length = buffer_size;
p->output_index = 0;
- pa_proplist *proplist = pa_proplist_new();
- pa_proplist_sets(proplist, PA_PROP_MEDIA_ROLE, "production");
+ p->proplist = pa_proplist_new();
+ pa_proplist_sets(p->proplist, PA_PROP_MEDIA_ROLE, "production");
if(strcmp(device_name, "") == 0) {
- pa_proplist_sets(proplist, "node.autoconnect", "false");
- pa_proplist_sets(proplist, "node.dont-reconnect", "true");
- pa_proplist_sets(proplist, "node.suspend-on-idle", "false");
- pa_proplist_sets(proplist, "node.pause-on-idle", "false");
- pa_proplist_sets(proplist, "node.always-process", "true");
+ pa_proplist_sets(p->proplist, "node.autoconnect", "false");
+ pa_proplist_sets(p->proplist, "node.dont-reconnect", "true");
}
if (!(p->mainloop = pa_mainloop_new()))
goto fail;
- if (!(p->context =
pa_context_new_with_proplist(pa_mainloop_get_api(p->mainloop), name, proplist)))
+ if (!(p->context =
pa_context_new_with_proplist(pa_mainloop_get_api(p->mainloop), p->node_name,
p->proplist)))
goto fail;
if (pa_context_connect(p->context, server, PA_CONTEXT_NOFLAGS, NULL) < 0) {
@@ -249,17 +256,58 @@
if(pa)
pa_operation_unref(pa);
- pa_proplist_free(proplist);
+ p->connected = true;
return p;
fail:
if (rerror)
*rerror = error;
pa_sound_device_free(p);
- pa_proplist_free(proplist);
return NULL;
}
+static void pa_sound_device_update_context_status(pa_handle *p) {
+ if(p->connected || !p->context || pa_context_get_state(p->context) !=
PA_CONTEXT_READY)
+ return;
+
+ p->connected = true;
+ pa_context_set_subscribe_callback(p->context, subscribe_cb, p);
+ pa_operation *pa = pa_context_subscribe(p->context,
PA_SUBSCRIPTION_MASK_SERVER, NULL, NULL);
+ if(pa)
+ pa_operation_unref(pa);
+}
+
+static bool pa_sound_device_handle_context_recreate(pa_handle *p) {
+ if(p->context) {
+ pa_context_disconnect(p->context);
+ pa_context_unref(p->context);
+ p->context = NULL;
+ p->connected = false;
+ }
+
+ if (!(p->context =
pa_context_new_with_proplist(pa_mainloop_get_api(p->mainloop), p->node_name,
p->proplist))) {
+ fprintf(stderr, "gsr error: pa_context_new_with_proplist failed\n");
+ goto fail;
+ }
+
+ if(pa_context_connect(p->context, nullptr, PA_CONTEXT_NOFLAGS, NULL) < 0) {
+ fprintf(stderr, "gsr error: pa_context_connect failed\n");
+ goto fail;
+ }
+
+ pa_mainloop_iterate(p->mainloop, 0, NULL);
+ pa_sound_device_update_context_status(p);
+ return true;
+
+ fail:
+ if(p->context) {
+ pa_context_disconnect(p->context);
+ pa_context_unref(p->context);
+ p->context = NULL;
+ }
+ return false;
+}
+
static bool pa_sound_device_should_reconnect(pa_handle *p, double now, char
*device_name, size_t device_name_size) {
std::lock_guard<std::mutex> lock(p->reconnect_mutex);
@@ -279,7 +327,6 @@
}
static bool pa_sound_device_handle_reconnect(pa_handle *p, char *device_name,
size_t device_name_size, double now) {
- int r;
if(!pa_sound_device_should_reconnect(p, now, device_name,
device_name_size))
return true;
@@ -287,6 +334,10 @@
pa_stream_disconnect(p->stream);
pa_stream_unref(p->stream);
p->stream = NULL;
+
+ pa_sound_device_handle_context_recreate(p);
+ if(!p->connected)
+ return false;
}
if(!(p->stream = pa_stream_new(p->context, p->stream_name, &p->ss, NULL)))
{
@@ -294,8 +345,8 @@
return false;
}
- r = pa_stream_connect_record(p->stream, device_name, &p->attr,
-
(pa_stream_flags_t)(PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_ADJUST_LATENCY|PA_STREAM_AUTO_TIMING_UPDATE));
+ const int r = pa_stream_connect_record(p->stream, device_name, &p->attr,
+
(pa_stream_flags_t)(PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_ADJUST_LATENCY|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_DONT_MOVE));
if(r < 0) {
//pa_context_errno(p->context);
@@ -323,6 +374,15 @@
pa_mainloop_iterate(p->mainloop, 0, NULL);
+ if(!p->context) {
+ if(!pa_sound_device_handle_context_recreate(p))
+ goto fail;
+ }
+
+ pa_sound_device_update_context_status(p);
+ if(!p->connected)
+ goto fail;
+
if(!pa_sound_device_handle_reconnect(p, device_name, sizeof(device_name),
start_time) || !p->stream)
goto fail;