diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/QuickMedia.hpp | 1 | ||||
-rw-r--r-- | include/VideoPlayer.hpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 765a346..0cd65b4 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -210,5 +210,6 @@ namespace QuickMedia { std::filesystem::path file_manager_start_dir; std::string youtube_url; std::unique_ptr<VideoPlayer> video_player; + bool use_youtube_dl = false; }; }
\ No newline at end of file diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index bdf3344..cd1e979 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -41,7 +41,7 @@ namespace QuickMedia { 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, bool is_youtube, const std::string &title, const std::string &start_time = "", const std::vector<MediaChapter> &chapters = {}); + Error load_video(const char *path, const char *audio_path, sf::WindowHandle parent_window, bool use_youtube_dl, const std::string &title, const std::string &start_time = "", const std::vector<MediaChapter> &chapters = {}); // Should be called every update frame Error update(); @@ -54,13 +54,14 @@ 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, bool is_youtube, const std::string &title, const std::string &start_time); + Error launch_video_process(const char *path, const char *audio_path, sf::WindowHandle parent_window, const std::string &title, const std::string &start_time); VideoPlayer::Error read_ipc_func(); private: std::string plugin_name; bool no_video; bool use_system_mpv_config; bool keep_open; + bool use_youtube_dl; pid_t video_process_id; bool connected_to_ipc; sf::Clock retry_timer; |