aboutsummaryrefslogtreecommitdiff
path: root/include/VideoPlayer.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-08 07:26:04 +0200
committerdec05eba <dec05eba@protonmail.com>2019-08-08 07:26:08 +0200
commitc9c2621accb68634685a14703491cacdd7ed2bb1 (patch)
tree51b55692a6010c533dfd98087e12f555a54772e8 /include/VideoPlayer.hpp
parent0943801f321216dabe9f45593f608a222c0d4310 (diff)
Retain fullscreen video when changing to next video
Diffstat (limited to 'include/VideoPlayer.hpp')
-rw-r--r--include/VideoPlayer.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp
index 4f60883..a9b177c 100644
--- a/include/VideoPlayer.hpp
+++ b/include/VideoPlayer.hpp
@@ -28,6 +28,9 @@ namespace QuickMedia {
// Throws VideoInitializationException on error
VideoPlayer(sf::RenderWindow *window, unsigned int width, unsigned int height, const char *file, bool loop = false);
~VideoPlayer();
+
+ VideoPlayer(const VideoPlayer&) = delete;
+ VideoPlayer& operator=(const VideoPlayer&) = delete;
void handle_event(sf::Event &event);
void setPosition(float x, float y);
@@ -40,9 +43,9 @@ namespace QuickMedia {
// This is updated when mpv wants to render
std::atomic_bool redraw;
std::atomic_bool event_update;
+ // Important: Do not destroy the video player in this callback
PlaybackEndedCallback onPlaybackEndedCallback;
private:
- void on_doubleclick();
void handle_mpv_events();
private:
mpv_handle *mpv;
@@ -56,9 +59,5 @@ namespace QuickMedia {
sf::RectangleShape seekbar;
sf::RectangleShape seekbar_background;
sf::Clock cursor_last_active_timer;
- sf::Clock time_since_last_left_click;
- int left_click_counter;
- sf::RenderWindow *window;
- bool video_is_fullscreen;
};
}