From 38202de4f953fca28aa884246ced0aadf0d25a4d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 25 Jun 2021 12:44:53 +0200 Subject: Add a http server proxy for better youtube downloading (bypassing rate limit cased by http range header). Fix youtube live streams --- include/Program.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/Program.hpp') diff --git a/include/Program.hpp b/include/Program.hpp index f164180..4007a24 100644 --- a/include/Program.hpp +++ b/include/Program.hpp @@ -4,10 +4,10 @@ #include #include -typedef struct { - pid_t pid; - int read_fd; -} ReadProgram; +struct ReadProgram { + pid_t pid = -1; + int read_fd = -1; +}; /* Return 0 if you want to continue reading. @data is null-terminated */ typedef int (*ProgramOutputCallback)(char *data, int size, void *userdata); @@ -23,7 +23,7 @@ int exec_program_pipe(const char **args, ReadProgram *read_program); and the last which is NULL, which indicates end of args. |buffer_size| has to be between 1 and 65536. */ -int exec_program(const char **args, ProgramOutputCallback output_callback, void *userdata, int buffer_size = 4096); +int exec_program(const char **args, ProgramOutputCallback output_callback, void *userdata, int buffer_size = 16384); // Return the exit status, or a negative value if waiting failed int wait_program(pid_t process_id); -- cgit v1.2.3