aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-25 12:44:53 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-25 12:44:53 +0200
commit38202de4f953fca28aa884246ced0aadf0d25a4d (patch)
tree7a0a35a32404f1929238444d13a6c626856cc791 /include
parent738f2b1a89a5445a1f0f94229f2fc0637b7c4e71 (diff)
Add a http server proxy for better youtube downloading (bypassing rate limit cased by http range header). Fix youtube live streams
Diffstat (limited to 'include')
-rw-r--r--include/Program.hpp10
1 files changed, 5 insertions, 5 deletions
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 <sys/types.h>
#include <thread>
-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);