Add option to save temporary replay data on disk

This commit is contained in:
dec05eba
2025-05-04 22:39:37 +02:00
parent d08ea69277
commit 305c9df7ac
10 changed files with 72 additions and 22 deletions

View File

@@ -934,8 +934,11 @@ namespace gsr {
// when a compositor isn't running.
window_create_params.graphics_api = gsr_info.system_info.display_server == DisplayServer::WAYLAND ? MGL_GRAPHICS_API_GLX : MGL_GRAPHICS_API_EGL;
if(!window->create("gsr ui", window_create_params))
if(!window->create("gsr ui", window_create_params)) {
fprintf(stderr, "error: failed to create window\n");
window.reset();
return;
}
//window->set_low_latency(true);
@@ -2308,6 +2311,11 @@ namespace gsr {
args.push_back("yes");
}
if(gsr_info.system_info.gsr_version >= GsrVersion{5, 5, 0}) {
args.push_back("-replay-storage");
args.push_back(config.replay_config.replay_storage.c_str());
}
char region_str[128];
add_common_gpu_screen_recorder_args(args, config.replay_config.record_options, audio_tracks, video_bitrate, size, region_str, sizeof(region_str), region_selector);