Dont use dbus_bus_request_name

This commit is contained in:
dec05eba
2026-01-28 01:37:50 +01:00
parent 144b481526
commit bdf1950ca2
2 changed files with 2 additions and 16 deletions

2
TODO
View File

@@ -397,3 +397,5 @@ Return the max resolution of each codec in --info to display an error in the UI
Should -low-power option also use vaapi/vulkan low power, if available?
Should capture option x=bla;y=bla be scaled by -s (output resolution scale)? width and height is.
Certain webcam resolutions yuyv resolutions dont work (on amd at least), such as 800x600. Maybe it's because of alignment issue, 600 isn't divisible by 16.

View File

@@ -78,14 +78,6 @@ bool gsr_dbus_init(gsr_dbus *self, const char *screencast_restore_token) {
return false;
}
/* TODO: Check the name */
const int ret = dbus_bus_request_name(self->con, "com.dec05eba.gpu_screen_recorder", DBUS_NAME_FLAG_REPLACE_EXISTING, &self->err);
if(dbus_error_is_set(&self->err)) {
fprintf(stderr, "gsr error: gsr_dbus_init: dbus_bus_request_name failed with error: %s\n", self->err.message);
gsr_dbus_deinit(self);
return false;
}
if(screencast_restore_token) {
self->screencast_restore_token = strdup(screencast_restore_token);
if(!self->screencast_restore_token) {
@@ -95,12 +87,6 @@ bool gsr_dbus_init(gsr_dbus *self, const char *screencast_restore_token) {
}
}
(void)ret;
// if(ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
// fprintf(stderr, "gsr error: gsr_capture_portal_setup_dbus: dbus_bus_request_name failed to get primary owner\n");
// return false;
// }
return true;
}
@@ -119,8 +105,6 @@ void gsr_dbus_deinit(gsr_dbus *self) {
if(self->con) {
dbus_error_free(&self->err);
dbus_bus_release_name(self->con, "com.dec05eba.gpu_screen_recorder", NULL);
// Apparently shouldn't be used when a connection is setup by using dbus_bus_get
//dbus_connection_close(self->con);
dbus_connection_unref(self->con);