mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-01-31 01:13:06 +09:00
Dont use dbus_bus_request_name
This commit is contained in:
2
TODO
2
TODO
@@ -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.
|
||||
|
||||
16
src/dbus.c
16
src/dbus.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user