mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-05 14:30:43 +09:00
5.4.0
This commit is contained in:
@@ -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'])
|
add_project_arguments('-Wshadow', language : ['c', 'cpp'])
|
||||||
if get_option('buildtype') == 'debug'
|
if get_option('buildtype') == 'debug'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "gpu-screen-recorder"
|
name = "gpu-screen-recorder"
|
||||||
type = "executable"
|
type = "executable"
|
||||||
version = "5.3.8"
|
version = "5.4.0"
|
||||||
platforms = ["posix"]
|
platforms = ["posix"]
|
||||||
|
|
||||||
[config]
|
[config]
|
||||||
|
|||||||
19
src/main.cpp
19
src/main.cpp
@@ -2892,6 +2892,7 @@ static size_t calculate_estimated_replay_buffer_packets(int64_t replay_buffer_si
|
|||||||
int audio_fps = 0;
|
int audio_fps = 0;
|
||||||
if(!audio_inputs.empty())
|
if(!audio_inputs.empty())
|
||||||
audio_fps = AUDIO_SAMPLE_RATE / audio_codec_get_frame_size(audio_codec);
|
audio_fps = AUDIO_SAMPLE_RATE / audio_codec_get_frame_size(audio_codec);
|
||||||
|
|
||||||
return replay_buffer_size_secs * (fps + audio_fps * audio_inputs.size());
|
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) {
|
if(toggle_replay_recording && !arg_parser.replay_recording_directory) {
|
||||||
toggle_replay_recording = 0;
|
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) {
|
if(toggle_replay_recording && arg_parser.replay_recording_directory) {
|
||||||
@@ -3680,8 +3682,8 @@ int main(int argc, char **argv) {
|
|||||||
force_iframe_frame = true;
|
force_iframe_frame = true;
|
||||||
fprintf(stderr, "Started recording\n");
|
fprintf(stderr, "Started recording\n");
|
||||||
} else {
|
} else {
|
||||||
// TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error:
|
printf("Error: Failed to start recording\n");
|
||||||
fprintf(stderr, "Failed to start recording\n");
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
} else if(replay_recording_start_result.av_format_context) {
|
} else if(replay_recording_start_result.av_format_context) {
|
||||||
for(size_t id : replay_recording_items) {
|
for(size_t id : replay_recording_items) {
|
||||||
@@ -3696,8 +3698,8 @@ int main(int argc, char **argv) {
|
|||||||
if(arg_parser.recording_saved_script)
|
if(arg_parser.recording_saved_script)
|
||||||
run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular");
|
run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular");
|
||||||
} else {
|
} else {
|
||||||
// TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error:
|
printf("Error: Failed to save recording\n");
|
||||||
fprintf(stderr, "Failed to save recording\n");
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
replay_recording_start_result = RecordingStartResult{};
|
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) {
|
if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
|
||||||
save_replay_thread.get();
|
save_replay_thread.get();
|
||||||
if(save_replay_output_filepath.empty()) {
|
if(save_replay_output_filepath.empty()) {
|
||||||
// TODO: Output failed to save
|
printf("Error: Failed to save replay\n");
|
||||||
|
fflush(stdout);
|
||||||
} else {
|
} else {
|
||||||
puts(save_replay_output_filepath.c_str());
|
puts(save_replay_output_filepath.c_str());
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@@ -3786,8 +3789,8 @@ int main(int argc, char **argv) {
|
|||||||
if(arg_parser.recording_saved_script)
|
if(arg_parser.recording_saved_script)
|
||||||
run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular");
|
run_recording_saved_script_async(arg_parser.recording_saved_script, replay_recording_filepath.c_str(), "regular");
|
||||||
} else {
|
} else {
|
||||||
// TODO: Output "Error: failed to start recording" to stdout, catch in gsr-ui. Catch all That starts with Error:
|
printf("Error: Failed to save recording\n");
|
||||||
fprintf(stderr, "Failed to save recording\n");
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user