mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 15:19:56 +09:00
Fix loading audio tracks incorrect config, finish recording option
This commit is contained in:
@@ -13,17 +13,17 @@ namespace gsr {
|
||||
};
|
||||
|
||||
struct RecordOptions {
|
||||
std::string record_area_option;
|
||||
std::string record_area_option = "screen";
|
||||
int32_t record_area_width = 0;
|
||||
int32_t record_area_height = 0;
|
||||
int32_t fps = 60;
|
||||
bool merge_audio_tracks = true;
|
||||
std::vector<std::string> audio_tracks;
|
||||
std::string color_range;
|
||||
std::string video_quality;
|
||||
std::string video_codec;
|
||||
std::string audio_codec;
|
||||
std::string framerate_mode;
|
||||
std::string color_range = "limited";
|
||||
std::string video_quality = "very_high";
|
||||
std::string video_codec = "auto";
|
||||
std::string audio_codec = "opus";
|
||||
std::string framerate_mode = "vfr";
|
||||
bool advanced_view = false;
|
||||
bool overclock = false;
|
||||
bool record_cursor = true;
|
||||
@@ -45,14 +45,14 @@ namespace gsr {
|
||||
|
||||
struct CustomStreamConfig {
|
||||
std::string url;
|
||||
std::string container;
|
||||
std::string container = "flv";
|
||||
};
|
||||
|
||||
struct StreamingConfig {
|
||||
RecordOptions record_options;
|
||||
bool show_streaming_started_notifications = true;
|
||||
bool show_streaming_stopped_notifications = true;
|
||||
std::string streaming_service;
|
||||
std::string streaming_service = "twitch";
|
||||
YoutubeStreamConfig youtube;
|
||||
TwitchStreamConfig twitch;
|
||||
CustomStreamConfig custom;
|
||||
@@ -64,7 +64,7 @@ namespace gsr {
|
||||
bool show_recording_started_notifications = true;
|
||||
bool show_video_saved_notifications = true;
|
||||
std::string save_directory;
|
||||
std::string container;
|
||||
std::string container = "mp4";
|
||||
ConfigHotkey start_stop_recording_hotkey;
|
||||
ConfigHotkey pause_unpause_recording_hotkey;
|
||||
};
|
||||
@@ -75,7 +75,7 @@ namespace gsr {
|
||||
bool show_replay_stopped_notifications = true;
|
||||
bool show_replay_saved_notifications = true;
|
||||
std::string save_directory;
|
||||
std::string container;
|
||||
std::string container = "mp4";
|
||||
int32_t replay_time = 60;
|
||||
ConfigHotkey start_stop_recording_hotkey;
|
||||
ConfigHotkey save_recording_hotkey;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <mglpp/graphics/Text.hpp>
|
||||
|
||||
namespace gsr {
|
||||
class DropdownButton;
|
||||
|
||||
class Overlay {
|
||||
public:
|
||||
Overlay(mgl::Window &window, std::string resources_path, GsrInfo gsr_info, egl_functions egl_funcs, mgl::Color bg_color);
|
||||
@@ -28,6 +30,9 @@ namespace gsr {
|
||||
void toggle_show();
|
||||
bool is_open() const;
|
||||
private:
|
||||
void on_press_start_replay(const std::string &id);
|
||||
void on_press_start_record(const std::string &id);
|
||||
void on_press_start_stream(const std::string &id);
|
||||
bool update_compositor_texture(const mgl_monitor *monitor);
|
||||
private:
|
||||
mgl::Window &window;
|
||||
@@ -52,5 +57,8 @@ namespace gsr {
|
||||
uint64_t default_cursor = 0;
|
||||
pid_t gpu_screen_recorder_process = -1;
|
||||
std::optional<Config> config;
|
||||
DropdownButton *replay_dropdown_button_ptr = nullptr;
|
||||
DropdownButton *record_dropdown_button_ptr = nullptr;
|
||||
DropdownButton *stream_dropdown_button_ptr = nullptr;
|
||||
};
|
||||
}
|
||||
@@ -86,7 +86,7 @@ namespace gsr {
|
||||
std::unique_ptr<List> create_stream_container_section();
|
||||
void add_stream_widgets();
|
||||
|
||||
void load_audio_tracks();
|
||||
void load_audio_tracks(RecordOptions &record_options);
|
||||
void load_common(RecordOptions &record_options);
|
||||
void load_replay();
|
||||
void load_record();
|
||||
|
||||
Reference in New Issue
Block a user