aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-10 04:55:11 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-10 04:55:11 +0200
commit2e156d80e4e3d379849bb1e127e4c69a8f34cea4 (patch)
tree8243911f278aa109707db9f35b84f69be20b93b7 /include
parenta50b832de4019ce8b5d72e8541d64d68ed3a615a (diff)
Fallback to invidio.us only if mpv exits (faster fallback)
Diffstat (limited to 'include')
-rw-r--r--include/Program.h3
-rw-r--r--include/VideoPlayer.hpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/Program.h b/include/Program.h
index 6a6d038..bc3e91e 100644
--- a/include/Program.h
+++ b/include/Program.h
@@ -2,6 +2,7 @@
#define QUICKMEDIA_PROGRAM_H
#include <sys/types.h>
+#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
@@ -25,6 +26,8 @@ int exec_program(const char **args, ProgramOutputCallback output_callback, void
// Return the exit status, or a negative value if waiting failed
int wait_program(pid_t process_id);
+bool wait_program_non_blocking(pid_t process_id, int *status);
+
/*
@args need to have at least 2 arguments. The first which is the program name
and the last which is NULL, which indicates end of args
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp
index 4dc7b53..c5d9cfe 100644
--- a/include/VideoPlayer.hpp
+++ b/include/VideoPlayer.hpp
@@ -31,7 +31,8 @@ namespace QuickMedia {
READ_TIMEOUT,
READ_RESPONSE_ERROR,
READ_INCORRECT_TYPE,
- INIT_FAILED
+ INIT_FAILED,
+ EXITED
};
// @event_callback is called from another thread