From 2a78b5b047a753874ca1e499f79d5f9fbb1699d5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Aug 2019 15:53:47 +0200 Subject: Move video player to main thread (it's still processed in another thread), fix crash, fix scaling --- include/VideoPlayer.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 9fbad33..df08339 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -29,7 +29,7 @@ namespace QuickMedia { ~VideoPlayer(); void setPosition(float x, float y); - bool resize(const sf::Vector2i &size); + void resize(const sf::Vector2i &size); void draw(sf::RenderWindow &window); void load_file(const std::string &path); @@ -41,12 +41,9 @@ namespace QuickMedia { private: mpv_handle *mpv; mpv_opengl_cb_context *mpvGl; - std::thread renderThread; - std::mutex renderMutex; sf::Sprite sprite; sf::Texture texture; sf::Uint8 *textureBuffer; - bool alive; sf::Vector2i video_size; sf::Vector2i desired_size; sf::RectangleShape seekbar; -- cgit v1.2.3