diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-04-22 18:46:20 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-04-22 18:46:20 +0200 |
commit | 24ab0bd7aadb8c2b4fe7f5f6560d0181490f90bc (patch) | |
tree | 322e411c433ff2ca1fb76b82563b96968ac13785 | |
parent | 1fd30187fa22979e30def8f91db8bf34291545e3 (diff) |
5.4.0
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | project.conf | 2 | ||||
-rw-r--r-- | src/main.cpp | 19 |
3 files changed, 13 insertions, 10 deletions
diff --git a/meson.build b/meson.build index 1d386da..521c1c0 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gpu-screen-recorder', ['c', 'cpp'], version : '5.3.8', default_options : ['warning_level=2']) +project('gpu-screen-recorder', ['c', 'cpp'], version : '5.4.0', 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 376918d..7de29ff 100644 --- a/project.conf +++ b/project.conf @@ -1,7 +1,7 @@ [package] name = "gpu-screen-recorder" type = "executable" -version = "5.3.8" +version = "5.4.0" platforms = ["posix"] [config] diff --git a/src/main.cpp b/src/main.cpp index 477d8f5..117d5fd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2892,6 +2892,7 @@ static size_t calculate_estimated_replay_buffer_packets(int64_t replay_buffer_si int audio_fps = 0; if(!audio_inputs.empty()) audio_fps = AUDIO_SAMPLE_RATE / audio_codec_get_frame_size(audio_codec); + return replay_buffer_size_secs * (fps + audio_fps * audio_inputs.size()); } @@ -3654,7 +3655,8 @@ int main(int argc, char **argv) { if(toggle_replay_recording && !arg_parser.replay_recording_directory) { toggle_replay_recording = 0; - fprintf(stderr, "Error: unable to start recording since the -ro option was not specified\n"); + printf("Error: Unable to start recording since the -ro option was not specified\n"); + fflush(stdout); } if(toggle_replay_recording && arg_parser.replay_recording_directory) { @@ -3680,8 +3682,8 @@ int main(int argc, char **argv) { force_iframe_frame = true; fprintf(stderr, "Started recording\n"); } else { - // TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error: - fprintf(stderr, "Failed to start recording\n"); + printf("Error: Failed to start recording\n"); + fflush(stdout); } } else if(replay_recording_start_result.av_format_context) { for(size_t id : replay_recording_items) { @@ -3696,8 +3698,8 @@ int main(int argc, char **argv) { if(arg_parser.recording_saved_script) run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular"); } else { - // TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error: - fprintf(stderr, "Failed to save recording\n"); + printf("Error: Failed to save recording\n"); + fflush(stdout); } replay_recording_start_result = RecordingStartResult{}; @@ -3709,7 +3711,8 @@ int main(int argc, char **argv) { if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) { save_replay_thread.get(); if(save_replay_output_filepath.empty()) { - // TODO: Output failed to save + printf("Error: Failed to save replay\n"); + fflush(stdout); } else { puts(save_replay_output_filepath.c_str()); fflush(stdout); @@ -3786,8 +3789,8 @@ int main(int argc, char **argv) { if(arg_parser.recording_saved_script) run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular"); } else { - // TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error: - fprintf(stderr, "Failed to save recording\n"); + printf("Error: Failed to save recording\n"); + fflush(stdout); } } |