From 453eac7f1f5ef70390ec51087fc1f190811a7507 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 17 Nov 2021 09:47:45 +0100 Subject: Replace sfml with mgl --- include/VideoPlayer.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/VideoPlayer.hpp') diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 4eab812..2ccd280 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -1,8 +1,8 @@ #pragma once #include "MediaChapter.hpp" -#include -#include +#include +#include #include #include #include @@ -10,7 +10,7 @@ namespace QuickMedia { using EventCallbackFunc = std::function; - using VideoPlayerWindowCreateCallback = std::function; + using VideoPlayerWindowCreateCallback = std::function; // Currently this video player launches mpv and embeds it into the QuickMedia window class VideoPlayer { @@ -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 use_youtube_dl, const std::string &title, const std::string &start_time = "", const std::vector &chapters = {}); + Error load_video(const char *path, const char *audio_path, mgl::WindowHandle parent_window, bool use_youtube_dl, const std::string &title, const std::string &start_time = "", const std::vector &chapters = {}); // Should be called every update frame Error update(); @@ -56,7 +56,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 &title, const std::string &start_time); + 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: std::string plugin_name; @@ -66,7 +66,7 @@ namespace QuickMedia { bool use_youtube_dl; pid_t video_process_id; bool connected_to_ipc; - sf::Clock retry_timer; + mgl::Clock retry_timer; int connect_tries; int find_window_tries; int monitor_height; @@ -75,8 +75,8 @@ namespace QuickMedia { char ipc_server_path[L_tmpnam]; EventCallbackFunc event_callback; VideoPlayerWindowCreateCallback window_create_callback; - sf::WindowHandle window_handle; - sf::WindowHandle parent_window; + mgl::WindowHandle window_handle; + mgl::WindowHandle parent_window; Display *display; unsigned int request_id; unsigned int expected_request_id; -- cgit v1.2.3