Constant bitrate option as default for streaming

This commit is contained in:
dec05eba
2024-10-12 17:43:27 +02:00
parent 9d76b0861e
commit dfafdd9ef5
5 changed files with 25 additions and 4 deletions

View File

@@ -10,11 +10,22 @@
#include <stdlib.h>
namespace gsr {
static void debug_print_args(const char **args) {
fprintf(stderr, "gsr-overlay info: running command:");
while(*args) {
fprintf(stderr, " %s", *args);
++args;
}
fprintf(stderr, "\n");
}
bool exec_program_daemonized(const char **args) {
/* 1 argument */
if(args[0] == nullptr)
return false;
debug_print_args(args);
pid_t pid = vfork();
if(pid == -1) {
perror("Failed to vfork");
@@ -45,6 +56,8 @@ namespace gsr {
if(args[0] == nullptr)
return -1;
debug_print_args(args);
pid_t pid = vfork();
if(pid == -1) {
perror("Failed to vfork");