aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-11-16 17:40:32 +0100
committerdec05eba <dec05eba@protonmail.com>2024-11-16 17:40:32 +0100
commit0c2bb1a7a3dfe555619c17748d88e50bd330b80a (patch)
treeb010e48b611fa1084f7cff73f33c485bf33742b6
parent4ebda17bd2d4b47c281845855354e5e34f25883e (diff)
4.3.0 - support application audio recording
-rw-r--r--com.dec05eba.gpu_screen_recorder.appdata.xml7
-rw-r--r--meson.build2
-rw-r--r--project.conf2
-rw-r--r--src/main.cpp19
4 files changed, 23 insertions, 7 deletions
diff --git a/com.dec05eba.gpu_screen_recorder.appdata.xml b/com.dec05eba.gpu_screen_recorder.appdata.xml
index e4d821c..faace84 100644
--- a/com.dec05eba.gpu_screen_recorder.appdata.xml
+++ b/com.dec05eba.gpu_screen_recorder.appdata.xml
@@ -80,6 +80,13 @@
</screenshots>
<releases>
+ <release version="4.3.0" date="2024-11-16">
+ <description>
+ <ul>
+ <li>Add option to record audio from applications instead of audio devices (pipewire only)</li>
+ </ul>
+ </description>
+ </release>
<release version="4.2.6" date="2024-11-05">
<description>
<ul>
diff --git a/meson.build b/meson.build
index 5277b5c..ca36e56 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '4.2.6', default_options : ['warning_level=2'])
+project('gpu-screen-recorder-gtk', ['c', 'cpp'], version : '4.3.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 518649a..65c8e03 100644
--- a/project.conf
+++ b/project.conf
@@ -1,7 +1,7 @@
[package]
name = "gpu-screen-recorder-gtk"
type = "executable"
-version = "4.2.6"
+version = "4.3.0"
platforms = ["posix"]
[config]
diff --git a/src/main.cpp b/src/main.cpp
index 160990a..d9163ba 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -104,6 +104,7 @@ static GtkWidget *show_recording_stopped_notification_button;
static GtkWidget *show_recording_saved_notification_button;
static GtkWidget *record_cursor_button;
static GtkWidget *restore_portal_session_button;
+static GtkBox *audio_type_radio_button_box;
static GtkWidget *audio_devices_radio_button;
static GtkWidget *application_audio_radio_button;
static GtkGrid *audio_devices_grid;
@@ -256,6 +257,7 @@ enum class DisplayServer {
struct SystemInfo {
DisplayServer display_server = DisplayServer::UNKNOWN;
+ bool supports_app_audio = false;
bool is_steam_deck = false;
};
@@ -2527,6 +2529,8 @@ static void parse_system_info_line(GsrInfo *_gsr_info, const std::string &line)
_gsr_info->system_info.display_server = DisplayServer::WAYLAND;
} else if(attribute_name == "is_steam_deck") {
_gsr_info->system_info.is_steam_deck = attribute_value == "yes";
+ } else if(attribute_name == "supports_app_audio") {
+ _gsr_info->system_info.supports_app_audio = attribute_value == "yes";
}
}
@@ -2936,15 +2940,15 @@ static GtkWidget* create_common_settings_page(GtkStack *stack, GtkApplication *a
gtk_widget_set_margin(GTK_WIDGET(audio_grid), 10, 10, 10, 10);
gtk_container_add(GTK_CONTAINER(audio_input_frame), GTK_WIDGET(audio_grid));
- GtkBox *radio_button_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10));
- gtk_grid_attach(audio_grid, GTK_WIDGET(radio_button_box), 0, audio_input_area_row++, 2, 1);
+ audio_type_radio_button_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10));
+ gtk_grid_attach(audio_grid, GTK_WIDGET(audio_type_radio_button_box), 0, audio_input_area_row++, 2, 1);
audio_devices_radio_button = gtk_radio_button_new_with_label_from_widget(nullptr, "Audio devices");
- gtk_box_pack_start(radio_button_box, audio_devices_radio_button, false, false, 0);
+ gtk_box_pack_start(audio_type_radio_button_box, audio_devices_radio_button, false, false, 0);
g_signal_connect(audio_devices_radio_button, "toggled", G_CALLBACK(audio_devices_application_audio_radio_toggled), nullptr);
application_audio_radio_button = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(audio_devices_radio_button), "Application audio");
- gtk_box_pack_start(radio_button_box, GTK_WIDGET(application_audio_radio_button), false, false, 0);
+ gtk_box_pack_start(audio_type_radio_button_box, GTK_WIDGET(application_audio_radio_button), false, false, 0);
g_signal_connect(application_audio_radio_button, "toggled", G_CALLBACK(audio_devices_application_audio_radio_toggled), nullptr);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(audio_devices_radio_button), true);
@@ -4101,7 +4105,12 @@ static void load_config() {
on_change_video_resolution_button_click(GTK_BUTTON(change_video_resolution_button), nullptr);
- if(config.main_config.audio_type_view == "app_audio") {
+ if(!gsr_info.system_info.supports_app_audio) {
+ gtk_widget_set_visible(GTK_WIDGET(audio_type_radio_button_box), false);
+ gtk_widget_set_visible(GTK_WIDGET(application_audio_grid), false);
+ }
+
+ if(config.main_config.audio_type_view == "app_audio" && gsr_info.system_info.supports_app_audio) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(application_audio_radio_button), true);
audio_devices_application_audio_radio_toggled(GTK_BUTTON(application_audio_radio_button), nullptr);
} else /*if(config.main_config.audio_type_view == "audio_devices") */{