From f903b027871a989c1956e6bf16b47e302a01c763 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 12 Jun 2021 04:05:03 +0200 Subject: Start from youtube url timestamp --- include/VideoPlayer.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/VideoPlayer.hpp') diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 341c686..1e40de1 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -40,8 +40,9 @@ namespace QuickMedia { VideoPlayer(const VideoPlayer&) = delete; VideoPlayer& operator=(const VideoPlayer&) = delete; - // |audio_path| is only set when video and audio are separate files/urls - Error load_video(const char *path, const char *audio_path, sf::WindowHandle parent_window, const std::string &plugin_name, const std::string &title); + // |audio_path| is only set when video and audio are separate files/urls. + // |start_time| is ignored if |resume_playback| is true. + Error load_video(const char *path, const char *audio_path, sf::WindowHandle parent_window, const std::string &plugin_name, const std::string &title, const std::string &start_time = ""); // Should be called every update frame Error update(); @@ -56,7 +57,7 @@ namespace QuickMedia { int exit_status; private: Error send_command(const char *cmd, size_t size); - Error launch_video_process(const char *path, const char *audio_path, sf::WindowHandle parent_window, const std::string &plugin_name, const std::string &title); + Error launch_video_process(const char *path, const char *audio_path, sf::WindowHandle parent_window, const std::string &plugin_name, const std::string &title, const std::string &start_time); VideoPlayer::Error read_ipc_func(); private: bool no_video; -- cgit v1.2.3