diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/VideoPlayer.hpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 2ccd280..f75d76f 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -5,7 +5,6 @@ #include <mglpp/system/Clock.hpp> #include <functional> #include <json/value.h> -#include <sys/un.h> #include <X11/Xlib.h> namespace QuickMedia { @@ -47,15 +46,12 @@ namespace QuickMedia { // Returns time in seconds Error get_time_in_file(double *result); - - Error set_property(const std::string &property_name, const Json::Value &value); - Error get_property(const std::string &property_name, Json::Value *result, Json::ValueType result_type); - Error add_subtitle(const std::string &url, const std::string &title, const std::string &lang); int exit_status; private: - Error send_command(const char *cmd, size_t size); + uint32_t get_next_request_id(); + Error send_command(Json::Value &json_root, Json::Value *result, Json::ValueType result_type); Error launch_video_process(const char *path, const char *audio_path, mgl::WindowHandle parent_window, const std::string &title, const std::string &start_time); VideoPlayer::Error read_ipc_func(); private: @@ -65,20 +61,17 @@ namespace QuickMedia { bool keep_open; bool use_youtube_dl; pid_t video_process_id; - bool connected_to_ipc; mgl::Clock retry_timer; int connect_tries; int find_window_tries; int monitor_height; int ipc_socket = -1; - struct sockaddr_un ipc_addr; - char ipc_server_path[L_tmpnam]; EventCallbackFunc event_callback; VideoPlayerWindowCreateCallback window_create_callback; mgl::WindowHandle window_handle; mgl::WindowHandle parent_window; Display *display; - unsigned int request_id; + unsigned int request_id_counter; unsigned int expected_request_id; Json::Value request_response_data; |