Show info why screencast session is not restore if -restore-portal-session yes is not used

This commit is contained in:
dec05eba
2024-07-15 20:10:00 +02:00
parent 63a953e2f0
commit 7b1c546321
2 changed files with 5 additions and 2 deletions

View File

@@ -125,8 +125,6 @@ If you installed GPU Screen Recorder from AUR or from source and you are running
It's configured with `$HOME/.config/gpu-screen-recorder.env` (create it if it doesn't exist). You can look at [extra/gpu-screen-recorder.env](https://git.dec05eba.com/gpu-screen-recorder/plain/extra/gpu-screen-recorder.env) to see an example.
You can see which variables that you can use in the `gpu-screen-recorder.env` file by looking at the `extra/gpu-screen-recorder.service` file. Note that all of the variables are optional, you only have to set the ones that are you interested in.
You can use the `scripts/save-replay.sh` script to save a replay and by default the systemd service saves videos in `$HOME/Videos`.\
When using the `-w portal` your Wayland compositor will show a popup asking what you want to record and in some Wayland compositors you have the option to save the session (token) so that the next time you record it wont ask what you want to record.
If you want to restore the session the next time you record (to remove the popup asking you what you want to record everytime) then run GPU Screen Recorder with the `-restore-portal-session yes` option.
If you are using a NVIDIA GPU then it's recommended to set PreserveVideoMemoryAllocations=1 as mentioned in the section below.
# Issues
## NVIDIA

View File

@@ -2197,8 +2197,13 @@ int main(int argc, char **argv) {
replay_buffer_size_secs += std::ceil(keyint); // Add a few seconds to account of lost packets because of non-keyframe packets skipped
}
// TODO: Remove strdup
const char *window_str = strdup(args["-w"].value());
if(!restore_portal_session && strcmp(window_str, "portal") == 0) {
fprintf(stderr, "gsr info: '-w portal' option used without '-restore-portal-session yes'. The previous screencast session will be ignored\n");
}
bool wayland = false;
Display *dpy = XOpenDisplay(nullptr);
if (!dpy) {