aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO6
-rw-r--r--meson.build2
-rw-r--r--project.conf2
-rw-r--r--src/egl.c10
-rw-r--r--src/main.cpp6
5 files changed, 21 insertions, 5 deletions
diff --git a/TODO b/TODO
index bb17a96..c1697cf 100644
--- a/TODO
+++ b/TODO
@@ -232,4 +232,8 @@ When adding vulkan video support add VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR
Implement screenshot without invoking opengl (which is slow to start on some systems).
Automatically use desktop portal on wayland when hdr is enabled (or night light) by checking if kms hdr metadata exists, if hdr video codec is not used.
- Or maybe do this in the ui? \ No newline at end of file
+ Or maybe do this in the ui?
+
+Detect if cached portal session token is no longer valid (this can happen if the user switches to another wayland compositor).
+
+Support reconnecting (and setting things up again) if the audio server is restarted (for both device recording and app recording).
diff --git a/meson.build b/meson.build
index 7b1ea04..6537574 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gpu-screen-recorder', ['c', 'cpp'], version : '5.1.1', default_options : ['warning_level=2'])
+project('gpu-screen-recorder', ['c', 'cpp'], version : '5.1.2', default_options : ['warning_level=2'])
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
if get_option('buildtype') == 'debug'
diff --git a/project.conf b/project.conf
index d151975..dbf5435 100644
--- a/project.conf
+++ b/project.conf
@@ -1,7 +1,7 @@
[package]
name = "gpu-screen-recorder"
type = "executable"
-version = "5.1.1"
+version = "5.1.2"
platforms = ["posix"]
[config]
diff --git a/src/egl.c b/src/egl.c
index be5a44d..d2832f4 100644
--- a/src/egl.c
+++ b/src/egl.c
@@ -455,6 +455,16 @@ bool gsr_egl_load(gsr_egl *self, gsr_window *window, bool is_monitor_capture, bo
}
gsr_egl_disable_vsync(self);
+
+ if(self->gpu_info.vendor == GSR_GPU_VENDOR_NVIDIA) {
+ /* This fixes nvenc codecs unable to load on openSUSE tumbleweed because of a cuda error. Don't ask me why */
+ const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
+ if(inside_flatpak)
+ system("flatpak-spawn --host -- nvidia-smi -f /dev/null");
+ else
+ system("nvidia-smi -f /dev/null");
+ }
+
return true;
fail:
diff --git a/src/main.cpp b/src/main.cpp
index 10dc5a6..42cf4d2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2539,10 +2539,12 @@ static void capture_image_to_file(const char *filepath, std::string &window_str,
bool should_stop_error = false;
egl->glClear(0);
- while(true) {
+ while(running) {
should_stop_error = false;
- if(gsr_capture_should_stop(capture, &should_stop_error))
+ if(gsr_capture_should_stop(capture, &should_stop_error)) {
+ running = 0;
break;
+ }
// It can fail, for example when capturing portal and the target is a monitor that hasn't been updated.
// Desktop portal wont refresh the image until there is an update.