aboutsummaryrefslogtreecommitdiff
path: root/include/VideoPlayer.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-14 06:15:06 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-14 06:15:06 +0100
commitb9a5d95635a2f0094cd919f0b11f37336012dc24 (patch)
treec4814bb82e976cb6ada4115d52285962ebf99db9 /include/VideoPlayer.hpp
parentb7ee32e6037aea851575ba44af85b48eca0a3886 (diff)
Resume video when navigating back from related/channel videos
Diffstat (limited to 'include/VideoPlayer.hpp')
-rw-r--r--include/VideoPlayer.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp
index 86410da..abd715a 100644
--- a/include/VideoPlayer.hpp
+++ b/include/VideoPlayer.hpp
@@ -36,7 +36,7 @@ namespace QuickMedia {
};
// @event_callback is called from another thread
- VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, EventCallbackFunc event_callback, VideoPlayerWindowCreateCallback window_create_callback, const std::string &resource_root);
+ VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, EventCallbackFunc event_callback, VideoPlayerWindowCreateCallback window_create_callback, const std::string &resource_root);
~VideoPlayer();
VideoPlayer(const VideoPlayer&) = delete;
VideoPlayer& operator=(const VideoPlayer&) = delete;
@@ -60,12 +60,15 @@ namespace QuickMedia {
Error is_seekable(bool *result);
+ Error quit_and_save_watch_later();
+
bool is_connected() const { return connected_to_ipc; }
- int exit_status;
- private:
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);
+
+ int exit_status;
+ private:
Error send_command(const char *cmd, size_t size);
Error launch_video_process(const char *path, sf::WindowHandle parent_window, const std::string &plugin_name);
VideoPlayer::Error read_ipc_func();
@@ -73,6 +76,7 @@ namespace QuickMedia {
bool use_tor;
bool no_video;
bool use_system_mpv_config;
+ bool resume_playback;
pid_t video_process_id;
int ipc_socket;
bool connected_to_ipc;