mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-04-24 02:29:49 +09:00
kms: use /tmp directory for temporary unix domain socket to fix too long path with AppImage portable home
This commit is contained in:
4
TODO
4
TODO
@@ -309,3 +309,7 @@ Colors are offset to bottom left by 1 pixel or so on steam deck in landscape mod
|
|||||||
|
|
||||||
When constant framerate is used (and for audio) multiple frames need to be encoded after resuming from suspend.
|
When constant framerate is used (and for audio) multiple frames need to be encoded after resuming from suspend.
|
||||||
The clock jumps forward by around 2-3 seconds (on my machine). Is there a way to make sure the clock doesn't jump forward?
|
The clock jumps forward by around 2-3 seconds (on my machine). Is there a way to make sure the clock doesn't jump forward?
|
||||||
|
|
||||||
|
Colors are correct, but they look incorrect for thin elements, such as colored text. This can be improved by sampling neighbor pixels for color average.
|
||||||
|
|
||||||
|
Record first video/audio frame immediately.
|
||||||
@@ -119,8 +119,11 @@ static int recv_msg_from_server(int server_pid, int server_fd, gsr_kms_response
|
|||||||
|
|
||||||
/* We have to use $HOME because in flatpak there is no simple path that is accessible, read and write, that multiple flatpak instances can access */
|
/* We have to use $HOME because in flatpak there is no simple path that is accessible, read and write, that multiple flatpak instances can access */
|
||||||
static bool create_socket_path(char *output_path, size_t output_path_size) {
|
static bool create_socket_path(char *output_path, size_t output_path_size) {
|
||||||
|
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
|
||||||
const char *home = getenv("HOME");
|
const char *home = getenv("HOME");
|
||||||
if(!home)
|
// Portable home with AppImage can cause the socket path to be longer than 108 characters (unix domain socket path max length).
|
||||||
|
// Using gsr-kms-socket in $HOME is only needed in flatpak, so use /tmp everywhere else instead.
|
||||||
|
if(!home || !inside_flatpak)
|
||||||
home = "/tmp";
|
home = "/tmp";
|
||||||
|
|
||||||
char random_characters[11];
|
char random_characters[11];
|
||||||
@@ -318,6 +321,8 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path) {
|
|||||||
self->kms_server_pid = pid;
|
self->kms_server_pid = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need this dumb-shit retardation with unix domain socket and then replace it with socketpair because
|
||||||
|
// pkexec doesn't work with socketpair................
|
||||||
fprintf(stderr, "gsr info: gsr_kms_client_init: waiting for server to connect\n");
|
fprintf(stderr, "gsr info: gsr_kms_client_init: waiting for server to connect\n");
|
||||||
struct pollfd poll_fd = {
|
struct pollfd poll_fd = {
|
||||||
.fd = self->initial_socket_fd,
|
.fd = self->initial_socket_fd,
|
||||||
|
|||||||
Reference in New Issue
Block a user